/** * Client-Side Session Service * * Manages wallet sessions in browser localStorage/sessionStorage * Replaces server-side session management for fully decentralized auth */ 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 SessionService { private static readonly SESSION_KEY_PREFIX; private static readonly DEFAULT_TTL; /** * Create a new wallet session */ static createSession(walletAddress: string, merchantId: string, chainId: string, options?: SessionOptions): WalletSession; /** * 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): WalletSession | null; /** * Clean up expired sessions */ static cleanupExpiredSessions(): number; private static generateSessionToken; private static getSessionKey; private static saveSession; private static clearSessionsFromStorage; private static clearWalletSessionsFromStorage; } //# sourceMappingURL=session.service.d.ts.map