/** * Unified error handling utilities for biometric authentication. * * Consolidates error mapping across platforms and ensures errors returned to callers * carry only a safe, minimal `details` (`{ name }`) — never raw platform error objects, * messages, or stack traces (which can leak internal paths / sensitive context). */ import { BiometricError, BiometricAuthResult } from '../types/index.js'; /** * Map a WebAuthn DOMException to a BiometricError */ export declare function mapDOMException(error: DOMException): BiometricError; /** * Map a generic Error to a BiometricError */ export declare function mapGenericError(error: Error): BiometricError; /** * Map any unknown thrown value to a BiometricError */ export declare function mapWebAuthnError(error: unknown): BiometricError; /** * Map a native platform error (iOS/Android/Windows) to a BiometricError */ export declare function mapNativeError(error: Error, platform: string): BiometricError; /** * Create a failed BiometricAuthResult from a thrown value. */ export declare function createErrorResult(error: unknown, platform?: string): BiometricAuthResult; /** * Check if a thrown value represents a user cancellation */ export declare function isUserCancellation(error: unknown): boolean; /** * Check if a thrown value represents a timeout */ export declare function isTimeout(error: unknown): boolean; /** * Check if a thrown value indicates biometrics are unavailable */ export declare function isBiometricUnavailable(error: unknown): boolean;