/** * Keychain Credential Storage * * Provides secure OS keychain integration for storing the recovery phrase * using the `keytar` library. Supports macOS Keychain, Windows Credential Vault, * and Linux Secret Service (via libsecret). * * Security notes: * - Recovery phrases are stored in the OS-managed credential store * - The server never sees plaintext passwords * - Credentials are scoped per userId * - No passwords are logged or written to disk outside the OS keychain */ /** * Check whether the OS keychain backend is available in this environment. * * @returns true if keytar loaded successfully */ export declare function isKeychainAvailable(): boolean; /** * Store a recovery phrase in the OS keychain. * * @param userId - The user identifier (used as the "account" in the keychain) * @param masterPassword - The plaintext recovery phrase to store * @throws Error if the keychain backend is unavailable */ export declare function storeCredentials(userId: string, masterPassword: string): Promise; /** * Retrieve a recovery phrase from the OS keychain. * * @param userId - The user identifier * @returns The stored recovery phrase, or null if none exists * @throws Error if the keychain backend is unavailable */ export declare function getCredentials(userId: string): Promise; /** * Delete a stored recovery phrase from the OS keychain. * * @param userId - The user identifier * @returns true if a credential was deleted, false if none existed * @throws Error if the keychain backend is unavailable */ export declare function deleteCredentials(userId: string): Promise; /** * Check whether credentials exist in the OS keychain for a given user. * * @param userId - The user identifier * @returns true if a credential is stored for this userId * @throws Error if the keychain backend is unavailable */ export declare function hasCredentials(userId: string): Promise; //# sourceMappingURL=keychain.d.ts.map