export interface AuthState { token: string; userId: string; createdAt: string; expiresAt: string; } /** * Register a password for a user. Creates or updates the credential record. * Returns true on success, false if the user doesn't exist. */ export declare function registerPassword(userId: string, password: string): Promise; /** * Authenticate a user by email and password. * On success, creates an auth token, sets the user active, and returns the AuthState. * On failure, returns null. */ export declare function login(email: string, password: string): Promise; /** * Log out the current user. Clears the auth token. */ export declare function logout(): void; /** * Get the currently authenticated user (from the auth token). * Returns null if not authenticated or token expired. */ export declare function getAuthenticatedUser(): { userId: string; token: string; } | null; /** * Check whether a user has a password set. */ export declare function hasPassword(userId: string): boolean; /** * Delete a user's credential record. */ export declare function deleteCredentials(userId: string): boolean;