export interface AuthAttemptState {
    failures: number;
    lockedUntil: Date | null;
}
export declare class AuthManager {
    readonly authAttempts: Map<string, AuthAttemptState>;
    readonly pendingAuth: Map<string, string>;
    readonly sessionAuth: Map<string, {
        passwordHash: string;
        passwordSalt: string;
    }>;
    private serverSecret;
    onMutation?: () => void;
    constructor(serverSecret?: Buffer);
    hashPassword(password: string): {
        hash: string;
        salt: string;
    };
    verifyPassword(submitted: string, storedHash: string, storedSalt: string): boolean;
    setSessionPassword(sessionId: string, hash: string, salt: string): void;
    getSessionAuth(sessionId: string): {
        passwordHash: string;
        passwordSalt: string;
    } | undefined;
    requiresAuth(sessionId: string): boolean;
    generateAuthToken(sessionId: string): string;
    verifyAuthToken(token: string, expectedSessionId: string): boolean;
    isLocked(sessionId: string): boolean;
    recordFailure(sessionId: string): {
        locked: boolean;
        remaining: number;
    };
    clearFailures(sessionId: string): void;
    getServerSecret(): string;
    serialize(): {
        serverSecret: string;
        sessionAuth: Record<string, {
            passwordHash: string;
            passwordSalt: string;
        }>;
        authAttempts: Record<string, {
            failures: number;
            lockedUntil: number | null;
        }>;
    };
    loadFrom(data: {
        serverSecret?: string;
        sessionAuth?: Record<string, {
            passwordHash: string;
            passwordSalt: string;
        }>;
        authAttempts?: Record<string, {
            failures: number;
            lockedUntil: number | null;
        }>;
    }): void;
    setPending(clientId: string, sessionId: string): void;
    getPending(clientId: string): string | undefined;
    removePending(clientId: string): void;
}
export declare const auth: AuthManager;
