/** * CryptoLogin Client SDK - TypeScript Definitions */ interface CryptoLoginClientOptions { baseURL: string; timeout?: number; onError?: (error: Error) => void; } interface Session { sessionId: string; userId: string; expiresAt: string; authenticated: boolean; } interface RegisterResponse { success: boolean; data?: { user_id: string; }; message?: string; } interface LoginInitResponse { challenge: string; message: string; } interface LoginVerifyResponse { authenticated: boolean; session_id: string; user_id: string; expires_at: string; } declare class CryptoLoginClient { constructor(options: CryptoLoginClientOptions); get isAuthenticated(): boolean; get sessionId(): string | null; get userId(): string | null; register(masterSecret: string, userData?: Record): Promise; login(masterSecret: string): Promise; logout(): Promise; } declare function createClient(options: CryptoLoginClientOptions): CryptoLoginClient; declare function deriveUserId(masterSecret: string): Promise; declare function isValidUserId(userId: string): boolean; declare function generateChallenge(length?: number): string; declare function saveSession(session: Session, key?: string): void; declare function loadSession(key?: string): Session | null; declare function clearSession(key?: string): void; declare function isWebCryptoSupported(): boolean; declare function generateId(): string; declare const VERSION: string; export { CryptoLoginClient, VERSION, clearSession, createClient, deriveUserId, generateChallenge, generateId, isValidUserId, isWebCryptoSupported, loadSession, saveSession }; export type { CryptoLoginClientOptions, LoginInitResponse, LoginVerifyResponse, RegisterResponse, Session };