import type { GenericError } from '@forgerock/sdk-types'; import type { FidoAuthenticationInputValue, FidoRegistrationInputValue } from '../collector.types.js'; import type { FidoAuthenticationOptions, FidoRegistrationOptions } from '../davinci.types.js'; import type { FidoErrorCode } from './fido.types.js'; /** * Convert DaVinci registration options to PublicKeyCredentialCreationOptions * @function transformRegistrationOptions * @param { FidoRegistrationOptions } options - DaVinci FIDO registration options * @returns { PublicKeyCredentialCreationOptions } - WebAuthn API compatible registration options */ export declare function transformRegistrationOptions(options: FidoRegistrationOptions): PublicKeyCredentialCreationOptions; /** * Format the credential to send back to DaVinci for registration * @function transformPublicKeyCredential * @param { PublicKeyCredential } credential - The credential returned from navigator.credentials.create() * @returns { FidoRegistrationInputValue } - The formatted credential for registering with DaVinci */ export declare function transformPublicKeyCredential(credential: PublicKeyCredential): FidoRegistrationInputValue; /** * Convert DaVinci authentication options to PublicKeyCredentialRequestOptions * @function transformAuthenticationOptions * @param { FidoAuthenticationOptions } options - DaVinci FIDO authentication options * @returns { PublicKeyCredentialRequestOptions } - WebAuthn API compatible authentication options */ export declare function transformAuthenticationOptions(options: FidoAuthenticationOptions): PublicKeyCredentialRequestOptions; /** * Format the assertion to send back to DaVinci for authentication * @function transformAssertion * @param { PublicKeyCredential } credential - The credential returned from navigator.credentials.get() * @returns { FidoAuthenticationInputValue } - The formatted credential for authenticating with DaVinci */ export declare function transformAssertion(credential: PublicKeyCredential): FidoAuthenticationInputValue; /** * Maps an error to a FidoErrorCode. * @param error - The error from WebAuthn API * @returns The corresponding FidoErrorCode */ export declare function toFidoErrorCode(error: unknown): FidoErrorCode; /** * Creates a GenericError for FIDO operations with proper typing. * @param code - The WebAuthn error code * @param errorType - The error category (e.g., 'registration_error', 'authentication_error') * @param message - Human-readable error message * @returns A properly typed GenericError */ export declare function createFidoError(code: FidoErrorCode, errorType: string, message: string): GenericError; //# sourceMappingURL=fido.utils.d.ts.map