import { P as PublicSession, W as Web3Chain } from './auth-c1d7Eji2.js'; interface AuthTransport { /** Store credentials after successful login */ storeCredentials(token: string, session: PublicSession): Promise; /** Retrieve the stored auth token (null if not authenticated) */ getToken(): Promise; /** Get headers to attach to authenticated API requests */ getHeaders(): Promise>; /** Read the stored session without a network call */ getStoredSession(): Promise; /** Clear all stored auth data */ clear(): Promise; } interface AuthClientConfig { /** Base URL for app API routes (e.g. http://localhost:3000) */ apiBaseUrl: string; /** Direct StackNet URL for challenges (defaults to https://stacknet.magma-rpc.com) */ stacknetUrl?: string; /** Stack identifier */ stackId?: string; /** Auth transport (web cookies or native secure storage) */ transport: AuthTransport; /** Optional fallback token for dev (e.g. service key) */ serviceKey?: string; /** Callbacks */ onAuthSuccess?: (session: PublicSession) => void; onAuthError?: (error: Error) => void; onLogout?: () => void; } interface AuthClient { /** Email + password login */ login(email: string, password: string): Promise; /** Web3 wallet login (challenge must be obtained first) */ loginWeb3(params: { chain: Web3Chain; address: string; message: string; signature: string; }): Promise; /** OTP code login */ loginOTP(code: string): Promise; /** Get current session (from storage, then validate with server) */ getSession(): Promise; /** Check if token is valid with the server */ checkSession(): Promise; /** Get a web3 challenge for wallet signing */ getChallenge(chain: Web3Chain, address: string): Promise<{ message: string; nonce: string; }>; /** Sign out and clear stored credentials */ logout(): Promise; /** Get auth headers for API requests */ getHeaders(): Promise>; /** Get stored token directly */ getToken(): Promise; } export type { AuthClient as A, AuthClientConfig as a, AuthTransport as b };