import type { NonceCacheLike } from './types.js'; /** * Persistent nonce cache using IndexedDB (browser) and localStorage. * Implements NonceCacheLike interface for use with verifyLoginProof. */ export declare class PersistentNonceCache implements NonceCacheLike { private readonly ttlMs; private readonly storageKey; private readonly useIndexedDB; private db; constructor(ttlMs?: number, storageKey?: string); /** * Initialize IndexedDB if available. */ init(): Promise; /** * Check if nonce is valid (not seen within TTL). Records nonce on success. * Uses localStorage for synchronous access (required by NonceCacheLike interface). * Also persists to IndexedDB in background if available. */ isValid(nonce: string, timestamp: number): boolean; /** * Synchronous validation using localStorage (primary storage). */ private isValidSync; /** * Persist nonce to IndexedDB in background (async, non-blocking). */ private persistToIndexedDB; /** * Cleanup expired entries (localStorage and IndexedDB). */ private cleanupSync; /** * Cleanup expired entries from IndexedDB (async, non-blocking). */ private cleanupIndexedDB; /** * Clear all entries. */ clear(): void; } //# sourceMappingURL=persistentNonceCache.d.ts.map