import { Address, Hex, Chain, Account, Hash, BlockNumber, BlockTag, PublicClient as PublicClient$1, WalletClient, CustomTransportConfig } from 'viem'; export { C as CANONICAL_ADDRESSES, b as COMMUNITY_SAFE, a as CanonicalAddresses, c as LAUNCH_SALE_ADDRESSES, L as LaunchSaleAddresses, S as SupportedChainId, e as describeSupportedChains, d as getCanonicalAddresses, g as getLaunchSaleAddresses, i as isSupportedChainId, l as listSupportedChainIds } from './addresses-BKnDLMaN.js'; import { P as PublicClient } from './doc-types-471vSmPO.js'; export { W as WalletClient } from './doc-types-471vSmPO.js'; export { a as BaseClient, B as BusinessResult, C as ClientConfig, T as TransactionOptions } from './BaseClient-BjbYP0cf.js'; import { I as InitConfig } from './initConfig-DajRbAVR.js'; export { A as AirAccountActions, B as BuildInitConfigParams, D as DryRunValidationResult, G as GuardianSpec, O as OperatorConfig, d as PackedUserOperation, P as PendingModuleInstall, R as ResolvedAPNTsToken, a as SlashRecord, S as SuperPaymasterActions, T as TokenConfig, b as airAccountActions, c as buildInitConfig, s as superPaymasterActions } from './initConfig-DajRbAVR.js'; export { A as AggregatorActions, B as BLSG1Point, S as SlashLevel, b as aggregatorActions, e as encodeSetSlashPolicyAdmin, a as encodeSetSlashThreshold } from './aggregator-DFrAbJfH.js'; import { D as DvtPop } from './dvtPop-DyHgjBYw.js'; export { b as buildDvtPop, a as dvtNodeId, d as dvtPopPoint, e as encodeG1Point, v as verifyDvtPop } from './dvtPop-DyHgjBYw.js'; export { a as ChannelActions, C as ChannelState, c as channelActions } from './channel-CkRRbzT8.js'; import { C as CommitteeSigner } from './dvtWire-DxsrbfDe.js'; export { A as ALG_BLS, B as BLSAccountSignatureParams, f as COMMITTEE_QUORUM_UNAVAILABLE, c as COMMITTEE_TREE_DEPTH_DEFAULT, j as DVTAccountSignatureParams, b as DVTTier, D as DVT_TIER_T2, a as DVT_TIER_T3, g as assertCommitteeQuorum, d as committeePerSignerLength, l as encodeBLSAccountSignature, h as encodeCommitteeBLSBlock, k as encodeDVTAccountSignature, i as encodeDVTVerifierProof, e as encodeG2Point, s as sortNodeIdsAscending } from './dvtWire-DxsrbfDe.js'; import * as node_modules_viem__types from 'node_modules/viem/_types'; /** * AAStar Community Branding Configuration */ declare const BRANDING: { readonly logo: "https://raw.githubusercontent.com/jhfnetboy/MarkDownImg/main/img/202505031325963.png"; readonly icon: "https://www.aastar.io/favicon.ico"; readonly colors: { readonly primary: "#FF6B35"; readonly primaryLight: "#FF8C42"; readonly secondary: "#4A90E2"; readonly secondaryDark: "#357ABD"; readonly success: "#4CAF50"; readonly warning: "#FFC107"; readonly error: "#F44336"; readonly gray50: "#F9FAFB"; readonly gray100: "#F3F4F6"; readonly gray700: "#374151"; readonly gray800: "#1F2937"; readonly gray900: "#111827"; }; }; declare const LINKS: { readonly main: "https://aastar.io"; readonly airAccount: "https://airAccount.aastar.io"; readonly superPaymaster: "https://superpaymaster.aastar.io"; readonly demo: "https://aastar.io/demo"; readonly github: "https://github.com/AAStarCommunity"; readonly discord: "https://discord.gg/aastar"; readonly twitter: "https://twitter.com/AAStarCommunity"; }; /** * Contract Addresses - Single Source of Truth * All contract addresses for Sepolia testnet * * This file serves as the single source of truth for all contract addresses. * All other files reference these constants to avoid duplication. */ /** * Core System Addresses */ declare const CORE_ADDRESSES: { readonly registry: `0x${string}`; readonly gToken: `0x${string}`; readonly gTokenStaking: `0x${string}`; readonly superPaymaster: `0x${string}`; readonly paymasterFactory: `0x${string}`; readonly aPNTs: `0x${string}`; readonly mySBT: `0x${string}`; readonly paymasterV4: Address; readonly dvtValidator: `0x${string}`; readonly entryPoint: `0x${string}`; readonly xPNTsFactory: `0x${string}`; readonly microPaymentChannel: `0x${string}`; readonly agentIdentityRegistry: `0x${string}`; readonly agentReputationRegistry: `0x${string}`; }; /** * Token System Addresses */ declare const TOKEN_ADDRESSES: { readonly xPNTsFactory: `0x${string}`; }; /** * Test Token Addresses (For Development & Testing) */ declare const TEST_TOKEN_ADDRESSES: { readonly mockUSDT: Address; readonly aPNTs: Address; readonly bPNTs: Address; }; /** * Test Account Addresses (For Development & Testing) */ declare const TEST_ACCOUNT_ADDRESSES: { readonly simpleAccountFactory: Address; }; /** * Paymaster Addresses */ declare const PAYMASTER_ADDRESSES: { readonly paymasterV4_1: Address; readonly paymasterV4_1iImplementation: `0x${string}`; }; /** * Monitoring System Addresses */ declare const MONITORING_ADDRESSES: { readonly dvtValidator: `0x${string}`; readonly blsAggregator: `0x${string}`; }; /** * Official Contract Addresses */ declare const OFFICIAL_ADDRESSES: { readonly entryPoint: Address; }; /** * Community Owner Addresses */ declare const COMMUNITY_OWNERS: { readonly aastarOwner: "0x411BD567E46C0781248dbB6a9211891C032885e5"; readonly breadCommunityOwner: "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"; }; /** * Test Community Addresses (Registered in Registry v2.2.0 on 2025-11-08) */ declare const TEST_COMMUNITIES: { readonly aastar: Address; readonly bread: Address; readonly mycelium: Address; }; /** * All Addresses Combined (for reference) */ declare const ALL_ADDRESSES: { readonly entryPoint: Address; readonly dvtValidator: `0x${string}`; readonly blsAggregator: `0x${string}`; readonly paymasterV4_1: Address; readonly paymasterV4_1iImplementation: `0x${string}`; readonly simpleAccountFactory: Address; readonly mockUSDT: Address; readonly aPNTs: Address; readonly bPNTs: Address; readonly xPNTsFactory: `0x${string}`; readonly registry: `0x${string}`; readonly gToken: `0x${string}`; readonly gTokenStaking: `0x${string}`; readonly superPaymaster: `0x${string}`; readonly paymasterFactory: `0x${string}`; readonly mySBT: `0x${string}`; readonly paymasterV4: Address; readonly microPaymentChannel: `0x${string}`; readonly agentIdentityRegistry: `0x${string}`; readonly agentReputationRegistry: `0x${string}`; }; /** * DVT node configuration — the AAStar decentralized validator/relay/keeper nodes. * * Each node provides three capabilities behind one base URL: * - BLS co-signing (`POST /signature/sign`) * - gasless relay (`POST /v3/relay`) — see {@link LaunchSaleAddresses.relayerUrls} * - price keeper (server-side, no client API) * * Config is grouped by environment so mainnet is a zero-code switch: fill `environments.mainnet` * and flip `active`. The SDK reads `environments[active]` for the node URLs + contract addresses. * Source of truth mirrors the DVT repo `deploy/sdk-dvt-config.testnet.json` (aastar-sdk#153). */ interface DvtNode { /** Base URL (no trailing slash); endpoints are appended (`/signature/sign`, `/v3/relay`, `/health`). */ url: string; /** Node identity (bytes32); cross-checked against `GET /node/info`. */ nodeId: string; } interface DvtEnvironment { chainId: number; /** AAStarBLSAlgorithm validator. */ validator: `0x${string}`; entryPoint: `0x${string}`; dvtNodes: DvtNode[]; capabilities: { dvtSigning: boolean; relay: boolean; keeper: boolean; }; } interface DvtConfig { /** Active environment key into {@link DvtConfig.environments}. */ active: string; environments: Record; } /** Default DVT config. Testnet (Sepolia) is live; mainnet is a placeholder to fill + flip `active`. */ declare const DVT_CONFIG: DvtConfig; /** * Resolve the active (or named) DVT environment. Throws if that environment isn't configured. * Precedence: explicit `active` arg > `AASTAR_DVT_ENV` env var > `DVT_CONFIG.active` default. * The env var makes switching the DEFAULT a zero-release change (no need to pass `active` everywhere). */ declare function getDvtConfig(active?: string): DvtEnvironment; /** Convenience: the relay base URLs for the active (or named) environment. */ declare function getDvtRelayerUrls(active?: string): string[]; /** * Relay base URLs for a specific chainId (the relay-capable DVT environment matching it). * Single source of truth for the gasless-relay pool — `TokenSaleClient` reads this instead of * duplicating URLs. Returns `[]` if no relay-capable environment matches the chain. */ declare function getDvtRelayerUrlsForChain(chainId: number): string[]; /** Per-node result of {@link checkDvtConnectivity}. */ interface DvtNodeHealth { url: string; nodeId: string; /** All three checks passed. */ ok: boolean; reachable: boolean; healthOk: boolean; relayOk: boolean; nodeIdMatch: boolean; capabilities?: Record; errors: string[]; } /** * Startup connectivity self-test (aastar-sdk#153): for each node verify `GET /health` (status ok + * capabilities), `GET /node/info` (nodeId matches config), and `GET /relay/health` (status ok). * Never throws — returns one result per node so the caller can warn / fail over. * * @param env the environment object, an environment key, or undefined (active). * @param fetchImpl optional fetch (for tests); defaults to global fetch. */ declare function checkDvtConnectivity(env?: DvtEnvironment | string, fetchImpl?: typeof fetch): Promise; /** * GuardClient — read + manage an account's AAStarGlobalGuard (the per-account spending-limit / * tiered-policy contract; see airaccount-contract `src/core/AAStarGlobalGuard.sol`). * * The Guard's write methods are `onlyAccount` — they CANNOT be called by an EOA directly. So the * management methods here return a {@link GuardCall} (`{ to, value, data }`) that the caller wraps * in `account.execute(to, value, data)` and submits as a UserOp (e.g. via the AirAccount client). * Reads are plain view calls (any caller). Browser-safe (viem-only) — usable from a YAA frontend * to build policy management + viewing entry points. * * Monotonic-by-design: limits can only DECREASE, token configs can only be ADDED (never edited or * removed), and ETH daily limit can't go below `minDailyLimit`. The contract enforces this; these * wrappers just expose the allowed operations. */ /** Per-token tiered limits (tier1 ≤ tier2 ≤ dailyLimit). */ interface GuardTokenConfig { /** Tier-1 (ECDSA single-sig) cumulative cap. */ tier1Limit: bigint; /** Tier-2 (P256 + BLS) cumulative cap. */ tier2Limit: bigint; /** Per-day total cap. */ dailyLimit: bigint; } /** Snapshot of the Guard's ETH-level config + state. */ interface GuardConfig { /** The bound account (immutable). */ account: Address; /** Current ETH daily limit (0 = no ETH limit / guard inactive). */ dailyLimit: bigint; /** Floor the ETH daily limit can never go below (immutable). */ minDailyLimit: bigint; /** ETH spent today. */ todaySpent: bigint; /** ETH still spendable today. */ remainingDailyAllowance: bigint; /** Strict mode: when true, any token without a config is blocked. */ strictMode: boolean; } /** A Guard management call to submit via `account.execute(to, value, data)` (UserOp). */ interface GuardCall { to: Address; value: bigint; data: Hex; } /** Minimal read surface (decouples from viem's PublicClient generic). */ interface ReadClient { readContract(args: { address: Address; abi: unknown; functionName: string; args?: readonly unknown[]; }): Promise; } declare class GuardClient { private readonly publicClient; readonly guardAddress: Address; constructor(publicClient: ReadClient, guardAddress: Address); private read; /** ETH-level config + live spend state in one batch. */ getConfig(): Promise; /** A token's tiered config (`tier1Limit`/`tier2Limit`/`dailyLimit`). All-zero = unconfigured. */ getTokenConfig(token: Address): Promise; /** A token's amount spent today. */ getTokenTodaySpent(token: Address): Promise; /** Add a token's tiered limit config (add-only; cannot edit/remove an existing one). */ encodeAddTokenConfig(token: Address, config: GuardTokenConfig): GuardCall; /** Lower the ETH daily limit (can only decrease; not below `minDailyLimit`). */ encodeDecreaseDailyLimit(newLimit: bigint): GuardCall; /** Lower a token's daily limit (decrease-only). */ encodeDecreaseTokenDailyLimit(token: Address, newLimit: bigint): GuardCall; /** Enable/disable strict mode (block tokens that have no config). */ encodeSetStrictMode(enabled: boolean): GuardCall; private call; } /** * AAstar Smart Contract Addresses * * IMPORTANT: Contract addresses are defined in contract-addresses.ts * This file imports and uses those addresses to maintain a single source of truth. * * For detailed version information (VERSION, VERSION_CODE, features), * see contract-versions.ts */ /** * Contract category types */ type ContractCategory = 'core' | 'tokens' | 'testTokens' | 'testAccounts' | 'paymaster' | 'monitoring' | 'official' | 'communities'; /** * Sepolia Testnet Contracts */ declare const SEPOLIA_CONTRACTS: { readonly core: { readonly registry: `0x${string}`; readonly gToken: `0x${string}`; readonly gTokenStaking: `0x${string}`; readonly superPaymaster: `0x${string}`; readonly paymasterFactory: `0x${string}`; readonly aPNTs: `0x${string}`; readonly mySBT: `0x${string}`; readonly paymasterV4: `0x${string}`; readonly dvtValidator: `0x${string}`; readonly entryPoint: `0x${string}`; readonly xPNTsFactory: `0x${string}`; readonly microPaymentChannel: `0x${string}`; readonly agentIdentityRegistry: `0x${string}`; readonly agentReputationRegistry: `0x${string}`; }; readonly tokens: { readonly xPNTsFactory: `0x${string}`; }; readonly testTokens: { readonly mockUSDT: `0x${string}`; readonly aPNTs: `0x${string}`; readonly bPNTs: `0x${string}`; }; readonly testAccounts: { readonly simpleAccountFactory: `0x${string}`; }; readonly paymaster: { readonly paymasterV4_1: `0x${string}`; readonly paymasterV4_1iImplementation: `0x${string}`; }; readonly monitoring: { readonly dvtValidator: `0x${string}`; readonly blsAggregator: `0x${string}`; }; readonly official: { readonly entryPoint: `0x${string}`; }; readonly communities: { /** AAStar Community - Test community for development (registered: 2025-11-01) */ readonly aastar: { readonly owner: "0x411BD567E46C0781248dbB6a9211891C032885e5"; readonly gasToken: `0x${string}`; readonly ensName: "aastar.eth"; readonly name: "AAStar"; readonly stake: "50"; }; /** BreadCommunity - Test community for development (registered: 2025-11-03) */ readonly breadCommunity: { readonly owner: "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"; readonly gasToken: `0x${string}`; readonly ensName: "bread.eth"; readonly name: "BreadCommunity"; readonly stake: "50"; }; }; }; /** * All supported networks */ declare const CONTRACTS: { readonly sepolia: { readonly core: { readonly registry: `0x${string}`; readonly gToken: `0x${string}`; readonly gTokenStaking: `0x${string}`; readonly superPaymaster: `0x${string}`; readonly paymasterFactory: `0x${string}`; readonly aPNTs: `0x${string}`; readonly mySBT: `0x${string}`; readonly paymasterV4: `0x${string}`; readonly dvtValidator: `0x${string}`; readonly entryPoint: `0x${string}`; readonly xPNTsFactory: `0x${string}`; readonly microPaymentChannel: `0x${string}`; readonly agentIdentityRegistry: `0x${string}`; readonly agentReputationRegistry: `0x${string}`; }; readonly tokens: { readonly xPNTsFactory: `0x${string}`; }; readonly testTokens: { readonly mockUSDT: `0x${string}`; readonly aPNTs: `0x${string}`; readonly bPNTs: `0x${string}`; }; readonly testAccounts: { readonly simpleAccountFactory: `0x${string}`; }; readonly paymaster: { readonly paymasterV4_1: `0x${string}`; readonly paymasterV4_1iImplementation: `0x${string}`; }; readonly monitoring: { readonly dvtValidator: `0x${string}`; readonly blsAggregator: `0x${string}`; }; readonly official: { readonly entryPoint: `0x${string}`; }; readonly communities: { /** AAStar Community - Test community for development (registered: 2025-11-01) */ readonly aastar: { readonly owner: "0x411BD567E46C0781248dbB6a9211891C032885e5"; readonly gasToken: `0x${string}`; readonly ensName: "aastar.eth"; readonly name: "AAStar"; readonly stake: "50"; }; /** BreadCommunity - Test community for development (registered: 2025-11-03) */ readonly breadCommunity: { readonly owner: "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"; readonly gasToken: `0x${string}`; readonly ensName: "bread.eth"; readonly name: "BreadCommunity"; readonly stake: "50"; }; }; }; }; /** * Supported network types for contracts */ type ContractNetwork = keyof typeof CONTRACTS; /** * Contract addresses for a specific network */ type NetworkContracts = typeof SEPOLIA_CONTRACTS; /** * Get all contracts for a specific network * * @param network - Network name (e.g., 'sepolia') * @returns All contract addresses for the network * * @example * ```ts * const contracts = getContracts('sepolia'); * console.log(contracts.core.superPaymaster); * ``` */ declare function getContracts(network: ContractNetwork): NetworkContracts; /** * Get a specific contract address * * @param network - Network name * @param category - Contract category * @param name - Contract name * @returns Contract address * * @example * ```ts * const address = getContract('sepolia', 'core', 'superPaymaster'); * ``` */ declare function getContract(network: ContractNetwork, category: ContractCategory, name: string): string; /** * Get core system contracts * * @param network - Network name * @returns Core contract addresses * * @example * ```ts * const core = getCoreContracts('sepolia'); * console.log(core.superPaymaster); * console.log(core.registry); * ``` */ declare function getCoreContracts(network: ContractNetwork): { readonly registry: `0x${string}`; readonly gToken: `0x${string}`; readonly gTokenStaking: `0x${string}`; readonly superPaymaster: `0x${string}`; readonly paymasterFactory: `0x${string}`; readonly aPNTs: `0x${string}`; readonly mySBT: `0x${string}`; readonly paymasterV4: `0x${string}`; readonly dvtValidator: `0x${string}`; readonly entryPoint: `0x${string}`; readonly xPNTsFactory: `0x${string}`; readonly microPaymentChannel: `0x${string}`; readonly agentIdentityRegistry: `0x${string}`; readonly agentReputationRegistry: `0x${string}`; }; /** * Get token system contracts * * @param network - Network name * @returns Token contract addresses * * @example * ```ts * const tokens = getTokenContracts('sepolia'); * console.log(tokens.xPNTsFactory); * console.log(tokens.mySBT); * ``` */ declare function getTokenContracts(network: ContractNetwork): { readonly xPNTsFactory: `0x${string}`; }; /** * Get test token contracts (for development & testing) * * @param network - Network name * @returns Test token contract addresses * * @example * ```ts * const testTokens = getTestTokenContracts('sepolia'); * console.log(testTokens.mockUSDT); * ``` */ declare function getTestTokenContracts(network: ContractNetwork): { readonly mockUSDT: `0x${string}`; readonly aPNTs: `0x${string}`; readonly bPNTs: `0x${string}`; }; /** * Get PaymasterV4_1 address (AOA mode) * * @param network - Network name * @returns PaymasterV4_1 address * * @example * ```ts * const paymaster = getPaymasterV4_1('sepolia'); * ``` */ declare function getPaymasterV4_1(network: ContractNetwork): string; /** * Get test account contracts (SimpleAccountFactory, etc.) * * @param network - Network name * @returns Test account contract addresses * * @example * ```ts * const testAccounts = getTestAccounts('sepolia'); * console.log(testAccounts.simpleAccountFactory); * ``` */ declare function getTestAccounts(network: ContractNetwork): { readonly simpleAccountFactory: `0x${string}`; }; /** * Get SimpleAccountFactory address * * @param network - Network name * @returns SimpleAccountFactory address * * @example * ```ts * const factory = getSimpleAccountFactory('sepolia'); * ``` */ declare function getSimpleAccountFactory(network: ContractNetwork): string; /** * Get SuperPaymaster V2 address (AOA+ mode) * * @param network - Network name * @returns SuperPaymaster V2 address * * @example * ```ts * const superPaymaster = getSuperPaymasterV2('sepolia'); * ``` */ declare function getSuperPaymasterV2(network: ContractNetwork): string; /** * Get EntryPoint v0.7 address * * @param network - Network name * @returns EntryPoint address * * @example * ```ts * const entryPoint = getEntryPoint('sepolia'); * ``` */ declare function getEntryPoint(network: ContractNetwork): string; /** * Check if a network is supported for contracts * * @param network - Network name to check * @returns True if network is supported * * @example * ```ts * if (isContractNetworkSupported('sepolia')) { * const contracts = getContracts('sepolia'); * } * ``` */ declare function isContractNetworkSupported(network: string): network is ContractNetwork; /** * Get all supported contract network names * * @returns Array of supported network names * * @example * ```ts * const networks = getContractNetworks(); * // ['sepolia'] * ``` */ declare function getContractNetworks(): ContractNetwork[]; /** * Contract deployment metadata */ declare const CONTRACT_METADATA: { readonly sepolia: { readonly lastUpdated: "2025-11-02"; readonly networkId: 11155111; readonly deploymentDates: { readonly gToken: "2025-11-01"; readonly superPaymaster: "2025-11-01"; readonly registry: "2025-11-02"; readonly gTokenStaking: "2025-11-01"; readonly xPNTsFactory: "2025-11-01"; readonly mySBT: "2025-11-01"; readonly paymasterV4_1: "2025-10-15"; readonly aPNTs: "2025-10-30"; readonly paymasterFactory: "2025-11-01"; readonly dvtValidator: "2025-11-01"; readonly blsAggregator: "2025-11-01"; }; }; }; /** * Get contract deployment date * * @param network - Network name * @param contractName - Contract name * @returns Deployment date string (YYYY-MM-DD) * * @example * ```ts * const date = getDeploymentDate('sepolia', 'superPaymaster'); * // '2025-10-25' * ``` */ declare function getDeploymentDate(network: ContractNetwork, contractName: string): string | undefined; /** * Get registered communities * * @param network - Network name * @returns Communities object * * @example * ```ts * const communities = getCommunities('sepolia'); * console.log(communities.aastar.owner); * ``` */ declare function getCommunities(network: ContractNetwork): { /** AAStar Community - Test community for development (registered: 2025-11-01) */ readonly aastar: { readonly owner: "0x411BD567E46C0781248dbB6a9211891C032885e5"; readonly gasToken: `0x${string}`; readonly ensName: "aastar.eth"; readonly name: "AAStar"; readonly stake: "50"; }; /** BreadCommunity - Test community for development (registered: 2025-11-03) */ readonly breadCommunity: { readonly owner: "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"; readonly gasToken: `0x${string}`; readonly ensName: "bread.eth"; readonly name: "BreadCommunity"; readonly stake: "50"; }; }; /** * Get a specific community * * @param network - Network name * @param communityName - Community name (aastar, builderDao) * @returns Community information * * @example * ```ts * const aastar = getCommunity('sepolia', 'aastar'); * console.log(aastar.gasToken); // aPNTs address * ``` */ declare function getCommunity(network: ContractNetwork, communityName: 'aastar' | 'breadCommunity'): { readonly owner: "0x411BD567E46C0781248dbB6a9211891C032885e5"; readonly gasToken: `0x${string}`; readonly ensName: "aastar.eth"; readonly name: "AAStar"; readonly stake: "50"; } | { readonly owner: "0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"; readonly gasToken: `0x${string}`; readonly ensName: "bread.eth"; readonly name: "BreadCommunity"; readonly stake: "50"; }; /** * AAstar V2 Contract Versions * * IMPORTANT: Contract addresses are defined in contract-addresses.ts * This file imports and uses those addresses to maintain a single source of truth. * * All V2 contracts implement the VERSION interface: * - VERSION: string (e.g., "2.0.0") * - VERSION_CODE: uint256 (e.g., 20000) * * Last Updated: 2025-11-01 */ /** * Contract version information */ interface ContractVersion { /** Contract name */ name: string; /** Semantic version string (e.g., "2.0.0") */ version: string; /** Numeric version code (e.g., 20000) */ versionCode: number; /** Deployment date (YYYY-MM-DD) */ deployedAt: string; /** Contract address on network */ address: string; /** Key features in this version */ features?: string[]; } /** * V2 Contract Versions on Sepolia */ declare const SEPOLIA_V2_VERSIONS: { readonly core: { readonly gToken: ContractVersion; readonly superPaymaster: ContractVersion; readonly registry: ContractVersion; readonly gTokenStaking: ContractVersion; readonly paymasterFactory: ContractVersion; }; readonly tokens: { readonly xPNTsFactory: ContractVersion; readonly mySBT: ContractVersion; }; readonly testTokens: { readonly aPNTs: ContractVersion; readonly bPNTs: ContractVersion; }; readonly monitoring: { readonly dvtValidator: ContractVersion; readonly blsAggregator: ContractVersion; }; }; /** * Get all V2 contracts with VERSION interface * * @returns 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}`); * } * ``` */ declare function getAllV2Contracts(): ContractVersion[]; /** * Get V2 contract by name * * @param name - Contract name * @returns Contract version info or undefined * * @example * ```ts * const contract = getV2ContractByName('SuperPaymasterV2'); * if (contract) { * console.log(`Version: ${contract.version}`); * } * ``` */ declare function getV2ContractByName(name: string): ContractVersion | undefined; /** * Get V2 contract by address * * @param address - Contract address (case-insensitive) * @returns Contract version info or undefined * * @example * ```ts * const contract = getV2ContractByAddress('0xB97A20aca3D6770Deca299a1aD9DAFb12d1e5eCf'); * if (contract) { * console.log(`Found: ${contract.name} v${contract.version}`); * } * ``` */ declare function getV2ContractByAddress(address: string): ContractVersion | undefined; /** * Check if an address is a V2 contract * * @param address - Contract address to check * @returns True if address is a V2 contract * * @example * ```ts * if (isV2Contract('0xB97A20aca3D6770Deca299a1aD9DAFb12d1e5eCf')) { * console.log('This is a V2 contract with VERSION interface'); * } * ``` */ declare function isV2Contract(address: string): boolean; /** * Get all V2 contracts deployed on a specific date * * @param date - Deployment date (YYYY-MM-DD) * @returns 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`); * ``` */ declare function getV2ContractsByDate(date: string): ContractVersion[]; /** * V2 Contract Summary */ declare const V2_SUMMARY: { readonly totalContracts: 11; readonly categories: { readonly core: 5; readonly tokens: 2; readonly testTokens: 2; readonly monitoring: 2; }; readonly latestDeployment: "2025-11-09"; readonly allContractsHaveVersion: true; }; /** * Blockchain Network Configuration */ declare const NETWORKS: { readonly sepolia: { readonly chainId: 11155111; readonly name: "Sepolia"; readonly rpcUrl: "https://rpc.sepolia.org"; readonly blockExplorer: "https://sepolia.etherscan.io"; readonly nativeCurrency: { readonly name: "Sepolia ETH"; readonly symbol: "ETH"; readonly decimals: 18; }; }; readonly anvil: { readonly chainId: 31337; readonly name: "Anvil"; readonly rpcUrl: "http://127.0.0.1:8545"; readonly blockExplorer: ""; readonly nativeCurrency: { readonly name: "ETH"; readonly symbol: "ETH"; readonly decimals: 18; }; }; readonly optimism: { readonly chainId: 10; readonly name: "Optimism"; readonly rpcUrl: "https://mainnet.optimism.io"; readonly blockExplorer: "https://optimistic.etherscan.io"; readonly nativeCurrency: { readonly name: "Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; }; readonly 'op-sepolia': { readonly chainId: 11155420; readonly name: "Optimism Sepolia"; readonly rpcUrl: "https://sepolia.optimism.io"; readonly blockExplorer: "https://sepolia-optimism.etherscan.io"; readonly nativeCurrency: { readonly name: "Sepolia Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; }; }; type SupportedNetwork = keyof typeof NETWORKS; /** * Get network configuration * * @param network - Network name * @returns Network configuration * * @example * ```ts * const network = getNetwork('sepolia'); * console.log(network.chainId); // 11155111 * ``` */ declare function getNetwork(network: SupportedNetwork): { readonly chainId: 11155111; readonly name: "Sepolia"; readonly rpcUrl: "https://rpc.sepolia.org"; readonly blockExplorer: "https://sepolia.etherscan.io"; readonly nativeCurrency: { readonly name: "Sepolia ETH"; readonly symbol: "ETH"; readonly decimals: 18; }; } | { readonly chainId: 31337; readonly name: "Anvil"; readonly rpcUrl: "http://127.0.0.1:8545"; readonly blockExplorer: ""; readonly nativeCurrency: { readonly name: "ETH"; readonly symbol: "ETH"; readonly decimals: 18; }; } | { readonly chainId: 10; readonly name: "Optimism"; readonly rpcUrl: "https://mainnet.optimism.io"; readonly blockExplorer: "https://optimistic.etherscan.io"; readonly nativeCurrency: { readonly name: "Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; } | { readonly chainId: 11155420; readonly name: "Optimism Sepolia"; readonly rpcUrl: "https://sepolia.optimism.io"; readonly blockExplorer: "https://sepolia-optimism.etherscan.io"; readonly nativeCurrency: { readonly name: "Sepolia Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; }; /** * Get RPC URL for a network * * @param network - Network name * @returns Public RPC URL * * @example * ```ts * const rpcUrl = getRpcUrl('sepolia'); * ``` */ declare function getRpcUrl(network: SupportedNetwork): "https://rpc.sepolia.org" | "http://127.0.0.1:8545" | "https://mainnet.optimism.io" | "https://sepolia.optimism.io"; /** * Get block explorer URL * * @param network - Network name * @returns Block explorer base URL * * @example * ```ts * const explorer = getBlockExplorer('sepolia'); * // 'https://sepolia.etherscan.io' * ``` */ declare function getBlockExplorer(network: SupportedNetwork): "" | "https://sepolia.etherscan.io" | "https://optimistic.etherscan.io" | "https://sepolia-optimism.etherscan.io"; /** * Get transaction URL on block explorer * * @param network - Network name * @param txHash - Transaction hash * @returns Full transaction URL * * @example * ```ts * const url = getTxUrl('sepolia', '0x123...'); * // 'https://sepolia.etherscan.io/tx/0x123...' * ``` */ declare function getTxUrl(network: SupportedNetwork, txHash: string): string; /** * Get address URL on block explorer * * @param network - Network name * @param address - Contract or wallet address * @returns Full address URL * * @example * ```ts * const url = getAddressUrl('sepolia', '0xabc...'); * // 'https://sepolia.etherscan.io/address/0xabc...' * ``` */ declare function getAddressUrl(network: SupportedNetwork, address: string): string; /** * Get chain ID for a network * * @param network - Network name * @returns Chain ID number * * @example * ```ts * const chainId = getChainId('sepolia'); * // 11155111 * ``` */ declare function getChainId(network: SupportedNetwork): number; /** * Contract Addresses (Priority: ENV > Local Config > Canonical Defaults) */ declare let CONTRACT_SRC_HASH: any; declare let REGISTRY_ADDRESS: `0x${string}`; declare let GTOKEN_ADDRESS: `0x${string}`; declare let GTOKEN_STAKING_ADDRESS: `0x${string}`; declare let SBT_ADDRESS: `0x${string}`; declare let REPUTATION_SYSTEM_ADDRESS: `0x${string}`; declare let SUPER_PAYMASTER_ADDRESS: `0x${string}`; declare let PAYMASTER_FACTORY_ADDRESS: `0x${string}`; declare let PAYMASTER_V4_ADDRESS: `0x${string}`; declare let PAYMASTER_V4_IMPL_ADDRESS: `0x${string}`; declare let XPNTS_FACTORY_ADDRESS: `0x${string}`; declare let BLS_AGGREGATOR_ADDRESS: `0x${string}`; declare let BLS_VALIDATOR_ADDRESS: `0x${string}`; declare let DVT_VALIDATOR_ADDRESS: `0x${string}`; declare let ENTRY_POINT_ADDRESS: `0x${string}`; declare let APNTS_ADDRESS: `0x${string}`; declare let MICRO_PAYMENT_CHANNEL_ADDRESS: `0x${string}`; declare let AGENT_IDENTITY_REGISTRY_ADDRESS: `0x${string}`; declare let AGENT_REPUTATION_REGISTRY_ADDRESS: `0x${string}`; /** * Apply external configuration (for Node.js environment) */ declare function applyConfig(newConfig: any): void; /** * Common Constants */ declare const FAUCET_API_URL = "https://faucet-aastar.vercel.app"; declare const SERVICE_FEE_RATE = 200; declare const MAX_SERVICE_FEE = 1000; declare const BPS_DENOMINATOR = 10000; declare const DEFAULT_GAS_TOKEN_MINT_AMOUNT = "100"; declare const DEFAULT_USDT_MINT_AMOUNT = "10"; declare const TEST_ACCOUNT_POOL_SIZE = 20; declare const NODE_STAKE_AMOUNTS: { readonly LITE: 30; readonly STANDARD: 100; readonly SUPER: 300; readonly ENTERPRISE: 1000; }; declare const DEFAULT_APNTS_PRICE_USD = "0.02"; declare const CHAIN_SEPOLIA = 11155111; declare const CHAIN_MAINNET = 1; declare const DEFAULT_TOKEN_SYMBOL = "GT"; declare const DEFAULT_TOKEN_NAME = "Governance Token"; declare const DEFAULT_VERIFICATION_GAS_LIMIT = 200000n; declare const DEFAULT_CALL_GAS_LIMIT = 100000n; declare const DEFAULT_PRE_VERIFICATION_GAS = 50000n; declare const DEFAULT_TIMEOUT_MS = 30000; /** * Community Configurations * Registry v2.2.0 deployed on 2025-11-08 */ declare enum NodeType { PAYMASTER_AOA = 0,// AOA independent Paymaster PAYMASTER_SUPER = 1,// SuperPaymaster v2 shared mode ANODE = 2,// Community computation node KMS = 3 } interface CommunityConfig { name: string; ensName: string; address: string; xPNTsToken: string; supportedSBTs: string[]; nodeType: NodeType; isActive: boolean; allowPermissionlessMint: boolean; stakedAmount: string; registeredAt: number; } /** * AAstar Community * - SuperPaymaster shared mode (AOA+) * - Uses aPNTs for gas payments * - MySBT for identity verification */ declare const AASTAR_COMMUNITY: CommunityConfig; /** * Bread Community * - Independent AOA Paymaster mode * - Uses bPNTs for gas payments * - MySBT for identity verification */ declare const BREAD_COMMUNITY: CommunityConfig; /** * All communities indexed by address */ declare const COMMUNITIES: Record; /** * Get community configuration by address */ declare function getCommunityConfig(address: string): CommunityConfig | undefined; /** * Get all community configurations */ declare function getAllCommunityConfigs(): CommunityConfig[]; /** * Check if address is a registered community */ declare function isRegisteredCommunity(address: string): boolean; /** * Smart Contract ABIs (Unified Naming) * * 命名策略: * - 文件名:统一无版本号(如 BLSAggregator.json) * - 版本信息:通过 ABI 中的 version() 函数获取 * - 同步时自动去除版本号后缀(V3 等) */ declare const RegistryABI: any; declare const RegistryArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; outputs: never[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; indexed: boolean; internalType: string; components?: undefined; } | { name: string; type: string; indexed: boolean; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const LivenessRegistryABI: any; declare const LivenessRegistryArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const GTokenABI: any; declare const GTokenArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const GTokenAuthorizationABI: any; declare const GTokenAuthorizationArtifact: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; declare const GTokenStakingABI: any; declare const GTokenStakingArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const SuperPaymasterABI: any; declare const SuperPaymasterArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const PaymasterFactoryABI: any; declare const PaymasterFactoryArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const AAStarGlobalGuardABI: any; declare const RailgunParserABI: any; declare const UniswapV3ParserABI: any; declare const PaymasterABI: any; declare const PaymasterArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; stateMutability: string; inputs?: undefined; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const EntryPointABI: any; declare const EntryPointArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; stateMutability: string; inputs?: undefined; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const SimpleAccountABI: any; declare const SimpleAccountArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; stateMutability: string; inputs?: undefined; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const SimpleAccountFactoryABI: any; declare const SimpleAccountFactoryArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; })[]; bytecode: string; }; declare const AAStarAirAccountV7ABI: any; declare const AAStarAirAccountV7Artifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; stateMutability: string; inputs?: undefined; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; })[]; outputs: never[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: never[]; outputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; indexed: boolean; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; indexed: boolean; internalType: string; components?: undefined; })[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const xPNTsTokenABI: any; declare const xPNTsTokenArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const xPNTsFactoryABI: any; declare const xPNTsFactoryArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const MySBTABI: any; declare const MySBTArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const MicroPaymentChannelABI: any; declare const MicroPaymentChannelArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const ReputationSystemABI: any; declare const ReputationSystemArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const DVTValidatorABI: any; declare const DVTValidatorArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const BLSAggregatorABI: any; declare const BLSAggregatorArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; outputs: never[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const BLSValidatorABI: any; declare const BLSValidatorArtifact: { abi: { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; }[]; bytecode: string; }; declare const PolicyRegistryABI: any; declare const PolicyRegistryArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; outputs: never[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const TimelockControllerABI: any; declare const X402FacilitatorABI: any; declare const X402FacilitatorArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; bytecode: string; }; declare const AAStarAirAccountFactoryV7ABI: any; declare const AAStarAirAccountFactoryV7Artifact: { abi: ({ type: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const AgentRegistryABI: any; declare const AgentRegistryArtifact: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; declare const SessionKeyValidatorABI: any; declare const SessionKeyValidatorArtifact: ({ type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components?: undefined; } | { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; indexed: boolean; internalType: string; components?: undefined; } | { name: string; type: string; indexed: boolean; internalType: string; components: { name: string; type: string; internalType: string; }[]; })[]; anonymous: boolean; outputs?: undefined; stateMutability?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs?: undefined; stateMutability?: undefined; anonymous?: undefined; })[]; declare const ForceExitModuleABI: any; declare const ForceExitModuleArtifact: ({ type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; outputs?: undefined; stateMutability?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs?: undefined; stateMutability?: undefined; anonymous?: undefined; })[]; declare const AirAccountDelegateABI: any; declare const AirAccountDelegateArtifact: ({ type: string; stateMutability: string; name?: undefined; inputs?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; declare const AAStarValidatorABI: any; declare const AAStarValidatorArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const AAStarBLSAlgorithmABI: any; declare const AAStarCommitteeValidatorABI: any; declare const AAStarCommitteeValidatorArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; })[]; }; declare const AAStarBLSAlgorithmArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; })[]; }; declare const AAStarBLSAggregatorABI: any; declare const AAStarBLSAggregatorArtifact: { abi: ({ type: string; inputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; name?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; } | { type: string; name: string; inputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; outputs: never[]; stateMutability: string; } | { type: string; name: string; inputs: never[]; stateMutability?: undefined; outputs?: undefined; })[]; }; declare const CalldataParserRegistryABI: any; declare const CalldataParserRegistryArtifact: { abi: ({ type: string; inputs: never[]; stateMutability: string; name?: undefined; outputs?: undefined; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; indexed: boolean; internalType: string; }[]; anonymous: boolean; stateMutability?: undefined; outputs?: undefined; } | { type: string; name: string; inputs: never[]; stateMutability?: undefined; outputs?: undefined; anonymous?: undefined; })[]; }; declare const AirAccountExtensionABI: any; declare const AirAccountExtensionArtifact: { abi: ({ type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs: { name: string; type: string; internalType: string; }[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: never[]; outputs: ({ name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; internalType: string; components?: undefined; })[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; components: { name: string; type: string; internalType: string; }[]; }[]; outputs: never[]; stateMutability: string; anonymous?: undefined; } | { type: string; name: string; inputs: ({ name: string; type: string; indexed: boolean; internalType: string; components: { name: string; type: string; internalType: string; }[]; } | { name: string; type: string; indexed: boolean; internalType: string; components?: undefined; })[]; anonymous: boolean; outputs?: undefined; stateMutability?: undefined; } | { type: string; name: string; inputs: { name: string; type: string; internalType: string; }[]; outputs?: undefined; stateMutability?: undefined; anonymous?: undefined; })[]; }; declare const ERC20ABI: any; declare const SaleContractV2ABI: any; declare const APNTsSaleContractABI: any; declare const BuyHelperABI: any; /** * Creates a standard AAStar public client for any given chain. */ declare function createAAStarPublicClient(rpcUrl: string, chain?: Chain): PublicClient; interface UserOperationV07 { sender: Address; nonce: bigint; initCode: Hex; callData: Hex; accountGasLimits: Hex; preVerificationGas: bigint; gasFees: Hex; paymasterAndData: Hex; signature: Hex; } interface BundlerResponse { jsonrpc: '2.0'; id: number; result?: T; error?: { code: number; message: string; data?: any; }; } /** * BundlerClient * Low-level JSON-RPC client for ERC-4337 Bundlers. */ declare class BundlerClient { readonly url: string; readonly entryPoint: Address; constructor(url: string, entryPoint: Address); /** * Standard JSON-RPC call helper */ private rpcCall; /** * Exponential Backoff with Jitter */ private executeWithRetry; /** * eth_sendUserOperation */ sendUserOperation(userOp: UserOperationV07): Promise; /** * eth_estimateUserOperationGas */ estimateUserOperationGas(userOp: Partial): Promise; /** * eth_getUserOperationReceipt (v0.7 support prep) */ getUserOperationReceipt(hash: Hex): Promise; /** * eth_getUserOperationByHash */ getUserOperationByHash(hash: Hex): Promise; } /** The `roleData` payload a ROLE_COMMUNITY registration must carry (abi-encoded into the bytes). */ interface CommunityRoleData { name: string; ensName?: string; website?: string; description?: string; logoURI?: string; /** GToken to lock for the COMMUNITY role (must match the amount actually staked). */ stakeAmount: bigint; } /** * Encode the `roleData` bytes for `registerRole(ROLE_COMMUNITY, user, roleData)`. * * The deployed Registry abi-decodes `roleData` into its `CommunityRoleData` struct, so passing `'0x'` * (empty) makes that decode revert with NO reason — the bare `execution reverted` seen when a funded * EOA tries to self-register (aastar-sdk#169). Always build the bytes with this helper. */ declare function encodeCommunityRoleData(data: CommunityRoleData): Hex; type RoleConfigDetailed = { minStake: bigint; ticketPrice: bigint; slashThreshold: number; slashBase: number; slashInc: number; slashMax: number; exitFeePercent: number; isActive: boolean; minExitFee: bigint; description: string; owner: Address; roleLockDuration: bigint; }; /** * 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. */ type CommunityProfile = { name: string; ensName: string; website: string; description: string; logoURI: string; stakeAmount: bigint; /** burnAmount from the RoleRegistered event. */ burnAmount: bigint; /** Block timestamp recorded in the RoleRegistered event. */ registeredAt: bigint; /** Transaction hash that registered the community (calldata source). */ txHash: Hash; /** Raw ABI-encoded roleData bytes from the registration calldata. */ rawRoleData: Hex; }; type RegistryActions = { configureRole: (args: { roleId: Hex; config: RoleConfigDetailed; account?: Account | Address; }) => Promise; syncExitFees: (args: { roles: Hex[]; account?: Account | Address; }) => Promise; /** @deprecated The deployed Registry ABI has no `createNewRole` — this wrapper now calls `configureRole(roleId, config)` with `roleOwner` merged into `config.owner`. Prefer {@link configureRole}. */ createNewRole: (args: { roleId: Hex; config: RoleConfigDetailed; roleOwner: Address; account?: Account | Address; }) => Promise; registerRole: (args: { roleId: Hex; user: Address; data: Hex; account?: Account | Address; }) => Promise; /** @deprecated The deployed Registry ABI has no `registerRoleSelf` — this wrapper now calls `registerRole(roleId, , data)` deriving the caller from `account`. Prefer {@link registerRole}. */ registerRoleSelf: (args: { roleId: Hex; data: Hex; account?: Account | Address; }) => Promise; safeMintForRole: (args: { roleId: Hex; user: Address; data: Hex; account?: Account | Address; }) => Promise; hasRole: (args: { roleId: Hex; user: Address; }) => Promise; getRoleConfig: (args: { roleId: Hex; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — `roleLockDuration` is now a field of the role config. Throws {@link ErrorCode.NOT_IMPLEMENTED}; set it via {@link configureRole} (config.roleLockDuration). */ setRoleLockDuration: (args: { roleId: Hex; duration: bigint; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — the role owner is now a field of the role config. Throws {@link ErrorCode.NOT_IMPLEMENTED}; set it via {@link configureRole} (config.owner). */ setRoleOwner: (args: { roleId: Hex; newOwner: Address; account?: Account | Address; }) => Promise; exitRole: (args: { roleId: Hex; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — there is no per-user role-metadata getter. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link getCommunityProfile} (event back-trace) for a community's roleData or {@link getRoleConfig} for role config. */ roleMetadata: (args: { roleId: Hex; user: Address; }) => Promise; /** @deprecated The deployed v5 Registry ABI has no `communityByName` function — use {@link getCommunityByName}. This wrapper now delegates to `getCommunityByName` so it no longer reverts on-chain. */ communityByName: (args: { name: string; }) => Promise
; /** @deprecated The deployed v5 Registry ABI has no `communityByENS` function — use {@link getCommunityByENS}. This wrapper now delegates to `getCommunityByENS` so it no longer reverts on-chain. */ communityByENS: (args: { ensName: string; }) => Promise
; getCommunityByName: (args: { name: string; }) => Promise
; getCommunityByENS: (args: { ensName: string; }) => Promise
; getRoleStake: (args: { roleId: Hex; user: Address; }) => Promise; getEffectiveStake: (args: { user: Address; roleId: Hex; }) => Promise; getCommunityProfile: (args: { community: Address; fromBlock?: BlockNumber | BlockTag; toBlock?: BlockNumber | BlockTag; }) => Promise; getCreditLimit: (args: { user: Address; }) => Promise; globalReputation: (args: { user: Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — there is no append-one `addLevelThreshold` (only the replace-all {@link setLevelThresholds}). Throws {@link ErrorCode.NOT_IMPLEMENTED}; read {@link levelThresholds}, append, and call {@link setLevelThresholds}. */ addLevelThreshold: (args: { threshold: bigint; account?: Account | Address; }) => Promise; batchUpdateGlobalReputation: (args: { proposalId: bigint; users: Address[]; newScores: bigint[]; epoch: bigint; proof: Hex; account?: Account | Address; }) => Promise; /** Set the credit limit for a reputation level/tier (owner-gated). ABI: setCreditTier(uint256 level, uint256 limit). */ setCreditTier: (args: { level: bigint; limit: bigint; account?: Account | Address; }) => Promise; /** Replace the full reputation level-threshold array (owner-gated). ABI: setLevelThresholds(uint256[] thresholds). */ setLevelThresholds: (args: { thresholds: bigint[]; account?: Account | Address; }) => Promise; /** * Update an operator's per-user blacklist in batch with a proof. * ABI: updateOperatorBlacklist(address operator, address[] users, bool[] statuses, bytes proof). */ updateOperatorBlacklist: (args: { operator: Address; users: Address[]; statuses: boolean[]; proof: Hex; account?: Account | Address; }) => Promise; /** Sync a user's role stake from the GTokenStaking contract (staking-gated). ABI: syncStakeFromStaking(address user, bytes32 roleId, uint256 newAmount). */ syncStakeFromStaking: (args: { user: Address; roleId: Hex; newAmount: bigint; account?: Account | Address; }) => Promise; /** Monotonic nonce bumped on each operator-blacklist update (view). ABI: blacklistNonce() -> uint256. */ blacklistNonce: () => Promise; setBLSAggregator: (args: { aggregator: Address; account?: Account | Address; }) => Promise; setMySBT: (args: { sbt: Address; account?: Account | Address; }) => Promise; setSuperPaymaster: (args: { paymaster: Address; account?: Account | Address; }) => Promise; setStaking: (args: { staking: Address; account?: Account | Address; }) => Promise; setReputationSource: (args: { source: Address; account?: Account | Address; }) => Promise; blsAggregator: () => Promise
; MYSBT: () => Promise
; SUPER_PAYMASTER: () => Promise
; GTOKEN_STAKING: () => Promise
; /** @deprecated Removed in the v5.x contract refactor — there is no single-address `reputationSource` getter (sources are now a set). Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link isReputationSource}({ source }) to test membership. */ reputationSource: () => Promise
; isReputationSource: (args: { source: Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — not in the deployed Registry ABI. Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ lastReputationEpoch: (args: { user: Address; }) => Promise; /** @deprecated The deployed Registry ABI has no `roleConfigs` mapping getter — this wrapper now reads the ABI-confirmed `getRoleConfig(roleId)`. Prefer {@link getRoleConfig}. */ roleConfigs: (args: { roleId: Hex; }) => Promise; getRoleUserCount: (args: { roleId: Hex; }) => Promise; /** * 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). */ getRoleMembers: (args: { roleId: Hex; fromBlock?: BlockNumber | BlockTag; toBlock?: BlockNumber | BlockTag; }) => Promise; /** * Count of active members for a role, derived from the same event indexing as * {@link getRoleMembers} (i.e. `getRoleMembers(...).length`). * * NOTE: this differs from {@link 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 * {@link getRoleMembers} — prefer `getRoleUserCount` for an authoritative count. */ getRoleMemberCount: (args: { roleId: Hex; fromBlock?: BlockNumber | BlockTag; toBlock?: BlockNumber | BlockTag; }) => Promise; getUserRoles: (args: { user: Address; }) => Promise; /** @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 {@link ErrorCode.NOT_IMPLEMENTED}; use {@link getRoleMembers} (event-derived) instead. */ roleMembers: (args: { roleId: Hex; index: bigint; }) => Promise
; /** @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 {@link getUserRoles}. */ userRoles: (args: { user: Address; index: bigint; }) => Promise; /** @deprecated The deployed Registry ABI has no `userRoleCount` — this wrapper now returns `getUserRoles(user).length`. Prefer {@link getUserRoles}. (NOTE: distinct from {@link getRoleUserCount}, which counts users of a role.) */ userRoleCount: (args: { user: Address; }) => Promise; creditTierConfig: (args: { tierIndex: bigint; }) => Promise; levelThresholds: (args: { levelIndex: bigint; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — Registry has no exit-fee calculator. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use the GTokenStaking `previewExitFee({ user, roleId })` action instead. */ calculateExitFee: (args: { roleId: Hex; amount: bigint; }) => Promise; /** @deprecated The deployed Registry ABI has no `roleStakes` mapping getter — this wrapper now reads the ABI-confirmed `getRoleStake(roleId, user)`. Prefer {@link getRoleStake}. */ roleStakes: (args: { roleId: Hex; user: Address; }) => Promise; ROLE_COMMUNITY: () => Promise; ROLE_ENDUSER: () => Promise; ROLE_PAYMASTER_SUPER: () => Promise; ROLE_PAYMASTER_AOA: () => Promise; ROLE_DVT: () => Promise; ROLE_KMS: () => Promise; ROLE_ANODE: () => Promise; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — the Registry dropped the OZ AccessControl surface (no `grantRole`). Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link registerRole} to add a user to a role. */ grantRole: (args: { roleId: Hex; user: Address; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — the Registry has no admin `revokeRole` (only the caller can self-exit). Throws {@link ErrorCode.NOT_IMPLEMENTED}; a user removes their own role via {@link exitRole}. */ revokeRole: (args: { roleId: Hex; user: Address; account?: Account | Address; }) => Promise; version: () => Promise; }; declare const registryActions: (address: Address) => (client: PublicClient$1 | WalletClient) => RegistryActions; type StakingActions = { /** @deprecated `lockStake` is absent from the deployed ABI (reverts on-chain); use {@link lockStakeWithTicket}. */ lockStake: (args: { user: Address; roleId: Hex; stakeAmount: bigint; ticketPrice: bigint; payer: Address; account?: Account | Address; }) => Promise; /** * 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. */ lockStakeWithTicket: (args: { user: Address; roleId: Hex; stakeAmount: bigint; ticketPrice: bigint; payer: Address; account?: Account | Address; }) => Promise; topUpStake: (args: { user: Address; roleId: Hex; stakeAmount: bigint; payer: Address; account?: Account | Address; }) => Promise; unlockStake: (args: { user: Address; roleId: Hex; account?: Account | Address; }) => Promise; unlockAndTransfer: (args: { user: Address; roleId: Hex; account?: Account | Address; }) => Promise; slash: (args: { user: Address; amount: bigint; reason: string; account?: Account | Address; }) => Promise; slashByDVT: (args: { operator: Address; roleId: Hex; penaltyAmount: bigint; reason: string; account?: Account | Address; }) => Promise; setAuthorizedSlasher: (args: { slasher: Address; authorized: boolean; account?: Account | Address; }) => Promise; getStakeInfo: (args: { operator: Address; roleId: Hex; }) => Promise<{ amount: bigint; slashedAmount: bigint; stakedAt: bigint; unstakeRequestedAt: bigint; }>; getStakingBalance: (args: { user: Address; }) => Promise; getLockedStake: (args: { user: Address; roleId: Hex; }) => Promise; getUserRoleLocks: (args: { user: Address; }) => Promise>; hasRoleLock: (args: { user: Address; roleId: Hex; }) => Promise; availableBalance: (args: { user: Address; }) => Promise; previewExitFee: (args: { user: Address; roleId: Hex; }) => Promise<{ fee: bigint; netAmount: bigint; }>; /** @deprecated Removed in the v5.x contract refactor — `setRegistry` is absent from the deployed GTokenStaking ABI (REGISTRY is immutable, set at construction). Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ setRegistry: (args: { registry: Address; account?: Account | Address; }) => Promise; setRoleExitFee: (args: { roleId: Hex; feePercent: bigint; minFee: bigint; account?: Account | Address; }) => Promise; setTreasury: (args: { treasury: Address; account?: Account | Address; }) => Promise; stakes: (args: { user: Address; }) => Promise<{ amount: bigint; slashedAmount: bigint; stakedAt: bigint; unstakeRequestedAt: bigint; }>; roleLocks: (args: { user: Address; roleId: Hex; }) => Promise<{ amount: bigint; entryBurn: bigint; lockedAt: number; roleId: Hex; metadata: Hex; }>; roleExitConfigs: (args: { roleId: Hex; }) => Promise<{ feePercent: bigint; minFee: bigint; }>; userActiveRoles: (args: { user: Address; index: bigint; }) => Promise; authorizedSlashers: (args: { slasher: Address; }) => Promise; totalStaked: () => Promise; getTotalStaked: () => Promise; treasury: () => Promise
; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { account?: Account | Address; }) => Promise; version: () => Promise; REGISTRY: () => Promise
; GTOKEN: () => Promise
; /** Protocol-wide cap on total locked stake (view). ABI: MAX_TOTAL_STAKE() -> uint256. */ MAX_TOTAL_STAKE: () => Promise; }; declare const stakingActions: (address: Address) => (client: PublicClient$1 | WalletClient) => StakingActions; type SBTMembership = { community: Address; joinedAt: bigint; lastActiveTime: bigint; isActive: boolean; metadata: string; }; type SBTData = { holder: Address; firstCommunity: Address; mintedAt: bigint; totalCommunities: bigint; }; /** Per-item outcome of a sequential batch mint. */ type BatchMintResult = { user: Address; ok: boolean; txHash?: Hash; error?: string; }; type SBTActions = { airdropMint: (args: { user: Address; roleId: Hex; roleData: Hex; account?: Account | Address; }) => Promise; mintForRole: (args: { user: Address; roleId: Hex; roleData: Hex; account?: Account | Address; }) => Promise; batchAirdropMint: (args: { items: { user: Address; roleId: Hex; roleData: Hex; }[]; account?: Account | Address; onProgress?: (done: number, total: number, lastResult: BatchMintResult) => void; continueOnError?: boolean; }) => Promise; mintOrAddMembership: (args: { user: Address; roleId: Hex; roleData: Hex; account?: Account | Address; }) => Promise; getUserSBT: (args: { user: Address; }) => Promise; getSBTData: (args: { tokenId: bigint; }) => Promise; getCommunityMembership: (args: { tokenId: bigint; community: Address; }) => Promise; getMemberships: (args: { tokenId: bigint; }) => Promise; getActiveMemberships: (args: { tokenId: bigint; }) => Promise; verifyCommunityMembership: (args: { user: Address; community: Address; }) => Promise; userToSBT: (args: { user: Address; }) => Promise; sbtData: (args: { tokenId: bigint; }) => Promise; membershipIndex: (args: { tokenId: bigint; community: Address; }) => Promise; balanceOf: (args: { owner: Address; }) => Promise; ownerOf: (args: { tokenId: bigint; }) => Promise
; safeTransferFrom: (args: { from: Address; to: Address; tokenId: bigint; data?: Hex; account?: Account | Address; }) => Promise; transferFrom: (args: { from: Address; to: Address; tokenId: bigint; account?: Account | Address; }) => Promise; approve: (args: { to: Address; tokenId: bigint; account?: Account | Address; }) => Promise; setApprovalForAll: (args: { operator: Address; approved: boolean; account?: Account | Address; }) => Promise; getApproved: (args: { tokenId: bigint; }) => Promise
; isApprovedForAll: (args: { owner: Address; operator: Address; }) => Promise; name: () => Promise; symbol: () => Promise; tokenURI: (args: { tokenId: bigint; }) => Promise; nextTokenId: () => Promise; supportsInterface: (args: { interfaceId: Hex; }) => Promise; burnSBT: (args: { user: Address; account?: Account | Address; }) => Promise; setBaseURI: (args: { baseURI: string; account?: Account | Address; }) => Promise; leaveCommunity: (args: { community: Address; account?: Account | Address; }) => Promise; deactivateMembership: (args: { user: Address; community: Address; account?: Account | Address; }) => Promise; deactivateAllMemberships: (args: { user: Address; account?: Account | Address; }) => Promise; recordActivity: (args: { user: Address; account?: Account | Address; }) => Promise; lastActivityTime: (args: { tokenId: bigint; community: Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — MySBT no longer tracks per-week activity (no `weeklyActivity` getter). Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link lastActivityTime} and compare against your week window. */ weeklyActivity: (args: { tokenId: bigint; community: Address; week: bigint; }) => Promise; reputationCalculator: () => Promise
; setReputationCalculator: (args: { calculator: Address; account?: Account | Address; }) => Promise; mintFee: () => Promise; setMintFee: (args: { fee: bigint; account?: Account | Address; }) => Promise; minLockAmount: () => Promise; setMinLockAmount: (args: { amount: bigint; account?: Account | Address; }) => Promise; pause: (args: { account?: Account | Address; }) => Promise; unpause: (args: { account?: Account | Address; }) => Promise; paused: () => Promise; daoMultisig: () => Promise
; setDAOMultisig: (args: { multisig: Address; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — MySBT has no `setRegistry` (REGISTRY is immutable). Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ setRegistry: (args: { registry: Address; account?: Account | Address; }) => Promise; version: () => Promise; REGISTRY: () => Promise
; GTOKEN_STAKING: () => Promise
; GTOKEN: () => Promise
; /** @deprecated MySBT is not Ownable — it is governed by `daoMultisig`. The deployed ABI has no `owner`. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link daoMultisig}. */ owner: () => Promise
; /** @deprecated MySBT is not Ownable — there is no `transferOwnership`. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link setDAOMultisig}. */ transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; /** @deprecated MySBT is not Ownable — there is no `renounceOwnership`. Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ renounceOwnership: (args: { account?: Account | Address; }) => Promise; }; declare const sbtActions: (address: Address) => (client: PublicClient$1 | WalletClient) => SBTActions; type PaymasterActions = { depositFor: (args: { user: Address; token: Address; amount: bigint; account?: Account | Address; }) => Promise; withdraw: (args: { token: Address; amount: bigint; account?: Account | Address; }) => Promise; balances: (args: { user: Address; token: Address; }) => Promise; setTokenPrice: (args: { token: Address; price: bigint; account?: Account | Address; }) => Promise; setCachedPrice: (args: { price: bigint; timestamp: number; account?: Account | Address; }) => Promise; tokenPrices: (args: { token: Address; }) => Promise; validatePaymasterUserOp: (args: { userOp: any; userOpHash: Hex; maxCost: bigint; }) => Promise<{ context: Hex; validationData: bigint; }>; postOp: (args: { mode: number; context: Hex; actualGasCost: bigint; actualUserOpFeePerGas: bigint; account?: Account | Address; }) => Promise; initialize: (args: { _entryPoint: Address; _owner: Address; _treasury: Address; _ethUsdPriceFeed: Address; _serviceFeeRate: bigint; _maxGasCostCap: bigint; _priceStalenessThreshold: bigint; account?: Account | Address; }) => Promise; setTreasury: (args: { treasury: Address; account?: Account | Address; }) => Promise; setServiceFeeRate: (args: { _serviceFeeRate: bigint; account?: Account | Address; }) => Promise; setMaxGasCostCap: (args: { _maxGasCostCap: bigint; account?: Account | Address; }) => Promise; setPriceStalenessThreshold: (args: { _priceStalenessThreshold: bigint; account?: Account | Address; }) => Promise; pause: (args: { account?: Account | Address; }) => Promise; unpause: (args: { account?: Account | Address; }) => Promise; paused: () => Promise; cachedPrice: () => Promise<{ price: bigint; updatedAt: number; }>; updatePrice: (args: { account?: Account | Address; }) => Promise; /** @deprecated The deployed Paymaster ABI has no `getRealtimeTokenCost` — this wrapper now calls `calculateCost(gasCost, token, true)` (realtime mode). Prefer {@link calculateCost}. */ getRealtimeTokenCost: (args: { gasCost: bigint; token: Address; }) => Promise; calculateCost: (args: { gasCost: bigint; token: Address; useRealtime: boolean; }) => Promise; isActiveInRegistry: () => Promise; isRegistrySet: () => Promise; deactivateFromRegistry: (args: { account?: Account | Address; }) => Promise; registry: () => Promise
; ethUsdPriceFeed: () => Promise
; serviceFeeRate: () => Promise; maxGasCostCap: () => Promise; priceStalenessThreshold: () => Promise; treasury: () => Promise
; oracleDecimals: () => Promise; tokenDecimals: (args: { token: Address; }) => Promise; MAX_ETH_USD_PRICE: () => Promise; MIN_ETH_USD_PRICE: () => Promise; MAX_GAS_TOKENS: () => Promise; MAX_SBTS: () => Promise; MAX_SERVICE_FEE: () => Promise; addDeposit: (args: { account?: Account | Address; value?: bigint; }) => Promise; withdrawTo: (args: { to: Address; amount: bigint; account?: Account | Address; }) => Promise; addStake: (args: { unstakeDelaySec: number; account?: Account | Address; value?: bigint; }) => Promise; unlockStake: (args: { account?: Account | Address; }) => Promise; withdrawStake: (args: { to: Address; account?: Account | Address; }) => Promise; entryPoint: () => Promise
; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { account?: Account | Address; }) => Promise; version: () => Promise; }; declare const paymasterActions: (address: Address) => (client: PublicClient$1 | WalletClient) => PaymasterActions; type ReputationRule = { baseScore: bigint; activityBonus: bigint; maxBonus: bigint; description: string; }; type ReputationBreakdown = { baseScore: bigint; nftBonus: bigint; activityBonus: bigint; multiplier: bigint; }; type ReputationActions = { /** @deprecated The deployed ReputationSystem ABI has no `setReputationRule` — this wrapper now calls the ABI-confirmed `setRule(ruleId, base, bonus, max, desc)` (the {@link ReputationRule} struct is flattened). Prefer {@link setRule}. */ setReputationRule: (args: { ruleId: Hex; rule: ReputationRule; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — no single-rule getter by ruleId. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link communityRules} (per-community) or {@link defaultRule}. */ getReputationRule: (args: { ruleId: Hex; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — rules have no enable/disable toggle. Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ enableRule: (args: { ruleId: Hex; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — rules have no enable/disable toggle. Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ disableRule: (args: { ruleId: Hex; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — no `isRuleActive(ruleId)` getter (rule activity is per-community). Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link getActiveRules}({ community }) and test membership. */ isRuleActive: (args: { ruleId: Hex; }) => Promise; getActiveRules: (args: { community: Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — no global rule counter. Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ getRuleCount: () => Promise; setRule: (args: { ruleId: Hex; base: bigint; bonus: bigint; max: bigint; desc: string; account?: Account | Address; }) => Promise; communityRules: (args: { community: Address; ruleId: Hex; }) => Promise; communityActiveRules: (args: { community: Address; index: bigint; }) => Promise; defaultRule: () => Promise; computeScore: (args: { user: Address; communities: Address[]; ruleIds: Hex[][]; activities: bigint[][]; }) => Promise; calculateReputation: (args: { user: Address; community: Address; timestamp: bigint; }) => Promise<{ communityScore: bigint; globalScore: bigint; }>; getReputationBreakdown: (args: { user: Address; community: Address; timestamp: bigint; }) => Promise; /** * @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 {@link 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. */ getUserScore: (args: { user: Address; }) => Promise; /** * @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 {@link communityReputations} (per-user community score) or * {@link calculateReputation} (returns `communityScore` for a given user) instead. * This method now throws a descriptive error rather than reverting on-chain. */ getCommunityScore: (args: { community: Address; }) => Promise; communityReputations: (args: { community: Address; user: Address; }) => Promise; setCommunityReputation: (args: { community: Address; user: Address; score: bigint; account?: Account | Address; }) => Promise; setNFTBoost: (args: { collection: Address; boost: bigint; account?: Account | Address; }) => Promise; nftCollectionBoost: (args: { collection: Address; }) => Promise; nftHoldStart: (args: { user: Address; collection: Address; }) => Promise; updateNFTHoldStart: (args: { collection: Address; account?: Account | Address; }) => Promise; boostedCollections: (args: { index: bigint; }) => Promise
; entropyFactors: (args: { community: Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — no `batchUpdateScores`. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link setCommunityReputation} per user or {@link syncToRegistry}. */ batchUpdateScores: (args: { users: Address[]; scores: bigint[]; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — no batch sync variant. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link syncToRegistry} (per-user, with proof). */ batchSyncToRegistry: (args: { users: Address[]; account?: Account | Address; }) => Promise; syncToRegistry: (args: { user: Address; communities: Address[]; ruleIds: Hex[][]; activities: bigint[][]; epoch: bigint; proof: Hex; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — REGISTRY is immutable (no `setRegistry`). Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ setRegistry: (args: { registry: Address; account?: Account | Address; }) => Promise; setEntropyFactor: (args: { community: Address; factor: bigint; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — no no-arg `getEntropyFactor`. Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link entropyFactors}({ community }). */ getEntropyFactor: () => Promise; REGISTRY: () => Promise
; /** Max number of NFT collections that can grant a reputation boost (view). ABI: MAX_BOOSTED_COLLECTIONS() -> uint256. */ MAX_BOOSTED_COLLECTIONS: () => Promise; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { account?: Account | Address; }) => Promise; version: () => Promise; }; declare const reputationActions: (address: Address) => (client: PublicClient$1 | WalletClient) => ReputationActions; type ERC20Actions = { totalSupply: (args: { token: Address; }) => Promise; balanceOf: (args: { token: Address; account: Address; }) => Promise; transfer: (args: { token: Address; to: Address; amount: bigint; account?: Account | Address; }) => Promise; transferFrom: (args: { token: Address; from: Address; to: Address; amount: bigint; account?: Account | Address; }) => Promise; approve: (args: { token: Address; spender: Address; amount: bigint; account?: Account | Address; }) => Promise; allowance: (args: { token: Address; owner: Address; spender: Address; }) => Promise; name: (args: { token: Address; }) => Promise; symbol: (args: { token: Address; }) => Promise; decimals: (args: { token: Address; }) => Promise; }; type GTokenActions = ERC20Actions & { mint: (args: { token: Address; to: Address; amount: bigint; account?: Account | Address; }) => Promise; burn: (args: { token: Address; amount: bigint; account?: Account | Address; }) => Promise; burnFrom: (args: { token: Address; from: Address; amount: bigint; account?: Account | Address; }) => Promise; cap: (args: { token: Address; }) => Promise; remainingMintableSupply: (args: { token: Address; }) => Promise; version: (args: { token: Address; }) => Promise; owner: (args: { token: Address; }) => Promise
; transferOwnership: (args: { token: Address; newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { token: Address; account?: Account | Address; }) => Promise; }; /** * Optional block pin for credibility reads — supports deterministic / historical reads. * Give at most one of `blockNumber` / `blockTag`; omit both to read the latest block. */ type BlockPin = { blockNumber?: bigint; blockTag?: BlockTag; }; /** * Economic-credibility snapshot for a community xPNTs token (CC-33). * * `credibilityScore` is a 0–100 trust score the token contract derives on-chain from * backing vs. issuance. The three `*USD` fields are raw on-chain USD accounting integers * (uint256) in the xPNTsToken contract's own USD unit — treat them as opaque integers for * comparison/ratio; confirm the display decimals against the SuperPaymaster (xPNTsToken) * contract before formatting for humans. They are NOT wei — do not `formatEther`. */ type Credibility = { /** 0–100 trust score (uint8) derived on-chain from backing vs. issuance. */ credibilityScore: number; /** True when circulating (issued) value exceeds backing — the community over-issued its xPNTs. */ isOverIssued: boolean; /** Circulating xPNTs value in the contract's USD accounting unit (raw uint256). */ issuedValueUSD: bigint; /** Backing/collateral value in the contract's USD accounting unit (raw uint256). */ backingValueUSD: bigint; /** Effective issuance cap in the contract's USD accounting unit (raw uint256). */ effectiveCapUSD: bigint; }; type XPNTsTokenActions = ERC20Actions & { mint: (args: { token: Address; to: Address; amount: bigint; account?: Account | Address; }) => Promise; burn: (args: { token: Address; amount: bigint; account?: Account | Address; }) => Promise; burnFrom: (args: { token: Address; from: Address; amount: bigint; account?: Account | Address; }) => Promise; burnFromWithOpHash: (args: { token: Address; from: Address; amount: bigint; userOpHash: Hex; account?: Account | Address; }) => Promise; exchangeRate: (args: { token: Address; }) => Promise; updateExchangeRate: (args: { token: Address; newRate: bigint; account?: Account | Address; }) => Promise; debts: (args: { token: Address; user: Address; }) => Promise; getDebt: (args: { token: Address; user: Address; }) => Promise; recordDebt: (args: { token: Address; user: Address; amountXPNTs: bigint; account?: Account | Address; }) => Promise; repayDebt: (args: { token: Address; amount: bigint; account?: Account | Address; }) => Promise; addAutoApprovedSpender: (args: { token: Address; spender: Address; account?: Account | Address; }) => Promise; removeAutoApprovedSpender: (args: { token: Address; spender: Address; account?: Account | Address; }) => Promise; autoApprovedSpenders: (args: { token: Address; spender: Address; }) => Promise; emergencyRevokePaymaster: (args: { token: Address; account?: Account | Address; }) => Promise; /** @deprecated The deployed xPNTsToken ABI renamed this constant to `MAX_SINGLE_TX_LIMIT_CAP`; this wrapper now reads that. Prefer {@link MAX_SINGLE_TX_LIMIT_CAP}. */ MAX_SINGLE_TX_LIMIT: (args: { token: Address; }) => Promise; needsApproval: (args: { token: Address; owner: Address; spender: Address; amount: bigint; }) => Promise; DOMAIN_SEPARATOR: (args: { token: Address; }) => Promise; nonces: (args: { token: Address; owner: Address; }) => Promise; permit: (args: { token: Address; owner: Address; spender: Address; value: bigint; deadline: bigint; v: number; r: Hex; s: Hex; account?: Account | Address; }) => Promise; eip712Domain: (args: { token: Address; }) => Promise; transferAndCall: (args: { token: Address; to: Address; amount: bigint; data?: Hex; account?: Account | Address; }) => Promise; communityENS: (args: { token: Address; }) => Promise; communityName: (args: { token: Address; }) => Promise; communityOwner: (args: { token: Address; }) => Promise
; getMetadata: (args: { token: Address; }) => Promise<{ name: string; symbol: string; communityName: string; communityENS: string; communityOwner: Address; }>; transferCommunityOwnership: (args: { token: Address; newOwner: Address; account?: Account | Address; }) => Promise; setSuperPaymasterAddress: (args: { token: Address; spAddress: Address; account?: Account | Address; }) => Promise; SUPERPAYMASTER_ADDRESS: (args: { token: Address; }) => Promise
; FACTORY: (args: { token: Address; }) => Promise
; version: (args: { token: Address; }) => Promise; usedOpHashes: (args: { token: Address; opHash: Hex; }) => Promise; /** Set the per-tx burn ceiling. State-changing tx → resolves to a tx `Hash`. */ setMaxSingleTxLimit: (args: { token: Address; newLimit: bigint; account?: Account | Address; }) => Promise; /** Set the per-spender daily burn cap (in whole tokens). State-changing tx → resolves to a tx `Hash`. */ setSpenderDailyCap: (args: { token: Address; newCap: bigint; account?: Account | Address; }) => Promise; /** Set a per-spender daily burn-cap OVERRIDE for a specific spender (admin). State-changing tx → resolves to a tx `Hash`. */ setSpenderDailyCapFor: (args: { token: Address; spender: Address; newCap: bigint; account?: Account | Address; }) => Promise; maxSingleTxLimit: (args: { token: Address; }) => Promise; spenderDailyCapTokens: (args: { token: Address; }) => Promise; /** Read a spender's daily-cap override (0 = no override; the global `spenderDailyCapTokens` applies). */ spenderDailyCapOverride: (args: { token: Address; spender: Address; }) => Promise; spenderRateLimit: (args: { token: Address; spender: Address; }) => Promise<{ dailyBurnTotal: bigint; windowStart: bigint; reserved: bigint; }>; /** * 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. */ recordDebtWithOpHash: (args: { token: Address; user: Address; amountAPNTs: bigint; opHash: Hex; account?: Account | Address; }) => Promise; usedDebtHashes: (args: { token: Address; opHash: Hex; }) => Promise; /** Add an approved facilitator. State-changing tx → resolves to a tx `Hash`. */ addApprovedFacilitator: (args: { token: Address; facilitator: Address; account?: Account | Address; }) => Promise; /** Remove an approved facilitator. State-changing tx → resolves to a tx `Hash`. */ removeApprovedFacilitator: (args: { token: Address; facilitator: Address; account?: Account | Address; }) => Promise; approvedFacilitators: (args: { token: Address; facilitator: Address; }) => Promise; /** Permanently renounce the factory link. State-changing tx → resolves to a tx `Hash`. */ renounceFactory: (args: { token: Address; account?: Account | Address; }) => Promise; /** Clear the emergency-disabled flag. State-changing tx → resolves to a tx `Hash`. */ unsetEmergencyDisabled: (args: { token: Address; account?: Account | Address; }) => Promise; emergencyDisabled: (args: { token: Address; }) => Promise; emergencyRevokedAddress: (args: { token: Address; }) => Promise
; exchangeRateUpdatedAt: (args: { token: Address; }) => Promise; EXCHANGE_RATE_COOLDOWN: (args: { token: Address; }) => Promise; EXCHANGE_RATE_DELTA_BPS: (args: { token: Address; }) => Promise; EXCHANGE_RATE_MAX: (args: { token: Address; }) => Promise; EXCHANGE_RATE_MIN: (args: { token: Address; }) => Promise; MAX_SINGLE_TX_LIMIT_CAP: (args: { token: Address; }) => Promise; /** 0–100 on-chain trust score for a community xPNTs token. */ credibilityScore: (args: { token: Address; } & BlockPin) => Promise; /** True when the community over-issued (circulating value > backing). */ isOverIssued: (args: { token: Address; } & BlockPin) => Promise; issuedValueUSD: (args: { token: Address; } & BlockPin) => Promise; backingValueUSD: (args: { token: Address; } & BlockPin) => Promise; effectiveCapUSD: (args: { token: Address; } & BlockPin) => Promise; /** * One-shot read of the full economic-credibility snapshot ({@link Credibility}) for a * community xPNTs token — the five credibility views batched at a SINGLE block so a * disclosure UI reads a self-consistent snapshot (score can't drift out of sync with the * USD fields). If the caller pins a block via {@link BlockPin}, all five reads use it; * otherwise the current block number is resolved once and all five reads are pinned to it. * Enumerate community tokens via `xPNTsFactoryActions().getAllTokens()` * (or `deployedTokens`/`getDeployedCount`). */ getCredibility: (args: { token: Address; } & BlockPin) => Promise; }; type TokenActions = GTokenActions & XPNTsTokenActions; declare const gTokenActions: (address?: Address) => (client: PublicClient$1 | WalletClient) => GTokenActions; declare const xPNTsTokenActions: (address?: Address) => (client: PublicClient$1 | WalletClient) => XPNTsTokenActions; declare const tokenActions: (address?: Address) => (client: PublicClient$1 | WalletClient) => TokenActions; declare enum EntryPointVersion { V06 = "0.6", V07 = "0.7" } type EntryPointActions = { balanceOf: (args: { account: Address; }) => Promise; depositTo: (args: { account: Address; amount: bigint; txAccount?: Account | Address; }) => Promise; getNonce: (args: { sender: Address; key: bigint; }) => Promise; getDepositInfo: (args: { account: Address; }) => Promise<{ deposit: bigint; staked: boolean; stake: bigint; unstakeDelaySec: number; withdrawTime: number; }>; entryPointAddress: Address; }; declare const entryPointActions: (address: Address) => (client: PublicClient$1 | WalletClient) => EntryPointActions; /** * Interface definitions */ interface ValidationParams { rpcUrl: string; chain: Chain; } interface RoleValidationParams extends ValidationParams { registryAddress: Address; roleId: Hex; userAddress: Address; } interface BalanceValidationParams extends ValidationParams { address: Address; minBalance?: string; } interface TokenBalanceValidationParams extends BalanceValidationParams { tokenAddress: Address; } interface DeploymentValidationParams extends ValidationParams { contractAddress: Address; } interface ValidationResult { valid: boolean; message?: string; data?: any; } interface AccountBalance { address: Address; eth: bigint; gToken: bigint; aPNTs: bigint; xPNTs: bigint; } declare class StateValidator { /** * Create PublicClient helper */ private static createClient; /** * Batch fetch balances for multiple accounts */ static getAccountBalances(params: { rpcUrl: string; chain: Chain; addresses: Address[]; gTokenAddress?: Address; aPNTsAddress?: Address; xPNTsAddress?: Address; }): Promise; /** * Role Validation */ static validateRole(params: RoleValidationParams): Promise; /** * ETH Balance Validation */ static validateETHBalance(params: BalanceValidationParams): Promise; /** * Token Balance Validation */ static validateTokenBalance(params: TokenBalanceValidationParams): Promise; /** * Deployment Validation */ static validateDeployment(params: DeploymentValidationParams): Promise; } type DVTActions = { createSlashProposal: (args: { operator: Address; level: number; reason: string; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — DVT slash signing is off-chain (BLS), there is no `signSlashProposal` in the DVTValidator ABI. Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ signSlashProposal: (args: { proposalId: bigint; signature: Hex; account?: Account | Address; }) => Promise; executeSlashWithProof: (args: { proposalId: bigint; repUsers: Address[]; newScores: bigint[]; epoch: bigint; proof: Hex; account?: Account | Address; }) => Promise; markProposalExecuted: (args: { id: bigint; account?: Account | Address; }) => Promise; proposals: (args: { proposalId: bigint; }) => Promise<{ operator: Address; slashLevel: number; reason: string; executed: boolean; }>; nextProposalId: () => Promise; isValidator: (args: { user: Address; }) => Promise; addValidator: (args: { v: Address; account?: Account | Address; }) => Promise; /** Remove a validator from the active set (owner-gated). ABI: removeValidator(address v). */ removeValidator: (args: { v: Address; account?: Account | Address; }) => Promise; /** Prune a validator entry (cleanup of a removed/stale validator). ABI: pruneValidator(address v). */ pruneValidator: (args: { v: Address; account?: Account | Address; }) => Promise; setBLSAggregator: (args: { aggregator: Address; account?: Account | Address; }) => Promise; BLS_AGGREGATOR: () => Promise
; REGISTRY: () => Promise
; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { account?: Account | Address; }) => Promise; version: () => Promise; }; declare const dvtActions: (address: Address) => (client: PublicClient$1 | WalletClient) => DVTActions; type XPNTsFactoryActions = { deployxPNTsToken: (args: { name: string; symbol: string; communityName: string; communityENS: string; exchangeRate: bigint; paymasterAOA: Address; account?: Account | Address; }) => Promise; createToken: (args: { name: string; symbol: string; community: Address; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — xPNTsFactory has no `deployForCommunity` (it cannot derive token name/symbol from a community address). Throws {@link ErrorCode.NOT_IMPLEMENTED}; use {@link deployxPNTsToken} with full token params. */ deployForCommunity: (args: { community: Address; account?: Account | Address; }) => Promise; getTokenAddress: (args: { community: Address; }) => Promise
; /** @deprecated Removed in the v5.x contract refactor — xPNTsFactory exposes no CREATE2 address predictor. Throws {@link ErrorCode.NOT_IMPLEMENTED}; read the deployed address via {@link getTokenAddress}/{@link communityToToken} after deploy. */ predictAddress: (args: { community: Address; salt?: bigint; }) => Promise
; hasToken: (args: { community: Address; }) => Promise; isTokenDeployed: (args: { community: Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — xPNTsFactory has no token->community reverse lookup (only community->token via {@link communityToToken}). Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ getCommunityByToken: (args: { token: Address; }) => Promise
; getAllTokens: () => Promise; getDeployedCount: () => Promise; getTokenCount: () => Promise; deployedTokens: (args: { index: bigint; }) => Promise
; communityToToken: (args: { community: Address; }) => Promise
; /** @deprecated Removed in the v5.x contract refactor — xPNTsFactory.REGISTRY is immutable (no `setRegistry`). Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ setRegistry: (args: { registry: Address; account?: Account | Address; }) => Promise; setSuperPaymasterAddress: (args: { paymaster: Address; account?: Account | Address; }) => Promise; setSuperPaymaster: (args: { paymaster: Address; account?: Account | Address; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — xPNTsFactory has no implementation setter (the token `implementation()` is fixed). Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ setImplementation: (args: { impl: Address; account?: Account | Address; }) => Promise; /** Token implementation address. On-chain fn: `implementation()` (the legacy `getImplementation` getter was removed). */ getImplementation: () => Promise
; REGISTRY: () => Promise
; SUPERPAYMASTER: () => Promise
; SUPER_PAYMASTER: () => Promise
; /** Token implementation address. On-chain fn: `implementation()` (the legacy `tokenImplementation` getter was removed). */ tokenImplementation: () => Promise
; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; renounceOwnership: (args: { account?: Account | Address; }) => Promise; version: () => Promise; }; type PaymasterFactoryActions = { deployPaymaster: (args: { version?: string; initData?: Hex; account?: Account | Address; }) => Promise; deployPaymasterDeterministic: (args: { version: string; salt: Hex; initData: Hex; account?: Account | Address; }) => Promise; calculateAddress: (args: { owner: Address; }) => Promise
; getPaymaster: (args: { owner: Address; }) => Promise
; getPaymasterByOperator: (args: { operator: Address; }) => Promise
; getOperatorByPaymaster: (args: { paymaster: Address; }) => Promise
; getPaymasterCount: () => Promise; getAllPaymasters: () => Promise; hasPaymaster: (args: { owner: Address; }) => Promise; isPaymasterDeployed: (args: { owner: Address; }) => Promise; addImplementation: (args: { version: string; impl: Address; account?: Account | Address; }) => Promise; upgradeImplementation: (args: { version: string; impl: Address; account?: Account | Address; }) => Promise; setDefaultVersion: (args: { version: string; account?: Account | Address; }) => Promise; setImplementationV4: (args: { impl: Address; account?: Account | Address; }) => Promise; getImplementation: (args: { version: string; }) => Promise
; getImplementationV4: () => Promise
; setRegistry: (args: { registry: Address; account?: Account | Address; }) => Promise; REGISTRY: () => Promise
; /** @deprecated Removed in the v5.x contract refactor — PaymasterFactory has no `ENTRY_POINT` constant. Throws {@link ErrorCode.NOT_IMPLEMENTED}. */ ENTRY_POINT: () => Promise
; owner: () => Promise
; transferOwnership: (args: { newOwner: Address; account?: Account | Address; }) => Promise; defaultVersion: () => Promise; totalDeployed: () => Promise; version: () => Promise; }; declare const xPNTsFactoryActions: (address: Address) => (client: PublicClient$1 | WalletClient) => XPNTsFactoryActions; declare const paymasterFactoryActions: (address: Address) => (client: PublicClient$1 | WalletClient) => PaymasterFactoryActions; type BLSAlgorithmActions = { validate: (args: { userOpHash: Hex; proof: Hex; }) => Promise; }; /** * 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. */ declare const blsAlgorithmActions: (address: Address) => (client: PublicClient$1 | WalletClient) => BLSAlgorithmActions; /** * A registered DVT node, as returned by the paginated `getRegisteredNodes(offset, limit)` reader. */ interface DvtRegisteredNode { /** `bytes32` nodeId = `keccak256(publicKey)`. */ nodeId: Hex; /** The node's G1 public key in 128-byte EIP-2537 layout. */ publicKey: Hex; } /** * Operator-facing actions for the DVT node registry on * {@link https://github.com/AAStarCommunity/YetAnotherAA-Validator | AAStarBLSAlgorithm} * (source `AAStarValidator.sol`, the DVT validator, Sepolia `0x539B9681…`) — the * staked, self-service registration path (YetAnotherAA-Validator #165). * * The write path is `registerWithProof(publicKey, popPoint, popSig)`, gated on-chain by: * `requireStake == true`, the caller holding **ROLE_DVT** stake (checked via the linked * GTokenStaking registry), a non-infinity pubkey, a valid Proof-of-Possession, and the derived * `nodeId = keccak256(publicKey)` / caller not already bound to a node. Use {@link DvtOperatorActions.register} * to build the PoP from a secret key and submit in one call, or {@link DvtOperatorActions.registerWithProof} * to submit a pre-built tuple (e.g. when the key lives in an HSM and the PoP is produced elsewhere). */ type DvtOperatorActions = { /** * Build the PoP tuple from `blsSecretKey` (via {@link buildDvtPop}) and submit `registerWithProof`. * Returns both the tx `Hash` and the derived `nodeId` so callers can track the binding without * re-deriving it. Requires a WalletClient whose account holds ROLE_DVT stake. */ register: (args: { blsSecretKey: Hex; account?: Account | Address; }) => Promise<{ hash: Hash; pop: DvtPop; }>; /** * Submit a pre-built PoP tuple. ABI: `registerWithProof(bytes publicKey, bytes popPoint, bytes popSig)`. * `publicKey` is a 128-byte EIP-2537 G1 point; `popPoint`/`popSig` are 256-byte EIP-2537 G2 points * (see {@link buildDvtPop} for the construction). State-changing → resolves to the tx `Hash`. */ registerWithProof: (args: { publicKey: Hex; popPoint: Hex; popSig: Hex; account?: Account | Address; }) => Promise; /** * Re-derive and cache the aggregated-key set for a node after roster changes. * ABI: `syncNode(bytes32 nodeId)`. */ syncNode: (args: { nodeId: Hex; account?: Account | Address; }) => Promise; /** `isRegistered(bytes32 nodeId) -> bool`. */ isRegistered: (args: { nodeId: Hex; }) => Promise; /** `nodeOperator(bytes32 nodeId) -> address` — the operator bound to a node (zero if none). */ nodeOperator: (args: { nodeId: Hex; }) => Promise
; /** `operatorNode(address operator) -> bytes32` — the node an operator owns (zero if none). */ operatorNode: (args: { operator: Address; }) => Promise; /** `registeredKeys(bytes32 nodeId) -> bytes` — the stored 128-byte EIP-2537 G1 pubkey. */ registeredKeys: (args: { nodeId: Hex; }) => Promise; /** * Paginated roster. ABI: `getRegisteredNodes(uint256 offset, uint256 limit) -> (bytes32[], bytes[])`. * Returns `{ nodeId, publicKey }` pairs zipped from the two parallel arrays. The contract reverts * with "Offset out of bounds" when `offset >= count` (including an empty validator at offset 0); * this helper reads the count first and returns `[]` for an out-of-range page instead of throwing. */ getRegisteredNodes: (args?: { offset?: bigint; limit?: bigint; }) => Promise; /** `getRegisteredNodeCount() -> uint256` — number of registered nodes. */ getRegisteredNodeCount: () => Promise; /** `requireStake() -> bool` — whether the staked-registration path is enabled. */ requireStake: () => Promise; /** `minStake() -> uint256` — the ROLE_DVT stake floor enforced at registration. */ minStake: () => Promise; }; declare const dvtOperatorActions: (address: Address) => (client: PublicClient$1 | WalletClient) => DvtOperatorActions; /** * Tri-state result of a validation-time policy read ({@link 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. */ declare enum PolicyDecision { ALLOW = 0, REQUIRE_DVT = 1, REJECT = 2 } /** Per-(sender, asset) amount policy. Native-unit amounts (no USD oracle). */ type AssetPolicy = { /** Single-tx amount >= this => REQUIRE_DVT; 0 => amount-based trigger DISABLED. */ dvtTriggerAmount: bigint; /** Single-tx amount > this => REJECT (enforced only when configured). */ perTxHardCap: bigint; /** Cumulative spend over `windowSeconds` => REJECT when exceeded. */ dailyLimit: bigint; /** Daily-limit window length in seconds; 0 => DEFAULT_WINDOW (1 day). */ windowSeconds: bigint; /** false => no policy for this (sender, asset) => UNRESTRICTED (opt-in). */ configured: boolean; }; /** Input form of {@link AssetPolicy} for governance setters (no `configured` flag). */ type AssetPolicyInput = { dvtTriggerAmount: bigint; perTxHardCap: bigint; dailyLimit: bigint; /** 0 => DEFAULT_WINDOW (1 day). */ windowSeconds: bigint; }; /** Per-(sender, target) scope. Selectors are queried via {@link isSelectorAllowed}. */ type ContractScope = { /** target on this sender's call-target allowlist. */ allowed: boolean; /** this target always requires DVT co-sign regardless of amount. */ requireDVTAlways: boolean; /** max cumulative amount routed to this target per window. */ velocityLimit: bigint; /** velocity window length, seconds (0 => no velocity limit). */ velocityWindow: bigint; /** false => no scope set for this (sender, target). */ configured: boolean; }; /** Input form of {@link ContractScope} for governance setters; selectors set as a batch. */ type ContractScopeInput = { allowed: boolean; requireDVTAlways: boolean; velocityLimit: bigint; velocityWindow: bigint; /** selectors to mark allowed for this target (ADDITIVE on `setContractScope`). */ selectorAllowlist: Hex[]; }; /** Sender-keyed cumulative spend counter for one asset/target window. */ type SpendCounter = { /** cumulative native-unit spend in the current window. */ spentInWindow: bigint; /** unix timestamp the current window began. */ windowStart: bigint; }; type PolicyRegistryActions = { /** * Validation-time policy decision for one intended action. OPT-IN, default-ALLOW: * a sender with nothing configured for (asset, target) is UNRESTRICTED. * @returns decision (see {@link PolicyDecision}) + `remainingDaily` headroom in the * current window AFTER `amount` would post (`type(uint256).max` when unrestricted). */ checkPolicy: (args: { sender: Address; target: Address; asset: Address; amount: bigint; selector: Hex; }) => Promise<{ decision: PolicyDecision; remainingDaily: bigint; }>; getAssetPolicy: (args: { sender: Address; asset: Address; }) => Promise; getContractScope: (args: { sender: Address; target: Address; }) => Promise; isSelectorAllowed: (args: { sender: Address; target: Address; selector: Hex; }) => Promise; /** Cumulative native-unit spend + window start for this (sender, asset). */ getAssetSpend: (args: { sender: Address; asset: Address; }) => Promise; isFrozen: (args: { sender: Address; }) => Promise; isAuthorizedConsumer: (args: { consumer: Address; }) => Promise; /** AirAccount 2-of-3 RecoveryService allowed to freeze/tighten immediately. */ guardian: () => Promise
; /** * The OZ {TimelockController} whose `minDelay` (2 days) gates every loosening. * It is the ONLY address allowed to call the `onlyTimelock` loosen/admin setters * ({@link setAssetPolicy} / {@link setContractScope} / {@link unfreezeSender} / * {@link setGuardian} / {@link setConsumerAuthorization}). Read this to find the * controller through which loosen calls must be scheduled + executed. */ timelock: () => Promise
; /** Default daily-limit window length (seconds) used when `windowSeconds == 0`. */ DEFAULT_WINDOW: () => Promise; /** The ETH sentinel address used as `asset` for native ETH (address(0) is invalid). */ ETH_SENTINEL: () => Promise
; version: () => Promise; /** * 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. */ tightenAssetPolicy: (args: { sender: Address; asset: Address; params: AssetPolicyInput; account?: Account | Address; }) => Promise; /** * Immediately tighten a (sender, target) scope (disallow target, remove selectors, * lower velocity, set requireDVTAlways). Reverts unless strictly tighter. * `onlyGuardianOrTimelock` — NO timelock delay. */ tightenContractScope: (args: { sender: Address; target: Address; params: ContractScopeInput; account?: Account | Address; }) => Promise; /** * Immediately freeze `sender`: {@link checkPolicy} returns REJECT for all ops. * `onlyGuardianOrTimelock` (guardian = AirAccount 2-of-3 RecoveryService). Lifting * the freeze is a loosening → {@link unfreezeSender} (timelocked). */ freezeSender: (args: { sender: Address; account?: Account | Address; }) => Promise; /** * Set a (sender, asset) policy. `onlyTimelock` — reverts unless `msg.sender ==` * {@link 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 {@link timelock} for the controller address and * surface its scheduled-operation ETA (TimelockController.getTimestamp) to callers. */ setAssetPolicy: (args: { sender: Address; asset: Address; params: AssetPolicyInput; account?: Account | Address; }) => Promise; /** * Set a (sender, target) scope and ADD the listed selectors (additive union, NOT * replace; remove via {@link tightenContractScope}). `onlyTimelock` — same external * TimelockController gating as {@link setAssetPolicy}; calling directly reverts * `NotTimelock`. Schedule + execute through {@link timelock}. */ setContractScope: (args: { sender: Address; target: Address; params: ContractScopeInput; account?: Account | Address; }) => Promise; /** * Lift a freeze on `sender`. Unfreeze is a loosening → `onlyTimelock`; must be * scheduled + executed through the external {@link timelock} controller (2-day delay). * Calling directly reverts `NotTimelock`. */ unfreezeSender: (args: { sender: Address; account?: Account | Address; }) => Promise; /** Set the guardian. `onlyTimelock` — route through {@link timelock}. */ setGuardian: (args: { newGuardian: Address; account?: Account | Address; }) => Promise; /** * Authorize / revoke a staked consumer permitted to call `recordSpend`. * `onlyTimelock` — route through {@link timelock}. */ setConsumerAuthorization: (args: { consumer: Address; authorized: boolean; account?: Account | Address; }) => Promise; }; /** * 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: {@link PolicyRegistryActions.tightenAssetPolicy} / * {@link PolicyRegistryActions.tightenContractScope} / {@link PolicyRegistryActions.freezeSender} * (guardian OR timelock). * - TIMELOCKED loosen/unfreeze/admin: {@link PolicyRegistryActions.setAssetPolicy} / * {@link PolicyRegistryActions.setContractScope} / {@link PolicyRegistryActions.unfreezeSender} / * {@link PolicyRegistryActions.setGuardian} / {@link PolicyRegistryActions.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 * {@link PolicyRegistryActions.timelock} and read the controller's ETA themselves. */ declare const policyRegistryActions: (address: Address) => (client: PublicClient$1 | WalletClient) => PolicyRegistryActions; /** The 32-byte zero value used for a Timelock operation with no predecessor. */ declare const ZERO_BYTES32: Hex; /** * A single call to route through a {TimelockController}. `value` defaults to 0 and * `predecessor` to {@link ZERO_BYTES32}; `salt` distinguishes otherwise-identical * operations and MUST be reused verbatim between schedule and execute (the operation * id is derived from all of these — see {@link TimelockControllerActions.hashOperation}). */ type TimelockOperation = { target: Address; data: Hex; value?: bigint; predecessor?: Hex; salt: Hex; }; /** * viem action factory for a standard OpenZeppelin {TimelockController}. Governance * changes to timelock-gated admin setters (e.g. BLSAggregator `setSlashPolicyAdmin` / * `setSlashThreshold`, CC-13) flow through here: {@link schedule} the inner call, * wait out {@link getMinDelay}, then {@link execute} it. Operation state is read via * {@link getTimestamp} (0 = unset, 1 = done, else the ready-at unix timestamp). */ type TimelockControllerActions = { /** The minimum delay (seconds) an operation must wait between schedule and execute. */ getMinDelay: () => Promise; /** Deterministic operation id for a scheduled call (matches on-chain `hashOperation`). */ hashOperation: (args: TimelockOperation) => Promise; /** * The unix timestamp at which the operation becomes ready. Sentinels: `0n` = * unset (never scheduled), `1n` = already executed (done). Any other value is the * ready-at time — the "pending change ETA" a governance UI surfaces. */ getTimestamp: (args: { id: Hex; }) => Promise; isOperationPending: (args: { id: Hex; }) => Promise; isOperationReady: (args: { id: Hex; }) => Promise; isOperationDone: (args: { id: Hex; }) => Promise; /** Schedule an operation. Reverts unless `delay >= getMinDelay()` and caller has PROPOSER_ROLE. */ schedule: (args: TimelockOperation & { delay: bigint; account?: Account | Address; }) => Promise; /** Execute a ready operation (caller needs EXECUTOR_ROLE). Reverts if not ready or predecessor unmet. */ execute: (args: TimelockOperation & { account?: Account | Address; }) => Promise; /** Cancel a still-pending operation by id (caller needs CANCELLER_ROLE). */ cancel: (args: { id: Hex; account?: Account | Address; }) => Promise; }; declare const timelockControllerActions: (address: Address) => (client: PublicClient$1 | WalletClient) => TimelockControllerActions; type AccountActions = { execute: (args: { dest: Address; value: bigint; func: Hex; account?: Account | Address; }) => Promise; executeBatch: (args: { dest: Address[]; value: bigint[]; func: Hex[]; account?: Account | Address; }) => Promise; getNonce: () => Promise; entryPoint: () => Promise
; addDeposit: (args: { account?: Account | Address; }) => Promise; withdrawDepositTo: (args: { withdrawAddress: Address; amount: bigint; account?: Account | Address; }) => Promise; getDeposit: () => Promise; owner: () => Promise
; }; type AccountFactoryActions = { createAccount: (args: { owner: Address; salt: bigint; account?: Account | Address; gas?: bigint; }) => Promise; getAddress: (args: { owner: Address; salt: bigint; }) => Promise
; }; declare const accountActions: (address: Address) => (client: PublicClient$1 | WalletClient) => AccountActions; declare const accountFactoryActions: (address: Address, abi?: any) => (client: PublicClient$1 | WalletClient) => AccountFactoryActions; type FaucetPreparationResult = { ethFunded: boolean; roleRegistered: boolean; tokenMinted: boolean; paymasterDeposited: boolean; }; type FaucetConfig = { targetAA: Address; token: Address; registry: Address; paymasterV4?: Address; ethAmount?: bigint; tokenAmount?: bigint; }; /** * SepoliaFaucetAPI provides orchestration for setting up test accounts on Sepolia/Anvil. */ declare class SepoliaFaucetAPI { /** * 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 */ static prepareTestAccount(adminWallet: WalletClient, publicClient: PublicClient$1, config: FaucetConfig): Promise; /** * Funds the target with ETH if balance is below threshold. */ static fundETH(adminWallet: WalletClient, publicClient: PublicClient$1, target: Address, amount: bigint): Promise; /** * Registers the ENDUSER role using Sponsor Mode (Admin pays stake). */ static registerEndUser(adminWallet: WalletClient, publicClient: PublicClient$1, registryAddr: Address, target: Address, gasToken: Address): Promise; /** * Mints tokens directly to the target. */ static mintTestTokens(adminWallet: WalletClient, publicClient: PublicClient$1, tokenAddr: Address, target: Address, amount: bigint): Promise; /** * Admin mints tokens to self, approves Paymaster, and deposits FOR user. */ static adminDepositForUser(adminWallet: WalletClient, publicClient: PublicClient$1, paymasterAddr: Address, target: Address, tokenAddr: Address, amount: bigint): Promise; } /** * 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). */ declare function x402NonceKey(asset: Address, from: Address, nonce: Hex): Hex; /** * 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 }). */ declare function x402IsNonceUsed(client: PublicClient$1, superPaymasterAddress: Address, params: { asset: Address; from: Address; nonce: Hex; }): Promise; type X402Actions = { settleX402Payment: (args: { from: Address; to: Address; asset: Address; amount: bigint; validAfter: bigint; validBefore: bigint; nonce: Hex; signature: Hex; account?: Account | Address; }) => Promise; settleX402PaymentDirect: (args: { from: Address; to: Address; asset: Address; amount: bigint; nonce: Hex; account?: Account | Address; }) => Promise; x402SettlementNonces: (args: { nonce: Hex; }) => Promise; facilitatorFeeBPS: () => Promise; facilitatorEarnings: (args: { operator: Address; asset: Address; }) => Promise; operatorFacilitatorFees: (args: { operator: Address; }) => Promise; withdrawFacilitatorEarnings: (args: { asset: Address; account?: Account | Address; }) => Promise; setFacilitatorFeeBPS: (args: { fee: bigint; account?: Account | Address; }) => Promise; setOperatorFacilitatorFee: (args: { operator: Address; fee: bigint; account?: Account | Address; }) => Promise; }; /** * 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. */ declare const x402Actions: (address: Address) => (client: PublicClient$1 | WalletClient) => X402Actions; type AgentSponsorshipPolicy = { minReputationScore: bigint; sponsorshipBPS: bigint; maxDailyUSD: bigint; }; type AgentActions = { isRegisteredAgent: (args: { account: Address; }) => Promise; isEligibleForSponsorship: (args: { user: Address; }) => Promise; /** @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 {@link ErrorCode.NOT_IMPLEMENTED}; use {@link isEligibleForSponsorship}. */ getAgentSponsorshipRate: (args: { agent: Address; operator: Address; }) => Promise; agentIdentityRegistry: () => Promise
; agentReputationRegistry: () => Promise
; /** @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 {@link ErrorCode.NOT_IMPLEMENTED}. */ agentPolicies: (args: { operator: Address; index: bigint; }) => Promise; /** @deprecated Removed in the v5.x contract refactor — per-operator sponsorship policies are no longer configurable on-chain (no `setAgentPolicies`). Throws {@link ErrorCode.NOT_IMPLEMENTED}; to wire up the agent identity/reputation registries use {@link setAgentRegistries}. */ setAgentPolicies: (args: { policies: AgentSponsorshipPolicy[]; account?: Account | Address; }) => Promise; setAgentRegistries: (args: { identity: Address; reputation: Address; account?: Account | Address; }) => Promise; }; declare const agentActions: (address: Address) => (client: PublicClient$1 | WalletClient) => AgentActions; declare enum AuthorizationState { Unused = 0, Used = 1, Canceled = 2 } type GTokenAuthorizationActions = GTokenActions & { transferWithAuthorization: (args: { token: Address; from: Address; to: Address; value: bigint; validAfter: bigint; validBefore: bigint; nonce: Hex; /** RC-2 access hint — NOT signed; pass address(0) to use SBT path only. See trust model above. */ xPNTsToken: Address; signature: Hex; account?: Account | Address; }) => Promise; receiveWithAuthorization: (args: { token: Address; from: Address; to: Address; value: bigint; validAfter: bigint; validBefore: bigint; nonce: Hex; /** RC-2 access hint — NOT signed; pass address(0) to use SBT path only. See trust model above. */ xPNTsToken: Address; signature: Hex; account?: Account | Address; }) => Promise; cancelAuthorization: (args: { token: Address; authorizer: Address; nonce: Hex; signature: Hex; account?: Account | Address; }) => Promise; authorizationState: (args: { token: Address; authorizer: Address; nonce: Hex; }) => Promise; DOMAIN_SEPARATOR: (args: { token: Address; }) => Promise; TRANSFER_WITH_AUTHORIZATION_TYPEHASH: (args: { token: Address; }) => Promise; RECEIVE_WITH_AUTHORIZATION_TYPEHASH: (args: { token: Address; }) => Promise; CANCEL_AUTHORIZATION_TYPEHASH: (args: { token: Address; }) => Promise; MAX_AUTH_VALIDITY: (args: { token: Address; }) => Promise; mySBT: (args: { token: Address; }) => Promise
; factory: (args: { token: Address; }) => Promise
; setMySBT: (args: { token: Address; mySBT: Address; account?: Account | Address; }) => Promise; }; declare const gTokenAuthorizationActions: (client: PublicClient$1 | WalletClient) => GTokenAuthorizationActions; type AirAccountFactoryActions = { getAddressWithChainId: (args: { owner: Address; salt: bigint; config: InitConfig; ownerP256X?: Hex; ownerP256Y?: Hex; }) => Promise<{ account: Address; chainQualified: Hex; }>; getAddressWithDefaults: (args: { owner: Address; salt: bigint; guardian1: Address; guardian2: Address; dailyLimit: bigint; }) => Promise
; getAddress: (args: { owner: Address; salt: bigint; config: InitConfig; ownerP256X?: Hex; ownerP256Y?: Hex; }) => Promise
; createAccount: (args: { owner: Address; salt: bigint; config: InitConfig; ownerP256X?: Hex; ownerP256Y?: Hex; nonce?: bigint; deadline?: bigint; ownerSig?: Hex; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; createNonces: (args: { owner: Address; }) => Promise; createAccountWithDefaults: (args: { owner: Address; salt: bigint; guardian1: Address; guardian1Sig: Hex; guardian2: Address; guardian2Sig: Hex; dailyLimit: bigint; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; getChainQualifiedAddress: (args: { account: Address; }) => Promise; implementation: () => Promise
; factoryAdmin: () => Promise
; defaultCommunityGuardian: () => Promise
; agentRegistry: () => Promise
; getAgentAddress: (args: { humanOwner: Address; agentKey: Address; agentId: Hex; }) => Promise
; createAgentAccount: (args: { agentKey: Address; agentId: Hex; guardian2: Address; guardian2Sig: Hex; agentKeySig: Hex; deadline: bigint | number; dailyLimit: bigint; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; setAgentRegistry: (args: { agentRegistry: Address; account?: Account | Address; }) => Promise; }; /** * Byte-exact replica of the factory's `internal pure _getConfigHash(InitConfig)`: * `keccak256(abi.encode(guardians, guardianP256X, guardianP256Y, dailyLimit, approvedAlgIds, * minDailyLimit, initialTokens, initialTokenConfigs))`. Field order is consensus-critical — it feeds * both the CREATE2 clone salt and the relay-mode ownerSig digest. The factory has NO public view for * this (airaccount-contract#155), so the SDK mirrors it here; the on-chain relay-deploy e2e is the * cross-check that the replica matches (a wrong byte => the deploy reverts InvalidOwnerSignature). */ declare function configHashFromInitConfig(config: InitConfig): Hex; /** * Build the **inner** CREATE_ACCOUNT digest the v0.22.0 factory recovers the relay-mode `ownerSig` * against (KMS / deployer-relayed deploy where `msg.sender != owner`): * `keccak256(abi.encode("CREATE_ACCOUNT", chainId, factory, owner, salt, ownerP256X, ownerP256Y, * _getConfigHash(config), nonce, deadline))`. * * The factory then applies EIP-191 (`toEthSignedMessageHash`) before `ecrecover`, so the OWNER signs * this hash with a personal-sign / EIP-191 signer — viem `signMessage({ message: { raw } })` or the KMS * owner-key sign — and that signature is passed as `createAccount(..., ownerSig)`. `nonce` must equal * `createNonces(owner)` and `deadline` must be in the future. Returns the raw 32-byte hash (NOT * EIP-191-wrapped). See [[#249]]. */ declare function buildCreateAccountHash(args: { chainId: number | bigint; factory: Address; owner: Address; salt: bigint; ownerP256X: Hex; ownerP256Y: Hex; config: InitConfig; nonce: bigint; deadline: bigint; }): Hex; declare const airAccountFactoryActions: (address: Address) => (client: PublicClient$1 | WalletClient) => AirAccountFactoryActions; /** * AirAccount v0.20.0 extension surface — the P-256 / WebAuthn guardian functions * relocated into `AirAccountExtension` and reached through the V7 account's * `fallback`→`delegatecall` boundary. These actions are bound to (and called * against) the ACCOUNT address; the account routes them to the extension * internally, so the on-chain `address` here is the smart-account address, never * the extension's own address. * * ## P-256 (passkey) guardian feature — fully wired (Batch 2) * The full P-256 / WebAuthn guardian feature (passkey-signed recovery, mixed * ECDSA+P-256 guardian consensus) landed in the contracts at v0.20.0 and is wired * end-to-end here: the two VIEW reads plus the eight state-changing writes. * * The `sig` blobs these writes consume are built by the core crypto module * (`@aastar/core` → `buildP256GuardianChallenge` / `encodeWebAuthnAssertion` / * `signP256GuardianAssertion` in `crypto/p256Guardian.ts`). This action layer is the * thin calldata wrapper; the security-critical encoding lives in that module and is * decode-verified against a live Sepolia tx (see `tests/regression/onchain-evidence/`). * * ## Guardian bootstrap is guardianSig-free (spec §5.1 / §9) * `addP256Guardian(x, y)` is **owner-only** and requires `_guardianCount < RECOVERY_THRESHOLD` * (a single guardian can't form a quorum), so the FIRST P-256 guardian(s) need NO guardian * signature — only the owner. The same holds for init-time setup via `InitConfig.guardianP256X/Y` * (one factory tx, no window). Once `RECOVERY_THRESHOLD` guardians exist, expansion requires * consensus via `addP256GuardianWithMixedSigs` / `addGuardianWithMixedSigs`. * * The plain ECDSA recovery lifecycle (`proposeRecovery` / `approveRecovery` / * `executeRecovery` / `cancelRecovery`) is unchanged at the byte level and is encoded by * the AirAccount server's `RecoveryService` against the account address — NOT re-declared here. */ /** * Storage slots of the mixed-sig operation nonces, taken VERBATIM from the contract's shared layout * `AAStarAgentStorageLayout.sol` (forge-inspect-verified, identical for AAStarAirAccountV7 and * AirAccountExtension — the parity that makes the fallback→delegatecall sharing safe). These nonces * are `internal` (no public getter), so the SDK reads them via `eth_getStorageAt`. * * slot 15 — `_guardianRemovalNonce` (AAStarAgentStorageLayout.sol:118) * slot 16 — `_tierLimitNonce` (AAStarAgentStorageLayout.sol:119) * slot 38 — `_recoveryNonce` (AAStarAgentStorageLayout.sol:182; also the public `getRecoveryNonce()`) * slot 39 — `_guardianAdditionNonce` (AAStarAgentStorageLayout.sol:186) */ declare const GUARDIAN_REMOVAL_NONCE_SLOT = 15n; declare const TIER_LIMIT_NONCE_SLOT = 16n; declare const RECOVERY_NONCE_SLOT = 38n; declare const GUARDIAN_ADDITION_NONCE_SLOT = 39n; /** Highest valid guardian slot index (the contract hard-caps the guardian set at 3: slots 0..2). */ declare const MAX_GUARDIAN_SLOT = 2; type AirAccountExtensionActions = { /** `getRecoveryNonce()` — monotonic nonce that domain-separates P-256 / mixed-sig recovery payloads. */ getRecoveryNonce: () => Promise; /** `getGuardianP256Key(index)` — the (x, y) secp256r1 pubkey of guardian slot `index` (zero pair ⇒ not a P-256 guardian). */ getGuardianP256Key: (args: { index: number; }) => Promise<{ x: Hex; y: Hex; }>; /** * `_guardianAdditionNonce` — the nonce bound into ADD_GUARDIAN / ADD_P256_GUARDIAN challenges. * Read from internal storage slot 39 (no public getter). MUST be re-fetched immediately before * collecting guardian signatures for `add*WithMixedSigs` (any successful add increments it). */ getGuardianAdditionNonce: () => Promise; /** * `_guardianRemovalNonce` — the nonce bound into REMOVE_GUARDIAN challenges. Read from internal * storage slot 15 (no public getter). Re-fetch immediately before signing `removeGuardianWithMixedSigs`. */ getGuardianRemovalNonce: () => Promise; /** * `_tierLimitNonce` — the nonce bound into MODIFY_TIER_LIMITS challenges. Read from internal * storage slot 16 (no public getter). Re-fetch immediately before signing `modifyTierLimitsWithMixedGuardians`. */ getTierLimitNonce: () => Promise; /** `addP256Guardian(x, y)` — owner-only bootstrap of a passkey guardian (no guardianSig while `count < threshold`). */ addP256Guardian: (args: { x: Hex; y: Hex; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; /** `addP256GuardianWithMixedSigs(x, y, signerIdxs, sigs)` — add a passkey guardian once `count >= threshold` (consensus required). */ addP256GuardianWithMixedSigs: (args: { x: Hex; y: Hex; signerIdxs: readonly number[]; sigs: readonly Hex[]; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; /** `addGuardianWithMixedSigs(guardian, signerIdxs, sigs)` — add an ECDSA guardian with mixed-type guardian consensus. */ addGuardianWithMixedSigs: (args: { guardian: Address; signerIdxs: readonly number[]; sigs: readonly Hex[]; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; /** `proposeRecoveryWithSig(newOwner, gIdx, sig)` — passkey guardian proposes recovery (any relayer submits). */ proposeRecoveryWithSig: (args: { newOwner: Address; gIdx: number; sig: Hex; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; /** `approveRecoveryWithSig(gIdx, sig)` — passkey guardian approves the active recovery proposal. */ approveRecoveryWithSig: (args: { gIdx: number; sig: Hex; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; /** `cancelRecoveryWithSig(gIdx, sig)` — passkey guardian votes to cancel the active recovery proposal. */ cancelRecoveryWithSig: (args: { gIdx: number; sig: Hex; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; /** `removeGuardianWithMixedSigs(index, signerIdxs, sigs)` — owner-only removal with mixed-type guardian consensus. */ removeGuardianWithMixedSigs: (args: { index: number; signerIdxs: readonly number[]; sigs: readonly Hex[]; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; /** `modifyTierLimitsWithMixedGuardians(tier1, tier2, deadline, signerIdxs, sigs)` — owner-only tier change with mixed consensus. */ modifyTierLimitsWithMixedGuardians: (args: { tier1: bigint; tier2: bigint; deadline: bigint; signerIdxs: readonly number[]; sigs: readonly Hex[]; account?: Account | Address; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; }) => Promise; }; declare const airAccountExtensionActions: (address: Address) => (client: PublicClient$1 | WalletClient) => AirAccountExtensionActions; /** * Validator-router gating for AAStarAirAccount signature algorithms. * * Background (root-caused on-chain, v0.20.0): an AirAccount validates a signature * algorithm in one of two ways: * * - INLINE — handled directly by `AAStarAirAccountBase` itself: ECDSA (0x02), * P256 / passkey (0x03), and COMBINED_T1 (0x06). No external validator needed. * - ROUTER-DELEGATED — every other algId (BLS 0x01, cumulative T2 0x04, T3 0x05, * weighted 0x07, session 0x08, ...) is forwarded to the account's validator * router. Until the router is wired, `_validateTripleSignature` / `_callBLSValidator` * return `1` (validation FAIL) because `validator() == address(0)`. * * The factory does NOT auto-wire the router, so an account that approved any * router-delegated algId is non-functional for that algId until the owner calls * `setValidator(router)` (onlyOwner, SET-ONCE). This module decides, from the set of * approved algIds, whether that wiring step is required. */ /** * algIds handled INLINE by `AAStarAirAccountBase` — these need NO validator router. * 0x02 = ECDSA, 0x03 = P256 (passkey), 0x06 = COMBINED_T1. */ declare const INLINE_ALG_IDS: readonly number[]; /** * True when AT LEAST ONE approved algId is router-delegated (i.e. NOT inline), meaning * the account cannot validate that algorithm until `setValidator(router)` is wired. * * An empty list (no algorithms approved) returns `false` — nothing to route. * * @param approvedAlgIds - the algIds approved on the account (e.g. the account record's * `approvedAlgIds`, or the InitConfig's `approvedAlgIds`). */ declare function needsValidatorRouter(approvedAlgIds: readonly number[]): boolean; type AgentRegistryActions = { deployer: () => Promise
; factory: () => Promise
; isRegisteredAgent: (args: { agentWallet: Address; }) => Promise; isValidAccount: (args: { account: Address; }) => Promise; getHumanOwner: (args: { agentWallet: Address; }) => Promise
; agentWalletOwner: (args: { agentWallet: Address; }) => Promise
; getAgentCount: (args: { owner: Address; }) => Promise; getAgents: (args: { humanOwner: Address; }) => Promise; getAgentsPage: (args: { owner: Address; start: bigint; count: bigint; }) => Promise; getAgentByIndex: (args: { owner: Address; index: bigint; }) => Promise
; ownerAgents: (args: { owner: Address; index: bigint; }) => Promise
; bindFactory: (args: { factory: Address; account?: Account | Address; }) => Promise; markValid: (args: { account: Address; signer?: Account | Address; }) => Promise; registerAgent: (args: { agentWallet: Address; agentWalletSig: Hex; account?: Account | Address; }) => Promise; revokeAgent: (args: { agentWallet: Address; account?: Account | Address; }) => Promise; deregisterAgent: (args: { agentWallet: Address; account?: Account | Address; }) => Promise; }; declare const agentRegistryActions: (address: Address) => (client: PublicClient$1 | WalletClient) => AgentRegistryActions; type P256SessionState = { windowStart: number; callCount: number; prevCount: number; }; type SessionConfig = { expiry: number; contractScope: Address; selectorScope: Hex; revoked: boolean; velocityLimit: number; velocityWindow: number; callTargets: readonly Address[]; selectorAllowlist: readonly Hex[]; }; type SessionKeyValidatorActions = { checkSessionScope: (args: { account: Address; sessionKeyOrHash: Hex; sessionType: number; dest: Address; selector: Hex; }) => Promise; grantNonces: (args: { account: Address; key: Address; }) => Promise; grantNonces_p256: (args: { account: Address; keyHash: Hex; }) => Promise; sessionKeyCount: (args: { account: Address; }) => Promise; sessionStates_p256: (args: { account: Address; keyHash: Hex; }) => Promise; recordCallForVelocity: (args: { account: Address; sessionKeyOrHash: Hex; sessionType: number; signer?: Account | Address; }) => Promise; buildGrantHash: (args: { account: Address; sessionKey: Address; cfg: SessionConfig; }) => Promise; buildP256GrantHash: (args: { account: Address; p256KeyX: Hex; p256KeyY: Hex; cfg: SessionConfig; }) => Promise; }; declare const sessionKeyValidatorActions: (address: Address) => (client: PublicClient$1 | WalletClient) => SessionKeyValidatorActions; type PendingExit = { target: Address; value: bigint; data: Hex; proposedAt: bigint; approvalBitmap: bigint; }; type ForceExitActions = { pendingExit: (args: { account: Address; }) => Promise; }; declare const forceExitActions: (address: Address) => (client: PublicClient$1 | WalletClient) => ForceExitActions; /** * Reads for the CC-98 / CC-103 per-proposal committee validator * (`AAStarCommitteeValidator`, YetAnotherAA-Validator #237). * * These exist so the signature layer never has to GUESS its framing. The account picks legacy vs * committee from `committeeActive()` on the validator it has mounted; the submitter must read the * same flag off the same contract, or it encodes for one mode while the account decodes the other * — the shape-collision CC-103 names as the flip-order attack root. * * @module */ /** algId under which the DVT/committee validator is mounted on the router. */ declare const ALG_ID_DVT: 1; /** Live committee-mode state, everything the encoder needs in one round trip. */ interface CommitteeState { /** `committeeActive()` — `true` iff `epochLength != 0`. Decides legacy vs committee framing. */ active: boolean; /** `requiredQuorum()`, verbatim. May be the fail-closed sentinel; see {@link quorumUsable}. */ requiredQuorum: bigint; /** * `false` when `requiredQuorum` is `type(uint256).max`, i.e. committee validation cannot * succeed at all right now (committee off, or no usable pinned snapshot for the previous * epoch). Submitting a committee payload in that state is guaranteed to be rejected. */ quorumUsable: boolean; /** `TREE_DEPTH()` — read, never assumed; `perSigner = 64 + treeDepth*32` (CC-103 Q4). */ treeDepth: number; /** Byte length of one signer entry, derived from the on-chain depth. */ perSignerBytes: number; /** `activeCount()` — nodes currently in the active set. */ activeCount: bigint; } /** Resolve the validator mounted at algId 0x01 on a ValidatorRouter. */ declare function getMountedDvtValidator(publicClient: PublicClient$1, router: Address): Promise
; /** Read the full committee state from a mounted `AAStarCommitteeValidator`. */ declare function getCommitteeState(publicClient: PublicClient$1, committeeValidator: Address): Promise; /** Whether an account has run the one-time `enrollInCommitteeValidator()`. */ declare function isAccountEnrolled(publicClient: PublicClient$1, committeeValidator: Address, account: Address): Promise; /** * Fetch `slot` + Merkle proof for each contributing node and shape them into {@link CommitteeSigner}s. * * ⚠️ Uses the validator's `getMerkleProof`, which proves against the CURRENT active-set root. The * contract's own NatSpec is explicit that PRODUCTION proofs must target the FROZEN `setRoot[e-1]`, * and that a current-state proof is valid only while the set has not changed since that snapshot. * This helper therefore returns `setMutatedSince`, read from `lastSetMutationBlock()`, so a caller * can tell whether the proofs it just fetched are still safe to submit — rather than discovering it * as an on-chain revert. Rebuilding the frozen tree from `SlotAssigned`/`SlotCleared` events is the * durable path and is NOT implemented here. */ declare function fetchCommitteeSigners(publicClient: PublicClient$1, committeeValidator: Address, nodeIds: readonly Hex[]): Promise<{ signers: CommitteeSigner[]; lastSetMutationBlock: bigint; atBlock: bigint; }>; /** * Fail fast when a committee payload is about to be built in a state that cannot validate. * * Checks, in the order they actually bite: committee mode on → account enrolled → quorum real → * enough signers collected. */ declare function assertCommitteeSubmittable(publicClient: PublicClient$1, committeeValidator: Address, account: Address, signerCount: number): Promise; /** * Calldata for the account's one-time, OWNER-ONLY `enrollInCommitteeValidator()`. * * A server-side signer cannot send this on a user's behalf — it is a transaction from the account * owner. So rather than dead-ending when an unenrolled account needs committee framing, the SDK * hands back the exact calldata for whoever does hold the owner wallet (the app's own flow, a * UserOp, a Safe, a manual send) to execute against the account address (FU-19). * * Enrollment is idempotent-by-necessity: check {@link isAccountEnrolled} first and skip when true. */ declare function encodeEnrollInCommitteeValidator(): Hex; /** * BLS Signer for Registry reputation updates and DVT operations * * Uses BLS12-381 curve for signature aggregation */ declare class BLSSigner { private privateKey; constructor(privateKeyHex: Hex); /** * Sign a message with BLS private key * @param message Message hash to sign * @returns BLS signature as hex string */ sign(message: Hex): Hex; /** * Get BLS public key * @returns Public key as hex string */ getPublicKey(): Hex; /** * Aggregate multiple BLS signatures * @param signatures Array of BLS signatures * @returns Aggregated signature */ static aggregateSignatures(signatures: Hex[]): Hex; /** * Aggregate multiple BLS public keys * @param pubKeys Array of BLS public keys * @returns Aggregated public key (uncompressed G1 - 96 bytes for EVM) */ static aggregatePublicKeys(pubKeys: Hex[]): Hex; /** * Verify a BLS signature * @param message Message hash * @param signature BLS signature * @param publicKey BLS public key * @returns True if signature is valid */ static verify(message: Hex, signature: Hex, publicKey: Hex): boolean; } /** * Helper functions for creating BLS proofs for Registry and BLSAggregator operations */ declare const BLSHelpers: { /** * Create message hash for slash proposal */ createSlashProposalMessage(proposalId: bigint): Hex; /** * Create message hash for reputation update */ createReputationUpdateMessage(users: Hex[], scores: bigint[], epoch: bigint): Hex; /** * Encode BLS proof for Registry/Aggregator (v3 format) * Proof structure: (bytes pkG1, bytes sigG2, bytes msgG2, uint256 signerMask) */ encodeBLSProof(aggregatedPublicKey: Hex, aggregatedSignature: Hex, messageMappingG2: Hex, signerMask: bigint): Hex; /** * @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 * {@link import('./dvtWire').encodeDVTAccountSignature} / * {@link 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. * * @param slots Registration slots (1-indexed, `>= 1`) of the contributing signers. * @returns The uint256 signerMask. */ slotsToSignerMask(slots: number[]): bigint; /** * @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 * {@link import('./dvtWire').encodeDVTVerifierProof} (verifier-level) or * {@link 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 {@link encodeBLSProof} * still used by the slash/reputation path. * * @param signerMask Bitmask of contributing slots (see {@link slotsToSignerMask}). * @param aggregatedSignature The BLS12-381 aggregated G2 signature (`sigG2`). */ encodeDVTProof(signerMask: bigint, aggregatedSignature: Hex): Hex; /** * Encode Reputation Proof (for test compatibility) * Matches format: (signature, publicKey, signerMask) */ encodeReputationProof(signature: Hex, publicKey: Hex, signerMask: bigint): Hex; }; /** * A DVT signer node: its public `/signature/sign` endpoint and its on-chain-registered * `bytes32` nodeId (registered on the chain's `AAStarBLSAlgorithm` verifier). * * @module */ interface DVTNode { /** Base URL of the node (POST `{url}/signature/sign` with `{ userOp, ownerAuth }`). */ url: string; /** * The node's `bytes32` nodeId, as registered on the validator's `AAStarBLSAlgorithm`. * * TREAT AS OPAQUE. Since YetAnotherAA-Validator #165, staked registration derives * `nodeId = keccak256(pubkey)`. The live co-sign path reads nodeIds DYNAMICALLY (from the * `/signature/sign` response and the `/gossip/peers` roster), so a re-registration is * transparent to aggregation — this hardcoded value is only a discovery-free default and * MUST be refreshed once operators re-register (until then it tracks the current live nodes). */ nodeId: Hex; } /** * AAStar's default, always-on **testnet** DVT signer nodes, keyed by chainId. * * Sepolia (11155111): the 3 production-key nodes behind AAStar's Cloudflare named tunnel, * each registered on the v0.20.0 validator `AAStarBLSAlgorithm` * (`0x539B9681aFd5BFbCaa655Fe4c6BdcFe1fa7864bC` = `CANONICAL_ADDRESSES[11155111].aaStarBLSAlgorithm`, the v0.27.0 DVT validator). * These are AAStar's **beta-test** nodes with INDEPENDENT secret keys (NOT the public `BLS_TEST` * fixtures). On-chain verified: a 3-node co-sign → `validate(userOpHash, proof) === 0`, with * fail-closed `403` on a bad `ownerAuth`. Source of truth: * `YetAnotherAA-Validator/deploy/sdk-dvt-config.testnet.json`. * * Conventions for these nodes: `userOpHash = EntryPoint.getUserOpHash(PackedUserOp)`; * `ownerAuth` is a TAG-prefixed owner authorization the DVT (v1.7+) forwards to * `account.isValidOwnerAuth(userOpHash, ownerAuth)` (airaccount-contract v0.23.0, #159/#257/#261): * tag `0x01` = 65-byte EIP-191 ECDSA over userOpHash; tag `0x02` = device-passkey WebAuthn blob * (P256-verified against the account's `p256KeyX/Y`). Proof wire = EIP-2537 (matches {@link encodeDVTVerifierProof}). * Mandatory-BLS account: guard-enabled + `approvedAlgIds = [0x01]`. */ declare const DEFAULT_DVT_NODES: Readonly>; /** * The default always-on DVT signer nodes for a chain, or an empty array if none are published * for that chainId. Sepolia (11155111) returns AAStar's 3 beta-test nodes. */ declare function getDefaultDvtNodes(chainId: number): readonly DVTNode[]; /** * 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. */ declare const BLS_POP_DST = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"; /** * 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) */ interface HashToFieldU0U1 { u0c0a: Hex; u0c0b: Hex; u0c1a: Hex; u0c1b: Hex; u1c0a: Hex; u1c0b: Hex; u1c1a: Hex; u1c1b: Hex; } /** * 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. * * @param message The message to hash (arbitrary-length bytes, as Hex). * @returns The 8 bytes32 values (u0/u1 × c0/c1 × a/b). */ declare function hashToFieldU0U1(message: Hex): HashToFieldU0U1; /** * P-256 (WebAuthn passkey) guardian wire encoders — airaccount-contract v0.20.0 * authoritative, byte-for-byte against the published * `AirAccountExtension._verifyWebAuthnP256Sig` + `_p256GuardianChallenge` * (src/core/AirAccountExtension.sol). See `docs/p256-guardian-spec.md` §2, §6. * * ## What the contract actually verifies (NOT the early "simplified" draft) * * A P-256 guardian signs a FULL WebAuthn assertion — exactly what * `navigator.credentials.get()` returns — over the operation challenge: * * ``` * challenge = keccak256(abi.encode( * uint8 GUARDIAN_SIG_VERSION (=4), * uint256 chainId, * address account, * string "P256_GUARDIAN", // domain tag * string opLabel, // "PROPOSE_RECOVERY" / … * bytes opData)) // per-op, see §6 * clientDataJSON = '{"type":"webauthn.get","challenge":"' || base64url(challenge) || suffix * payloadHash = sha256(authenticatorData || sha256(clientDataJSON)) // ES256 signs this * sig (on-chain) = abi.encode(bytes authenticatorData, bytes clientDataJSONPrefix, * bytes clientDataJSONSuffix, bytes32 r, bytes32 s) * ``` * * The contract rebuilds `base64url(challenge)` on-chain (`_base64UrlEncode32`) and * splices it between the SDK-supplied prefix/suffix, then runs the EIP-7212 * precompile against the guardian's stored `(x, y)`. It enforces: * - `clientDataJSONPrefix == '{"type":"webauthn.get","challenge":"'` (operation-type binding), * - `authenticatorData.length >= 37` and the UP flag (`authenticatorData[32] & 0x01`), * - low-S: `uint256(s) <= n/2`. * * It deliberately does NOT bind `origin` / `rpIdHash` / UV (platform-layer RP binding * + challenge domain-separation cover replay). See spec §9.5. * * @module */ /** Guardian signature scheme version embedded in every challenge (contract: `GUARDIAN_SIG_VERSION`). */ declare const GUARDIAN_SIG_VERSION: 4; /** Domain tag mixed into every P-256 guardian challenge (separates from the ECDSA-guardian hash). */ declare const P256_GUARDIAN_DOMAIN: "P256_GUARDIAN"; /** * The EXACT `clientDataJSON` prefix the contract requires (operation-type binding). Any other * prefix is rejected on-chain, so a `webauthn.create` (registration) assertion cannot be replayed * through the `webauthn.get` (recovery) path. The base64url(challenge) MUST immediately follow this. */ declare const WEBAUTHN_GET_CHALLENGE_PREFIX: "{\"type\":\"webauthn.get\",\"challenge\":\""; /** Sentinel address stored in a guardian slot to mark it P-256 (contract: `P256_GUARDIAN_SENTINEL`). */ declare const P256_GUARDIAN_SENTINEL: Address; /** secp256r1 (P-256) curve order `n` (fixed curve parameter). */ declare const SECP256R1_N = 115792089210356248762697446949407573529996955224135760342422259061068512044369n; /** * secp256r1 curve order / 2 — the low-S ceiling the contract enforces * (`AirAccountExtension.SECP256R1_N_OVER_2`). */ declare const SECP256R1_N_OVER_2: bigint; /** * base64url-encode bytes with no padding — byte-identical to the contract's `_base64UrlEncode32` * for 32-byte input (43 chars) and to `Buffer.from(x).toString('base64url')`. Pure JS so `@aastar/core` * stays isomorphic (no node `Buffer`). */ declare function base64UrlEncode(bytes: Uint8Array): string; /** The set of operation labels the contract recognises (string-matched in the challenge). */ type GuardianOpLabel = 'PROPOSE_RECOVERY' | 'APPROVE_RECOVERY' | 'CANCEL_RECOVERY' | 'REMOVE_GUARDIAN' | 'MODIFY_TIER_LIMITS' | 'ADD_P256_GUARDIAN' | 'ADD_GUARDIAN'; /** Parameters for {@link buildP256GuardianChallenge}. */ interface BuildP256GuardianChallengeParams { /** Signature scheme version. Defaults to {@link GUARDIAN_SIG_VERSION} (4). */ version?: number; /** EVM chain id the account lives on (`block.chainid`). */ chainId: number | bigint; /** The smart-account address (`address(this)` in the extension). */ account: Address; /** Operation label, e.g. `"PROPOSE_RECOVERY"`. */ opLabel: GuardianOpLabel | string; /** Operation payload (`abi.encode(...)` per op — use the `opData*` builders below). */ opData: Hex; } /** * Build the 32-byte operation challenge the contract derives in `_p256GuardianChallenge`: * `keccak256(abi.encode(uint8 version, uint256 chainId, address account, string "P256_GUARDIAN", * string opLabel, bytes opData))`. This is the value passed to `navigator.credentials.get()`. */ declare function buildP256GuardianChallenge(params: BuildP256GuardianChallengeParams): Hex; /** `opData` for PROPOSE_RECOVERY / APPROVE_RECOVERY / CANCEL_RECOVERY: `abi.encode(uint256 nonce, address newOwner)`. */ declare function opDataRecovery(nonce: bigint, newOwner: Address): Hex; /** `opData` for ADD_P256_GUARDIAN: `abi.encode(uint256 nonce, bytes32 x, bytes32 y)`. */ declare function opDataAddP256Guardian(nonce: bigint, x: Hex, y: Hex): Hex; /** `opData` for ADD_GUARDIAN (ECDSA): `abi.encode(uint256 nonce, address guardian)`. */ declare function opDataAddGuardian(nonce: bigint, guardian: Address): Hex; /** * `opData` for REMOVE_GUARDIAN (spec §6.4): * `abi.encode(uint256 nonce, uint8 index, address guardianToRemove, bytes32 p256X, bytes32 p256Y)`. * For an ECDSA slot pass the guardian address with `p256X=p256Y=0x0…0`; for a P-256 slot pass * {@link P256_GUARDIAN_SENTINEL} with the slot's stored `(x, y)`. */ declare function opDataRemoveGuardian(nonce: bigint, index: number, guardianToRemove: Address, p256X: Hex, p256Y: Hex): Hex; /** `opData` for MODIFY_TIER_LIMITS: `abi.encode(uint256 nonce, uint256 tier1, uint256 tier2, uint256 deadline)`. */ declare function opDataModifyTierLimits(nonce: bigint, tier1: bigint, tier2: bigint, deadline: bigint): Hex; interface OpChainCtx { chainId: number | bigint; account: Address; version?: number; } /** Challenge for `proposeRecoveryWithSig(newOwner, gIdx, sig)`. `nonce` = `getRecoveryNonce()`. */ declare function buildProposeRecoveryChallenge(p: OpChainCtx & { nonce: bigint; newOwner: Address; }): Hex; /** Challenge for `approveRecoveryWithSig(gIdx, sig)`. `newOwner` = `activeRecovery().newOwner`. */ declare function buildApproveRecoveryChallenge(p: OpChainCtx & { nonce: bigint; newOwner: Address; }): Hex; /** Challenge for `cancelRecoveryWithSig(gIdx, sig)`. `newOwner` = `activeRecovery().newOwner`. */ declare function buildCancelRecoveryChallenge(p: OpChainCtx & { nonce: bigint; newOwner: Address; }): Hex; /** Challenge for `addP256GuardianWithMixedSigs(x, y, …)`. `nonce` = `_guardianAdditionNonce`. */ declare function buildAddP256GuardianChallenge(p: OpChainCtx & { nonce: bigint; x: Hex; y: Hex; }): Hex; /** Challenge for `addGuardianWithMixedSigs(guardian, …)`. `nonce` = `_guardianAdditionNonce`. */ declare function buildAddGuardianChallenge(p: OpChainCtx & { nonce: bigint; guardian: Address; }): Hex; /** Challenge for `removeGuardianWithMixedSigs(index, …)`. `nonce` = `_guardianRemovalNonce`. */ declare function buildRemoveGuardianChallenge(p: OpChainCtx & { nonce: bigint; index: number; guardianToRemove: Address; p256X: Hex; p256Y: Hex; }): Hex; /** Challenge for `modifyTierLimitsWithMixedGuardians(tier1, tier2, deadline, …)`. `nonce` = `_tierLimitNonce`. */ declare function buildModifyTierLimitsChallenge(p: OpChainCtx & { nonce: bigint; tier1: bigint; tier2: bigint; deadline: bigint; }): Hex; /** A signature scalar accepted as a 0x-hex (≤32 bytes), raw bytes, or bigint. */ type ScalarLike = Hex | Uint8Array | bigint; /** Parameters for {@link encodeWebAuthnAssertion}. */ interface EncodeWebAuthnAssertionParams { /** `authenticatorData` from the assertion: `rpIdHash(32) || flags(1) || signCount(4)` (≥37 bytes, UP set). */ authenticatorData: Hex | Uint8Array; /** * The FULL `clientDataJSON` the authenticator signed. MUST start with * {@link WEBAUTHN_GET_CHALLENGE_PREFIX}, immediately followed by the 43-char base64url(challenge). * Split into prefix/suffix here; the contract rebuilds the challenge on-chain. */ clientDataJSON: Hex | Uint8Array | string; /** ES256 signature `r` (32-byte scalar). */ r: ScalarLike; /** ES256 signature `s` (32-byte scalar). Auto low-S normalised to satisfy the contract. */ s: ScalarLike; } /** * ABI-encode a WebAuthn assertion into the on-chain `sig` the contract consumes: * `abi.encode(bytes authenticatorData, bytes clientDataJSONPrefix, bytes clientDataJSONSuffix, * bytes32 r, bytes32 s)`. * * Validates the assertion against every constraint the contract enforces so a bad blob fails here * (with a clear message) rather than as a generic on-chain revert: * - `authenticatorData.length >= 37` and the UP flag (`byte[32] & 0x01`) is set, * - `clientDataJSON` starts with the exact `webauthn.get` prefix and the 43-char challenge slot * is immediately followed by the closing `"` (so the contract's reconstruction lines up), * - `s` is low-S (`<= n/2`) — auto-normalised to `n - s` if the input was high-S (ECDSA-valid). */ declare function encodeWebAuthnAssertion(params: EncodeWebAuthnAssertionParams): Hex; /** Decoded view of an on-chain P-256 guardian `sig` blob. */ interface DecodedWebAuthnAssertion { authenticatorData: Hex; clientDataJSONPrefix: Hex; clientDataJSONSuffix: Hex; r: Hex; s: Hex; } /** * Inverse of {@link encodeWebAuthnAssertion} — decode an on-chain `sig` blob back into its parts. * Useful for evidence/decode-verification and debugging a rejected signature. */ declare function decodeWebAuthnAssertion(sig: Hex): DecodedWebAuthnAssertion; declare function coseToP256XY(cosePublicKey: Hex | Uint8Array): { x: Hex; y: Hex; }; /** Parameters for {@link signP256GuardianAssertion}. */ interface SignP256GuardianAssertionParams { /** Raw 32-byte P-256 private scalar (hex or bytes). */ privateKey: Hex | Uint8Array; /** The 32-byte operation challenge (from a `build*Challenge` helper). */ challenge: Hex; /** * RP id whose SHA-256 becomes `rpIdHash`. The contract does NOT verify this (§9.5), so any value * works on-chain; defaults to a stable test RP. Set it to your real rpId for fidelity. */ rpId?: string; /** `origin` embedded in `clientDataJSON` suffix (also not verified on-chain). */ origin?: string; /** authenticatorData flags byte. Defaults to `0x05` (UP | UV); the contract only requires UP (bit 0). */ flags?: number; /** authenticatorData signCount (4-byte big-endian). */ signCount?: number; } /** Result of {@link signP256GuardianAssertion}. */ interface SignedP256GuardianAssertion { /** The on-chain `sig` blob, ready for `proposeRecoveryWithSig` / mixed-sig calls. */ sig: Hex; /** authenticatorData used (hex). */ authenticatorData: Hex; /** Full clientDataJSON signed (hex). */ clientDataJSON: Hex; /** Low-S–normalised signature `r` (bytes32 hex). */ r: Hex; /** Low-S–normalised signature `s` (bytes32 hex). */ s: Hex; } /** * Software P-256 authenticator — produces a FULL WebAuthn assertion over `challenge`, byte-for-byte * in the format `navigator.credentials.get()` returns (mirrors the contract's * `test/webauthn/gen_p256_assertion.mjs`). The only difference vs a hardware passkey is WHERE the * key lives. Use for the on-chain evidence E2E and for relaying software-held guardian keys. */ declare function signP256GuardianAssertion(params: SignP256GuardianAssertionParams): SignedP256GuardianAssertion; /** Derive the uncompressed-SEC1 `(x, y)` of a P-256 private key (for `addP256Guardian`). */ declare function p256GuardianPublicKey(privateKey: Hex | Uint8Array): { x: Hex; y: Hex; }; /** * Role constants and utilities for AAstar SDK * @dev All role hashes and configurations match exactly with Registry.sol v3.0.0 * @source /contracts/src/core/Registry.sol */ /** * Default Admin Role (OpenZeppelin AccessControl) * @description Highest privilege, can grant/revoke all roles * @permission Protocol governance only * @source OpenZeppelin AccessControl DEFAULT_ADMIN_ROLE */ declare const DEFAULT_ADMIN_ROLE: Hash; /** * Community Role * @description Community administrator, can issue xPNTs, configure SBT rules * @permission Community-level governance * @requirement minStake: 30 GT, ticketPrice: 3 GT (line 99) * @exitFee 5% (500 basis points), min 1 GT * @lockDuration 30 days * @source Registry.sol line 32: ROLE_COMMUNITY = keccak256("COMMUNITY") */ declare const ROLE_COMMUNITY: Hash; /** * 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) * @additionalRequirement Must hold MySBT from community * @exitFee 10% (1000 basis points), min 0.05 GT * @lockDuration 7 days * @source Registry.sol line 33: ROLE_ENDUSER = keccak256("ENDUSER") */ declare const ROLE_ENDUSER: Hash; /** * 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) * @exitFee 10% (1000 basis points), min 1 GT * @lockDuration 30 days * @source Registry.sol line 34: ROLE_PAYMASTER_AOA = keccak256("PAYMASTER_AOA") */ declare const ROLE_PAYMASTER_AOA: Hash; /** * 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) * @additionalRequirement aPNTs collateral in SuperPaymaster contract * @exitFee 10% (1000 basis points), min 2 GT * @lockDuration 30 days * @source Registry.sol line 35: ROLE_PAYMASTER_SUPER = keccak256("PAYMASTER_SUPER") */ declare const ROLE_PAYMASTER_SUPER: Hash; /** * DVT Role (Distributed Validator Technology) * @description DVT node operator for consensus validation * @permission Infrastructure operator * @requirement minStake: 30 GT, ticketPrice: 3 GT (line 94) * @exitFee 10% (1000 basis points), min 1 GT * @lockDuration 30 days * @source Registry.sol line 36: ROLE_DVT = keccak256("DVT") */ declare const ROLE_DVT: Hash; /** * ANODE Role (Anonymous Node) * @description Anonymous infrastructure node operator * @permission Infrastructure operator * @requirement minStake: 20 GT, ticketPrice: 2 GT (line 95) * @exitFee 10% (1000 basis points), min 1 GT * @lockDuration 30 days * @source Registry.sol line 37: ROLE_ANODE = keccak256("ANODE") */ declare const ROLE_ANODE: Hash; /** * 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) * @exitFee 10% (1000 basis points), min 5 GT * @lockDuration 30 days * @source Registry.sol line 38: ROLE_KMS = keccak256("KMS") */ declare const ROLE_KMS: Hash; /** * Role configuration structure (matches Registry.sol RoleConfig struct) */ interface RoleConfig { minStake: bigint; ticketPrice: bigint; slashThreshold: number; slashBase: number; slashIncrement: number; slashMax: number; exitFeePercent: bigint; minExitFee: bigint; isActive: boolean; description: string; } /** * Role requirement check result */ interface RoleRequirement { hasRole: boolean; hasEnoughGToken: boolean; hasEnoughAPNTs: boolean; hasSBT: boolean; missingRequirements: string[]; } declare const ROLE_NAMES: Record; /** * Get human-readable role name */ declare function getRoleName(roleHash: Hash): string; /** * Role permission levels (for UI sorting/filtering) */ declare enum RolePermissionLevel { PROTOCOL = 100,// Default Admin KMS = 80,// Key Management (highest stake) OPERATOR = 50,// Infrastructure Operators COMMUNITY = 30,// Community Admin USER = 10 } declare const ROLE_PERMISSION_LEVELS: Record; /** * Exact stake requirements from Registry.sol constructor (lines 92-100) * @warning These are initial values, always query contract for current configuration */ declare const INITIAL_ROLE_STAKES: { readonly [x: string]: { readonly minStake: "30 GT"; readonly ticketPrice: "3 GT"; readonly exitFeePercent: "10%"; readonly minExitFee: "1 GT"; readonly lockDuration: "30 days"; readonly line: 92; readonly additionalRequirement?: undefined; } | { readonly minStake: "50 GT"; readonly ticketPrice: "5 GT"; readonly exitFeePercent: "10%"; readonly minExitFee: "2 GT"; readonly lockDuration: "30 days"; readonly additionalRequirement: "aPNTs collateral in SuperPaymaster"; readonly line: 93; } | { readonly minStake: "30 GT"; readonly ticketPrice: "3 GT"; readonly exitFeePercent: "10%"; readonly minExitFee: "1 GT"; readonly lockDuration: "30 days"; readonly line: 94; readonly additionalRequirement?: undefined; } | { readonly minStake: "20 GT"; readonly ticketPrice: "2 GT"; readonly exitFeePercent: "10%"; readonly minExitFee: "1 GT"; readonly lockDuration: "30 days"; readonly line: 95; readonly additionalRequirement?: undefined; } | { readonly minStake: "100 GT"; readonly ticketPrice: "10 GT"; readonly exitFeePercent: "10%"; readonly minExitFee: "5 GT"; readonly lockDuration: "30 days"; readonly line: 98; readonly additionalRequirement?: undefined; } | { readonly minStake: "30 GT"; readonly ticketPrice: "3 GT"; readonly exitFeePercent: "5%"; readonly minExitFee: "1 GT"; readonly lockDuration: "30 days"; readonly line: 99; readonly additionalRequirement?: undefined; } | { readonly minStake: "0.3 GT"; readonly ticketPrice: "0.05 GT"; readonly exitFeePercent: "10%"; readonly minExitFee: "0.05 GT"; readonly lockDuration: "7 days"; readonly additionalRequirement: "Must hold MySBT from community"; readonly line: 100; }; }; /** * All defined roles array (for iteration) */ declare const ALL_ROLES: readonly [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`]; /** * Unified requirement checker for role registration * Provides centralized validation for GToken, aPNTs, MySBT, and role permissions */ /** * 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. */ type OperatorMode = 'AOA' | 'AOA+'; /** Boolean sub-check result (role / SBT). */ interface ResourceBoolCheck { value: boolean; ok: boolean; } /** Role-stake sub-check result. */ interface ResourceStakeCheck { /** Current on-chain role stake (`getRoleStake(roleId, operator)`). */ staked: bigint; /** Minimum stake required for this mode. */ required: bigint; ok: boolean; } /** * Aggregated readiness report for a given {@link OperatorMode}. * Mirrors the structured-report style of PaymasterV4 `checkGaslessReadiness`. */ interface ResourceReport { /** True when every relevant sub-check passed (`issues.length === 0`). */ ready: boolean; mode: OperatorMode; /** Only the sub-checks relevant to the requested mode are populated. */ checks: { role?: ResourceBoolCheck & { roleId: `0x${string}`; }; stake?: ResourceStakeCheck; sbt?: ResourceBoolCheck; }; /** Actionable, human-readable description of each unmet requirement. */ issues: string[]; } /** Optional threshold overrides for {@link RequirementChecker.checkResources}. */ interface CheckResourcesOptions { /** Minimum role stake (defaults: 30 GT for AOA, 50 GT for AOA+). */ requiredStake?: bigint; } /** * 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')); * } * ``` */ declare class RequirementChecker { /** @internal */ private publicClient; /** @internal */ private addresses?; constructor( /** @internal */ publicClient: PublicClient, /** @internal */ addresses?: { registry?: Address; gtoken?: Address; apnts?: Address; mysbt?: Address; } | undefined); /** * Check all requirements for a user * * @param params Check parameters * @returns Detailed requirement status */ checkRequirements(params: { address: Address; roleId?: `0x${string}`; requiredGToken?: bigint; requiredAPNTs?: bigint; requireSBT?: boolean; }): Promise; /** * Check GToken balance only (shortcut) */ checkGTokenBalance(address: Address, required: bigint): Promise<{ balance: bigint; hasEnough: boolean; }>; /** * Check aPNTs balance only (shortcut) */ checkAPNTsBalance(address: Address, required: bigint): Promise<{ balance: bigint; hasEnough: boolean; }>; /** * Check if user has MySBT (shortcut) */ checkHasSBT(address: Address): Promise; /** * Check if user has specific role (shortcut) */ checkHasRole(roleId: `0x${string}`, address: Address): Promise; /** * Check a user's on-chain role stake (`getRoleStake(roleId, operator)`) (shortcut). */ checkRoleStake(roleId: `0x${string}`, address: Address, required: bigint): Promise<{ staked: bigint; hasEnough: boolean; }>; /** * 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. * * @param wallet Operator address to evaluate. * @param mode Onboarding mode (`'AOA'` | `'AOA+'`). * @param options Optional threshold overrides. * @returns A {@link ResourceReport}; `ready` is true iff `issues` is empty. */ checkResources(wallet: Address, mode: OperatorMode, options?: CheckResourcesOptions): Promise; } interface SuperPaymasterConfig { registry: Address; gToken: Address; gTokenStaking: Address; superPaymaster: Address; paymasterFactory: Address; paymasterV4: Address; entryPoint: Address; } declare class ContractConfigManager { /** * Get validated core configuration */ static getConfig(): SuperPaymasterConfig; /** * Validate configuration addresses */ private static validate; } interface HeliosTransportConfig { /** * Execution-layer JSON-RPC URL (used for historical state, mempool). * Example: "https://eth.llamarpc.com" */ executionRpcUrl: string; /** * Consensus-layer REST beacon URL (used for light client sync). * Example: "https://www.lightclientdata.org" */ consensusRpcUrl: string; /** * Network name. Defaults to "mainnet". Also accepts "sepolia". */ network?: "mainnet" | "sepolia"; /** * Options forwarded to viem's custom() transport (timeout, retryCount, etc.) */ transportConfig?: CustomTransportConfig; } /** * 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`. */ declare function createHeliosTransport(config: HeliosTransportConfig): Promise; /** * utils/ens.ts — ENS forward and reverse resolution helpers. * * Wraps viem's ENS actions with a simple, dual-direction API: * resolveEns(name) → 0x address (forward lookup) * lookupAddress(address) → ENS name (reverse lookup) * * @example * ```ts * import { resolveEns, lookupAddress } from '@aastar/core/utils/ens'; * * const address = await resolveEns('vitalik.eth'); * // → "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" * * const name = await lookupAddress('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'); * // → "vitalik.eth" * ``` * * Requirements: viem ≥ 2.0 (already a peer dep of @aastar/core) */ /** Options accepted by resolveEns and lookupAddress. */ interface EnsOptions { /** * 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. */ client?: PublicClient$1; /** * Mainnet JSON-RPC URL. Only used when `client` is not provided. * Defaults to the viem public mainnet RPC. */ rpcUrl?: string; } /** * Forward-resolve an ENS name to an Ethereum address. * Returns null if the name has no address record. * * @example * const address = await resolveEns('vitalik.eth'); */ declare function resolveEns(name: string, options?: EnsOptions): Promise<`0x${string}` | null>; /** * Reverse-resolve an Ethereum address to its primary ENS name. * Returns null if the address has no reverse record. * * @example * const name = await lookupAddress('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'); */ declare function lookupAddress(address: `0x${string}`, options?: EnsOptions): Promise; /** * 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`. */ declare function resolveEnsVerified(name: string, options?: EnsOptions): Promise<{ address: `0x${string}` | null; name: string; verified: boolean; }>; export { AASTAR_COMMUNITY, AAStarAirAccountFactoryV7ABI, AAStarAirAccountFactoryV7Artifact, AAStarAirAccountV7ABI, AAStarAirAccountV7Artifact, AAStarBLSAggregatorABI, AAStarBLSAggregatorArtifact, AAStarBLSAlgorithmABI, AAStarBLSAlgorithmArtifact, AAStarCommitteeValidatorABI, AAStarCommitteeValidatorArtifact, AAStarGlobalGuardABI, AAStarValidatorABI, AAStarValidatorArtifact, AGENT_IDENTITY_REGISTRY_ADDRESS, AGENT_REPUTATION_REGISTRY_ADDRESS, ALG_ID_DVT, ALL_ADDRESSES, ALL_ROLES, APNTS_ADDRESS, APNTsSaleContractABI, type AccountActions, type AccountBalance, type AccountFactoryActions, type AgentActions, AgentRegistryABI, type AgentRegistryActions, AgentRegistryArtifact, type AgentSponsorshipPolicy, AirAccountDelegateABI, AirAccountDelegateArtifact, AirAccountExtensionABI, type AirAccountExtensionActions, AirAccountExtensionArtifact, type AirAccountFactoryActions, type AssetPolicy, type AssetPolicyInput, AuthorizationState, BLSAggregatorABI, BLSAggregatorArtifact, type BLSAlgorithmActions, BLSHelpers, BLSSigner, BLSValidatorABI, BLSValidatorArtifact, BLS_AGGREGATOR_ADDRESS, BLS_POP_DST, BLS_VALIDATOR_ADDRESS, BPS_DENOMINATOR, BRANDING, BREAD_COMMUNITY, type BalanceValidationParams, type BatchMintResult, type BlockPin, type BuildP256GuardianChallengeParams, BundlerClient, type BundlerResponse, BuyHelperABI, CHAIN_MAINNET, CHAIN_SEPOLIA, COMMUNITIES, COMMUNITY_OWNERS, CONTRACTS, CONTRACT_METADATA, CONTRACT_SRC_HASH, CORE_ADDRESSES, CalldataParserRegistryABI, CalldataParserRegistryArtifact, type CheckResourcesOptions, CommitteeSigner, type CommitteeState, type CommunityConfig, type CommunityProfile, type CommunityRoleData, type ContractCategory, ContractConfigManager, type ContractNetwork, type ContractScope, type ContractScopeInput, type ContractVersion, type Credibility, DEFAULT_ADMIN_ROLE, DEFAULT_APNTS_PRICE_USD, DEFAULT_CALL_GAS_LIMIT, DEFAULT_DVT_NODES, DEFAULT_GAS_TOKEN_MINT_AMOUNT, DEFAULT_PRE_VERIFICATION_GAS, DEFAULT_TIMEOUT_MS, DEFAULT_TOKEN_NAME, DEFAULT_TOKEN_SYMBOL, DEFAULT_USDT_MINT_AMOUNT, DEFAULT_VERIFICATION_GAS_LIMIT, type DVTActions, type DVTNode, DVTValidatorABI, DVTValidatorArtifact, DVT_CONFIG, DVT_VALIDATOR_ADDRESS, type DecodedWebAuthnAssertion, type DeploymentValidationParams, type DvtConfig, type DvtEnvironment, type DvtNode, type DvtNodeHealth, type DvtOperatorActions, DvtPop, type DvtRegisteredNode, ENTRY_POINT_ADDRESS, ERC20ABI, type ERC20Actions, type EncodeWebAuthnAssertionParams, type EnsOptions, EntryPointABI, type EntryPointActions, EntryPointArtifact, EntryPointVersion, FAUCET_API_URL, type FaucetConfig, type FaucetPreparationResult, type ForceExitActions, ForceExitModuleABI, ForceExitModuleArtifact, GTOKEN_ADDRESS, GTOKEN_STAKING_ADDRESS, GTokenABI, type GTokenActions, GTokenArtifact, GTokenAuthorizationABI, type GTokenAuthorizationActions, GTokenAuthorizationArtifact, GTokenStakingABI, GTokenStakingArtifact, GUARDIAN_ADDITION_NONCE_SLOT, GUARDIAN_REMOVAL_NONCE_SLOT, GUARDIAN_SIG_VERSION, type GuardCall, GuardClient, type GuardConfig, type GuardTokenConfig, type GuardianOpLabel, type HashToFieldU0U1, type HeliosTransportConfig, INITIAL_ROLE_STAKES, INLINE_ALG_IDS, InitConfig, LINKS, LivenessRegistryABI, LivenessRegistryArtifact, MAX_GUARDIAN_SLOT, MAX_SERVICE_FEE, MICRO_PAYMENT_CHANNEL_ADDRESS, MONITORING_ADDRESSES, MicroPaymentChannelABI, MicroPaymentChannelArtifact, MySBTABI, MySBTArtifact, NETWORKS, NODE_STAKE_AMOUNTS, type NetworkContracts, NodeType, OFFICIAL_ADDRESSES, type OperatorMode, type P256SessionState, P256_GUARDIAN_DOMAIN, P256_GUARDIAN_SENTINEL, PAYMASTER_ADDRESSES, PAYMASTER_FACTORY_ADDRESS, PAYMASTER_V4_ADDRESS, PAYMASTER_V4_IMPL_ADDRESS, PaymasterABI, type PaymasterActions, PaymasterArtifact, PaymasterFactoryABI, type PaymasterFactoryActions, PaymasterFactoryArtifact, type PendingExit, PolicyDecision, PolicyRegistryABI, type PolicyRegistryActions, PolicyRegistryArtifact, PublicClient, RECOVERY_NONCE_SLOT, REGISTRY_ADDRESS, REPUTATION_SYSTEM_ADDRESS, ROLE_ANODE, ROLE_COMMUNITY, ROLE_DVT, ROLE_ENDUSER, ROLE_KMS, ROLE_NAMES, ROLE_PAYMASTER_AOA, ROLE_PAYMASTER_SUPER, ROLE_PERMISSION_LEVELS, RailgunParserABI, RegistryABI, type RegistryActions, RegistryArtifact, type ReputationActions, type ReputationBreakdown, type ReputationRule, ReputationSystemABI, ReputationSystemArtifact, RequirementChecker, type ResourceBoolCheck, type ResourceReport, type ResourceStakeCheck, type RoleConfig, type RoleConfigDetailed, RolePermissionLevel, type RoleRequirement, type RoleValidationParams, type SBTActions, type SBTData, type SBTMembership, SBT_ADDRESS, SECP256R1_N, SECP256R1_N_OVER_2, SEPOLIA_CONTRACTS, SEPOLIA_V2_VERSIONS, SERVICE_FEE_RATE, SUPER_PAYMASTER_ADDRESS, SaleContractV2ABI, type ScalarLike, SepoliaFaucetAPI, type SessionConfig, SessionKeyValidatorABI, type SessionKeyValidatorActions, SessionKeyValidatorArtifact, type SignP256GuardianAssertionParams, type SignedP256GuardianAssertion, SimpleAccountABI, SimpleAccountArtifact, SimpleAccountFactoryABI, SimpleAccountFactoryArtifact, type SpendCounter, type StakingActions, StateValidator, SuperPaymasterABI, SuperPaymasterArtifact, type SuperPaymasterConfig, type SupportedNetwork, TEST_ACCOUNT_ADDRESSES, TEST_ACCOUNT_POOL_SIZE, TEST_COMMUNITIES, TEST_TOKEN_ADDRESSES, TIER_LIMIT_NONCE_SLOT, TOKEN_ADDRESSES, TimelockControllerABI, type TimelockControllerActions, type TimelockOperation, type TokenActions, type TokenBalanceValidationParams, UniswapV3ParserABI, type UserOperationV07, V2_SUMMARY, type ValidationParams, type ValidationResult, WEBAUTHN_GET_CHALLENGE_PREFIX, type X402Actions, X402FacilitatorABI, X402FacilitatorArtifact, XPNTS_FACTORY_ADDRESS, type XPNTsFactoryActions, type XPNTsTokenActions, ZERO_BYTES32, accountActions, accountFactoryActions, agentActions, agentRegistryActions, airAccountExtensionActions, airAccountFactoryActions, applyConfig, assertCommitteeSubmittable, base64UrlEncode, blsAlgorithmActions, buildAddGuardianChallenge, buildAddP256GuardianChallenge, buildApproveRecoveryChallenge, buildCancelRecoveryChallenge, buildCreateAccountHash, buildModifyTierLimitsChallenge, buildP256GuardianChallenge, buildProposeRecoveryChallenge, buildRemoveGuardianChallenge, checkDvtConnectivity, configHashFromInitConfig, coseToP256XY, createAAStarPublicClient, createHeliosTransport, decodeWebAuthnAssertion, dvtActions, dvtOperatorActions, encodeCommunityRoleData, encodeEnrollInCommitteeValidator, encodeWebAuthnAssertion, entryPointActions, fetchCommitteeSigners, forceExitActions, gTokenActions, gTokenAuthorizationActions, getAddressUrl, getAllCommunityConfigs, getAllV2Contracts, getBlockExplorer, getChainId, getCommitteeState, getCommunities, getCommunity, getCommunityConfig, getContract, getContractNetworks, getContracts, getCoreContracts, getDefaultDvtNodes, getDeploymentDate, getDvtConfig, getDvtRelayerUrls, getDvtRelayerUrlsForChain, getEntryPoint, getMountedDvtValidator, getNetwork, getPaymasterV4_1, getRoleName, getRpcUrl, getSimpleAccountFactory, getSuperPaymasterV2, getTestAccounts, getTestTokenContracts, getTokenContracts, getTxUrl, getV2ContractByAddress, getV2ContractByName, getV2ContractsByDate, hashToFieldU0U1, isAccountEnrolled, isContractNetworkSupported, isRegisteredCommunity, isV2Contract, lookupAddress, needsValidatorRouter, opDataAddGuardian, opDataAddP256Guardian, opDataModifyTierLimits, opDataRecovery, opDataRemoveGuardian, p256GuardianPublicKey, paymasterActions, paymasterFactoryActions, policyRegistryActions, registryActions, reputationActions, resolveEns, resolveEnsVerified, sbtActions, sessionKeyValidatorActions, signP256GuardianAssertion, stakingActions, timelockControllerActions, tokenActions, x402Actions, x402IsNonceUsed, x402NonceKey, xPNTsFactoryABI, xPNTsFactoryActions, xPNTsFactoryArtifact, xPNTsTokenABI, xPNTsTokenActions, xPNTsTokenArtifact };