import { FastifyInstance, FastifyReply } from "fastify";
import { GenerateAuthenticationOptionsOpts } from "@simplewebauthn/server";
import { UserCredential } from "../../data/user-credential";
import { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from "@simplewebauthn/typescript-types";
import { GenerateRegistrationOptionsOpts } from "@simplewebauthn/server/dist/registration/generateRegistrationOptions";
import { PaymentRequestOptionsJSON, PaymentResponseJSON } from "./types";
export interface WebAuthnAuthenticationOptionsBody extends Pick<UserCredential, "authenticatorType"> {
    email?: string;
    redirectUrl?: string;
    register?: boolean;
    state?: string;
    registration?: Partial<GenerateRegistrationOptionsOpts>;
    authentication?: Partial<GenerateAuthenticationOptionsOpts>;
    payment?: Partial<PaymentRequestOptionsJSON>;
}
export interface WebAuthnAuthenticationPaymentOptions {
    options: PaymentRequestOptionsJSON;
    state: string;
}
export interface WebAuthnAuthenticationResponse extends Pick<UserCredential, "authenticatorType"> {
    authentication?: {
        options: PublicKeyCredentialRequestOptionsJSON;
        state: string;
        required?: boolean;
    };
    registration?: {
        options: PublicKeyCredentialCreationOptionsJSON;
        state: string;
    };
    payment?: WebAuthnAuthenticationPaymentOptions;
}
export interface VerifyWebAuthnAuthenticationOptionsBody {
    registration?: RegistrationResponseJSON;
    authentication?: AuthenticationResponseJSON;
    payment?: PaymentResponseJSON;
    state: string;
}
export interface VerifyWebAuthnAuthenticationResponse {
    verified: boolean;
    redirectUrl?: string;
    userCredentialId?: string;
    userCredentialState?: string;
}
export declare function webauthnRoutes(fastify: FastifyInstance): Promise<void>;
export declare function getWebAuthnAuthenticationOptions(body: WebAuthnAuthenticationOptionsBody): Promise<WebAuthnAuthenticationResponse>;
export declare function verifyWebAuthnAuthentication(body: VerifyWebAuthnAuthenticationOptionsBody, response?: FastifyReply): Promise<VerifyWebAuthnAuthenticationResponse>;
