import { WalletClient, Address, Hex } from 'viem'; import { P as PaymasterConfig } from './index-B6SfEQxo.js'; declare class DVTClient { static registerValidator(wallet: WalletClient, dvtAddr: Address, blsPublicKey: Hex): Promise<`0x${string}`>; } type UseCreditScoreConfig = { chain: any; rpcUrl?: string; registryAddress: Address; userAddress: Address; transport?: any; }; declare function useCreditScore({ chain, rpcUrl, registryAddress, userAddress }: UseCreditScoreConfig): { creditLimit: bigint | null; loading: boolean; }; type UseSuperPaymasterResult = { generatePaymasterAndData: (userOp: any) => Promise; isLoading: boolean; error: Error | null; }; declare function useSuperPaymaster(config: PaymasterConfig): UseSuperPaymasterResult; /** * eip1193.ts — EIP-1193 compatible provider wrapping AirAccount M7. * * Intercepts eth_sendTransaction and converts it to an ERC-4337 v0.7 * PackedUserOperation submitted to the bundler via eth_sendUserOperation. * All other JSON-RPC methods are forwarded to the public RPC. */ interface AirAccountProviderConfig { /** EVM chain ID */ chainId: number; /** Public JSON-RPC URL */ rpcUrl: string; /** ERC-4337 bundler URL */ bundlerUrl: string; /** EntryPoint v0.7 address (defaults to canonical) */ entryPoint?: Address; /** The user's AirAccount smart contract address */ accountAddress: Address; /** * Signs the UserOp hash and returns a 65-byte hex signature. * For passkey/ECDSA, format as M7 composite validator signature. */ signer: (userOpHash: Hex) => Promise; } /** * AirAccountEIP1193Provider — drop-in EIP-1193 wallet backed by an AirAccount M7 smart account. * * Usage: * ```ts * const provider = new AirAccountEIP1193Provider({ * chainId: 11155111, * rpcUrl: 'https://rpc.sepolia.org', * bundlerUrl: 'https://api.pimlico.io/v2/11155111/rpc?apikey=...', * accountAddress: '0x...', * signer: async (hash) => passkeySign(hash), * }); * // Pass to wagmi, ethers.js BrowserProvider, or window.ethereum * ``` */ declare class AirAccountEIP1193Provider { private readonly config; private readonly client; private readonly listeners; constructor(config: AirAccountProviderConfig); request({ method, params }: { method: string; params?: unknown[]; }): Promise; on(event: string, listener: (...args: unknown[]) => void): this; removeListener(event: string, listener: (...args: unknown[]) => void): this; private _sendTransaction; private _forwardToRpc; } /** * eip6963.ts — EIP-6963 Multi Injected Provider Discovery for AirAccount. * * Announces AirAccount as an EIP-1193 wallet via the eip6963:announceProvider * DOM event, enabling DApps to auto-discover it without relying on window.ethereum. * * Reference: https://eips.ethereum.org/EIPS/eip-6963 */ interface EIP6963ProviderInfo { /** Globally unique wallet identifier (UUID v4). Must not change across sessions. */ uuid: string; /** Human-readable wallet name displayed in DApp UI */ name: string; /** Wallet icon as a data URI (SVG or PNG, base64) */ icon: string; /** Reverse-DNS identifier, e.g. "community.aastar.airaccount" */ rdns: string; } interface EIP6963ProviderDetail { info: EIP6963ProviderInfo; provider: AirAccountEIP1193Provider; } /** * Announce AirAccount as an EIP-6963 wallet so DApps can auto-discover it. * * Call this once at app startup. Returns a cleanup function that removes the * event listener when the wallet is no longer available. * * @example * ```ts * const provider = new AirAccountEIP1193Provider({ ... }); * const cleanup = announceAirAccount(provider); * // later: cleanup() to stop announcing * ``` */ declare function announceAirAccount(provider: AirAccountEIP1193Provider, info?: Partial): () => void; /** * Listen for EIP-6963 wallet announcements from other providers in the page. * Useful for composing AirAccount with MetaMask fallback, etc. * * Returns a cleanup function to stop listening. */ declare function watchProviders(onProvider: (detail: EIP6963ProviderDetail) => void): () => void; export { AirAccountEIP1193Provider, type AirAccountProviderConfig, DVTClient, type EIP6963ProviderDetail, type EIP6963ProviderInfo, announceAirAccount, useCreditScore, useSuperPaymaster, watchProviders };