import { Address, PublicClient } from 'viem'; import { a as ASPInfo, I as IASPProvider } from '../types-EgAvBFvJ.js'; export { s as storePersonalASPId } from '../localStorage-CptisNFJ.js'; interface UseASPConfig { /** ASP Registry Hub contract address */ registryAddress: Address; /** viem PublicClient for reading chain data */ publicClient: PublicClient; /** User's wallet address */ userAddress?: Address; } interface ASPStatus { /** ASP ID (0 if not registered) */ aspId: bigint; /** Current on-chain root */ currentRoot: bigint; /** Whether the ASP is registered */ isRegistered: boolean; } interface UseASPReturn { /** Current ASP status */ aspStatus: ASPStatus | null; /** Whether loading initial state */ isLoading: boolean; /** Error from last operation */ error: Error | null; /** Get the ASP ID */ getASPId: () => bigint | null; /** Refresh ASP info from contract */ refresh: () => Promise; } declare function useASP(config: UseASPConfig): UseASPReturn; interface UseASPRegistryConfig { /** ASP Registry Hub contract address */ registryAddress: Address; /** viem PublicClient for reading chain data */ publicClient: PublicClient | undefined; } interface UseASPRegistryReturn { /** All registered ASPs */ asps: ASPInfo[]; /** Whether loading */ isLoading: boolean; /** Error from last fetch */ error: Error | null; /** Refresh the list */ refresh: () => Promise; } declare function useASPRegistry(config: UseASPRegistryConfig): UseASPRegistryReturn; interface UseASPTreeManagerConfig { /** Provider instance for member storage */ provider: IASPProvider; /** ASP Registry Hub address (for publishing roots) */ registryAddress?: `0x${string}`; /** ASP ID (for publishing roots) */ aspId?: bigint; } interface UseASPTreeManagerReturn { /** Current members */ members: bigint[]; /** Current root */ root: bigint; /** Whether loading */ isLoading: boolean; /** Add a member */ addMember: (identity: bigint) => Promise; /** Remove a member */ removeMember: (identity: bigint) => Promise; /** Publish root on-chain */ publishRoot: (walletClient: any) => Promise<`0x${string}`>; /** Refresh state from provider */ refresh: () => Promise; } declare function useASPTreeManager(config: UseASPTreeManagerConfig): UseASPTreeManagerReturn; type ASPMembershipStatus = 'loading' | 'whitelisted' | 'pending' | 'blocked' | 'not-whitelisted' | 'no-service' | 'error'; interface UseASPMembershipConfig { /** ASP service base URL (e.g., 'https://asp-whitelist.upd.io') */ serviceUrl: string | undefined; } interface UseASPMembershipReturn { /** Current membership status */ status: ASPMembershipStatus; /** Total whitelisted member count (from global /status) */ memberCount: number | null; /** Error message (if status === 'error') */ error: string | null; /** Refresh the status */ refresh: () => Promise; } declare function useASPMembership(config: UseASPMembershipConfig): UseASPMembershipReturn; interface ASPProofData { /** ASP ID (on-chain identifier) */ aspId: bigint; /** Merkle root */ root: bigint; /** Path elements (siblings) */ pathElements: bigint[]; /** Path indices */ pathIndices: number[]; } interface UseASPProofConfig { /** ASP service base URL */ serviceUrl: string | undefined; /** ASP ID (on-chain identifier) */ aspId: bigint | undefined; } interface UseASPProofReturn { /** Fetch the proof for a given address */ fetchProof: (addressOverride?: string) => Promise; /** Last fetched proof */ proof: ASPProofData | null; /** Whether currently fetching */ isLoading: boolean; /** Error from last fetch */ error: string | null; } declare function useASPProof(config: UseASPProofConfig): UseASPProofReturn; interface StarkASPProofData { /** ASP ID (on-chain identifier) */ aspId: bigint; /** STARK tree root */ root: bigint; /** Leaf value (M31-encoded address) */ leaf: bigint; /** Index of the leaf in insertion order */ leafIndex: number; /** Tree depth (fixed across every proof in this tree) */ depth: number; /** Sibling at each level; length === depth */ pathElements: bigint[]; /** Side bit at each level (0 or 1); length === depth */ pathIndices: number[]; } interface UseStarkASPProofConfig { /** ASP service base URL */ serviceUrl: string | undefined; /** ASP ID (on-chain identifier) */ aspId: bigint | undefined; } interface UseStarkASPProofReturn { /** Fetch the STARK proof for a given address */ fetchProof: (addressOverride?: string) => Promise; /** Last fetched proof */ proof: StarkASPProofData | null; /** Whether currently fetching */ isLoading: boolean; /** Error from last fetch */ error: string | null; } declare function useStarkASPProof(config: UseStarkASPProofConfig): UseStarkASPProofReturn; export { type ASPMembershipStatus, type ASPProofData, type ASPStatus, type StarkASPProofData, type UseASPConfig, type UseASPMembershipConfig, type UseASPMembershipReturn, type UseASPProofConfig, type UseASPProofReturn, type UseASPRegistryConfig, type UseASPRegistryReturn, type UseASPReturn, type UseASPTreeManagerConfig, type UseASPTreeManagerReturn, type UseStarkASPProofConfig, type UseStarkASPProofReturn, useASP, useASPMembership, useASPProof, useASPRegistry, useASPTreeManager, useStarkASPProof };