import * as plugins from '../plugins.js';
import type { IUser } from '../types.js';
import type { OpsServer } from './classes.opsserver.js';
import type * as interfaces from '../../dist_ts_interfaces/index.js';
type TWebAuthnServer = Pick<typeof plugins.simplewebauthnServer, 'generateRegistrationOptions' | 'verifyRegistrationResponse' | 'generateAuthenticationOptions' | 'verifyAuthenticationResponse'>;
interface IPasskeyManagerOptions {
    developmentOrigin?: string;
    now?: () => number;
    webauthnServer?: TWebAuthnServer;
    bootstrapTokenFactory?: () => string;
}
export declare class PasskeyManager {
    private opsServerRef;
    private readonly adminUsername;
    private readonly developmentOrigin?;
    private readonly now;
    private readonly webauthnServer;
    private readonly bootstrapTokenFactory;
    private bootstrapTokenHash;
    private bootstrapExpiresAt;
    private setupAttemptTimestamps;
    private registrationCeremonies;
    private authenticationCeremonies;
    private registrationLock;
    constructor(opsServerRef: OpsServer, optionsArg?: IPasskeyManagerOptions);
    initialize(): Promise<void>;
    getAuthState(originArg: string): Promise<interfaces.requests.IReq_GetAdminAuthState['response']>;
    beginRegistration(originArg: string, bootstrapTokenArg: string): Promise<interfaces.requests.IReq_BeginAdminPasskeyRegistration['response']>;
    finishRegistration(ceremonyIdArg: string, bootstrapTokenArg: string, responseArg: plugins.simplewebauthnServer.RegistrationResponseJSON): Promise<{
        user: IUser & {
            id?: number;
        };
        credentialId: string;
    }>;
    beginAuthentication(originArg: string): Promise<interfaces.requests.IReq_BeginAdminPasskeyAuthentication['response']>;
    finishAuthentication(ceremonyIdArg: string, responseArg: plugins.simplewebauthnServer.AuthenticationResponseJSON): Promise<{
        user: IUser & {
            id?: number;
        };
        credentialId: string;
    }>;
    isCredentialActive(usernameArg: string, credentialIdArg: string): Promise<boolean>;
    private getAdminUser;
    private getConfiguredRelyingParty;
    private getPinnedRelyingParty;
    private assertExpectedOrigin;
    private hashBootstrapToken;
    private assertBootstrapToken;
    private isBootstrapExpired;
    private assertSetupAttemptAllowed;
    private purgeExpiredCeremonies;
    private consumeRegistrationCeremony;
    private consumeAuthenticationCeremony;
    private withRegistrationLock;
}
export {};
