/** * LocalSecret Storage * * IndexedDB-based storage for LocalSecrets. * The LocalSecret is stored locally on the device and never sent to servers. * * Issue #1649 */ import type { LocalSecretStorage, StoredLocalSecret } from "./types"; /** * Get or create a unique device ID * * The device ID is stored in localStorage for persistence. */ export declare function getOrCreateDeviceId(): Promise; /** * Store a LocalSecret in IndexedDB * * @param userId - User's Cognito sub * @param secret - The 32-byte LocalSecret */ export declare function storeLocalSecret(userId: string, secret: Uint8Array): Promise; /** * Retrieve a LocalSecret from IndexedDB * * @param userId - User's Cognito sub * @returns The LocalSecret or null if not found */ export declare function getLocalSecret(userId: string): Promise; /** * Delete a LocalSecret from IndexedDB * * @param userId - User's Cognito sub */ export declare function deleteLocalSecret(userId: string): Promise; /** * Check if a LocalSecret exists for a user * * @param userId - User's Cognito sub * @returns true if a LocalSecret exists */ export declare function hasLocalSecret(userId: string): Promise; /** * Get the stored LocalSecret record (including metadata) * * @param userId - User's Cognito sub * @returns The full storage record or null */ export declare function getLocalSecretRecord(userId: string): Promise; /** * Create a LocalSecretStorage implementation using IndexedDB */ export declare function createIndexedDBStorage(): LocalSecretStorage;