import type { AuthenticationExtensionsClientInputs, AuthenticatorSelectionCriteria, Base64URLString, PublicKeyCredentialCreationOptionsJSON, Uint8Array_ } from '../types/index.js'; import { COSEALG } from '../helpers/cose.js'; export type GenerateRegistrationOptionsOpts = Parameters[0]; /** * Generate the default array of public key algorithms to offer during registration. Defaults to * the most commonly-supported algorithms of EdDSA, ES256, and RS256. When the runtime supports * PQC algorithms, ML-DSA-44 is included as the most preferred algorithm. */ export declare function getDefaultSupportedAlgorithmIDs(): COSEALG[]; /** * Prepare a value to pass into navigator.credentials.create(...) for authenticator registration * * **Options:** * * @param rpName - User-visible, "friendly" website/service name * @param rpID - Valid domain name (after `https://`) * @param userName - User's website-specific username (email, etc...) * @param userID **(Optional)** - User's website-specific unique ID. Defaults to generating a random identifier * @param challenge **(Optional)** - Random value the authenticator needs to sign and pass back. Defaults to generating a random value * @param userDisplayName **(Optional)** - User's actual name. Defaults to `""` * @param timeout **(Optional)** - How long (in ms) the user can take to complete attestation. Defaults to `60000` * @param attestationType **(Optional)** - Specific attestation statement. Defaults to `"none"` * @param excludeCredentials **(Optional)** - Authenticators registered by the user so the user can't register the same credential multiple times. Defaults to `[]` * @param authenticatorSelection **(Optional)** - Advanced criteria for restricting the types of authenticators that may be used. Defaults to `{ residentKey: 'preferred', userVerification: 'preferred' }` * @param extensions **(Optional)** - Additional plugins the authenticator or browser should use during attestation * @param supportedAlgorithmIDs **(Optional)** - Array of numeric COSE algorithm identifiers indicating supported public key algorithms. Import `COSEALG` from \@simplewebauthn/server/helpers for suitable values. Defaults to `[COSEALG.EdDSA, COSEALG.ES256, COSEALG.RS256]` * @param preferredAuthenticatorType **(Optional)** - Encourage the browser to prompt the user to register a specific type of authenticator */ export declare function generateRegistrationOptions(options: { rpName: string; rpID: string; userName: string; userID?: Uint8Array_; challenge?: string | Uint8Array_; userDisplayName?: string; timeout?: number; attestationType?: 'direct' | 'enterprise' | 'none'; excludeCredentials?: { id: Base64URLString; transports?: string[]; }[]; authenticatorSelection?: AuthenticatorSelectionCriteria; extensions?: AuthenticationExtensionsClientInputs; supportedAlgorithmIDs?: number[]; preferredAuthenticatorType?: 'securityKey' | 'localDevice' | 'remoteDevice'; }): Promise; //# sourceMappingURL=generateRegistrationOptions.d.ts.map