type Result = { ok: true; data: T; } | { ok: false; error: E; more?: unknown; }; type WebAuthnError = 'webauthn_unavailable' | 'timeout' | 'network_error' | 'bad_request' | 'server_error' | 'canceled_by_user' | 'invalid_domain' | 'browser_bug?' | 'api_unsupported_in_browser' | 'unexpected'; export type AuthResponse = Result<{ token: string; }, WebAuthnError>; export type RegisterResponse = Result<{ token: string; }, WebAuthnError>; type UserIdOrUsername = { id: string; } | { username: string; }; export type UserAuthenticationInfo = UserIdOrUsername; export type UserRegistrationInfo = { username: string; displayName?: string; }; declare class SDK { private apiKey; private host; private abortSignals; constructor(publicKey: string, host?: string); get isWebAuthnAvailable(): boolean; isConditionalCreateAvailable(): Promise; isConditionalGetAvailable(): Promise; startRegister(user: UserRegistrationInfo): Promise; startAuth(user: UserAuthenticationInfo): Promise; autofill(): Promise; upgradeToPasskey(user: UserRegistrationInfo): Promise; handleAutofill(callback: (arg0: AuthResponse) => void): Promise; private doRegister; private doAuth; private api; private mustBePublicKeyCredential; private genericError; private convertCredentialsError; private convertNetworkError; private cancelExistingRequests; } export default SDK;