/** * Secure Client-Side Session Service * * Manages wallet sessions with cryptographically secure token generation * Uses Web Crypto API for secure random generation */ export interface WalletSession { walletAddress: string; merchantId: string; chainId: string; sessionToken: string; expiresAt: number; createdAt: number; lastActiveAt: number; } export interface SessionOptions { persistent?: boolean; ttl?: number; } export declare class SecureSessionService { private static readonly SESSION_KEY_PREFIX; private static readonly DEFAULT_TTL; /** * Generate cryptographically secure session token */ private static generateSecureToken; /** * Create a new wallet session with secure token */ static createSession(walletAddress: string, merchantId: string, chainId: string, options?: SessionOptions): Promise; /** * Get current active session */ static getSession(persistent?: boolean): WalletSession | null; /** * Get session by token */ static getSessionByToken(sessionToken: string, persistent?: boolean): WalletSession | null; /** * Update session */ static updateSession(sessionToken: string, updates: Partial, persistent?: boolean): WalletSession | null; /** * Delete session */ static deleteSession(sessionToken: string, persistent?: boolean): boolean; /** * Delete all sessions */ static clearAllSessions(): void; /** * Delete sessions for a specific wallet address */ static clearWalletSessions(walletAddress: string): void; /** * Check if user has active session */ static hasActiveSession(): boolean; /** * Get all active sessions (for debugging) */ static getAllSessions(): WalletSession[]; /** * Refresh session expiry */ static refreshSession(sessionToken: string, ttl?: number, persistent?: boolean): Promise; /** * Clean up expired sessions */ static cleanupExpiredSessions(): number; private static getSessionKey; private static saveSession; private static clearSessionsFromStorage; private static clearWalletSessionsFromStorage; } //# sourceMappingURL=session.service.secure.d.ts.map