/** * The FIDO2 Attestation Request * https://www.w3.org/TR/webauthn-3/#dictionary-makecredentialoptions */ export type PasskeyBinaryValue = Uint8Array | ArrayBuffer | number[] | string; export interface PasskeyCreateRequest { challenge: string; rp: { id: string; name: string; }; user: { id: string; name: string; displayName: string; }; pubKeyCredParams: Array<{ type: 'public-key'; alg: number; }>; timeout?: number; excludeCredentials?: Array; authenticatorSelection?: { authenticatorAttachment?: 'platform' | 'cross-platform'; requireResidentKey?: boolean; residentKey?: 'discouraged' | 'preferred' | 'required'; userVerification?: 'discouraged' | 'preferred' | 'required'; }; attestation?: 'none' | 'indirect' | 'direct' | 'enterprise'; extensions?: { largeBlob?: { support?: 'preferred' | 'required'; read?: boolean; write?: PasskeyBinaryValue; }; prf?: { eval?: AuthenticationExtensionsPRFValues; evalByCredential?: Record | Array>; }; }; } /** * The FIDO2 Attestation Result * https://www.w3.org/TR/webauthn-3/#iface-pkcredential */ export interface PasskeyCreateResult { id: string; rawId: string; type?: string; authenticatorAttachment?: string; response: { clientDataJSON: string; attestationObject: string; authenticatorData?: string; transports?: Array; publicKeyAlgorithm?: number; publicKey?: string; }; clientExtensionResults?: { largeBlob?: { supported?: boolean; blob?: Record; written?: boolean; }; prf?: { enabled?: boolean; results?: AuthenticationExtensionsPRFValues; }; }; } /** * The FIDO2 Assertion Request * https://www.w3.org/TR/webauthn-3/#dictionary-assertion-options */ export interface PasskeyGetRequest { challenge: string; rpId: string; timeout?: number; allowCredentials?: Array; userVerification?: 'discouraged' | 'preferred' | 'required'; extensions?: { largeBlob?: { read?: boolean; write?: PasskeyBinaryValue; }; prf?: { eval?: AuthenticationExtensionsPRFValues; evalByCredential?: Record | Array>; }; }; } /** * The FIDO2 Assertion Result * https://www.w3.org/TR/webauthn-3/#iface-pkcredential */ export interface PasskeyGetResult { id: string; rawId?: string; type?: string; authenticatorAttachment?: string; response: { authenticatorData: string; clientDataJSON: string; signature: string; userHandle?: string; attestationObject?: string; }; clientExtensionResults?: { largeBlob?: { supported?: boolean; blob?: Record; written?: boolean; }; prf?: { enabled?: boolean; results?: AuthenticationExtensionsPRFValues; }; }; } /** * The Signal API request reporting a credential the relying party no longer recognizes * https://www.w3.org/TR/webauthn-3/#sctn-signalUnknownCredential */ export interface PasskeySignalUnknownCredentialRequest { rpId: string; credentialId: string; } /** * The Signal API request reporting the complete set of credential ids the relying party * still accepts for a given user * https://www.w3.org/TR/webauthn-3/#sctn-signalAllAcceptedCredentials */ export interface PasskeySignalAllAcceptedCredentialsRequest { rpId: string; userId: string; allAcceptedCredentialIds: string[]; } export interface PublicKeyCredentialDescriptor { type: 'public-key'; id: string; transports?: Array; } export declare enum AuthenticatorTransport { usb = "usb", nfc = "nfc", ble = "ble", smartCard = "smart-card", hybrid = "hybrid", internal = "internal" } /** * https://www.w3.org/TR/webauthn-3/#prf-extension */ export interface AuthenticationExtensionsPRFValues { first: PasskeyBinaryValue; second?: PasskeyBinaryValue; } //# sourceMappingURL=PasskeyTypes.d.ts.map