UNPKG

@nibssplc/cams-sdk-react

Version:

React hooks and components for NIBSS CAMS SDK

22 lines (21 loc) 1.1 kB
import { AttestationResult } from "@nibssplc/cams-sdk"; /** * Initiates the WebAuthn registration process. * It takes server-provided options, converts them for the browser API, * calls navigator.credentials.create(), and then converts the result * back into a JSON-friendly format. * * @param options - The PublicKeyCredentialCreationOptions from the server. * @returns A promise that resolves to a JSON-serializable representation of the PublicKeyCredential. */ export declare function register(options: PublicKeyCredentialCreationOptions): Promise<AttestationResult>; /** * Initiates the WebAuthn authentication process. * It takes server-provided options, converts them for the browser API, * calls navigator.credentials.get(), and then converts the result * back into a JSON-friendly format. * * @param options - The PublicKeyCredentialRequestOptions from the server. * @returns A promise that resolves to a JSON-serializable representation of the PublicKeyCredential. */ export declare function authenticate(options: PublicKeyCredentialRequestOptions): Promise<PublicKeyCredential>;