import { AuthenticatorAssertionResponseJSON, AuthenticatorAttestationResponseJSON, Base64URLString, PublicKeyCredentialDescriptorJSON, PublicKeyCredentialUserEntityJSON } from "@simplewebauthn/types"; export interface AuthenticationExtensionsLargeBlobOutputs { supported?: boolean; blob?: Base64URLString; written?: boolean; } type JSONString = string; export interface AuthenticationExtensionsClientOutputsJSON { largeBlob?: AuthenticationExtensionsLargeBlobOutputs; } export interface CredentialCreationOptionsRequest { displayName: string; } export interface RegistrationResponseJSON { id: Base64URLString; rawId: Base64URLString; response: AuthenticatorAttestationResponseJSON; authenticatorAttachment?: AuthenticatorAttachment; clientExtensionResults: AuthenticationExtensionsClientOutputsJSON; type: PublicKeyCredentialType; } export interface AuthenticationResponseJSON { id: Base64URLString; rawId: Base64URLString; response: AuthenticatorAssertionResponseJSON; authenticatorAttachment?: AuthenticatorAttachment; clientExtensionResults: AuthenticationExtensionsClientOutputsJSON; type: PublicKeyCredentialType; } /** * creation options */ export interface PublicKeyCredentialCreationOptionsJSON { rp: PublicKeyCredentialRpEntity; user: PublicKeyCredentialUserEntityJSON; challenge: Base64URLString; pubKeyCredParams: PublicKeyCredentialParameters[]; timeout?: number; excludeCredentials?: PublicKeyCredentialDescriptorJSON[]; authenticatorSelection?: AuthenticatorSelectionCriteria; attestation?: AttestationConveyancePreference; extensions?: AuthenticationExtensionsClientInputs; } /** * verify options */ export interface PublicKeyCredentialRequestOptionsJSON { challenge: Base64URLString; timeout?: number; rpId?: string; allowCredentials?: PublicKeyCredentialDescriptorJSON[]; userVerification?: UserVerificationRequirement; extensions?: AuthenticationExtensionsClientInputs; } export interface State { id: string; state: string; type: "passkey" | "password"; } export type ProgressCallback = (percent: number) => void; export type WalletCreateCallback = (wallet: { state: State; password: string; }) => void; export type NewWalletCreateOptions = { progressCallback?: ProgressCallback; walletCreateCallback?: WalletCreateCallback; }; export type NewWalletCreateData = { displayName: string; attr?: JSONString; }; /** * Authenticate interface */ export interface PasskeyAuthenticate { create(options: Pick): Promise; get(options: Omit): Promise; } export interface PasswordAuthenticate { requestPassword(): Promise; } export declare enum WalletType { Passkey = "passkey", Password = "password" } export type EmbeddedWalletConfig = { state: string; }; export type ExternalWalletConfig = { address: string; type: string; }; export type PasskeyWalletConfig = { displayName: string; attr?: JSONString; } & EmbeddedWalletConfig; export interface WalletManagerState { handle?: string; majorWalletState?: PasskeyWalletConfig; externalWalletState?: ExternalWalletConfig; sessionKeyState?: PasskeyWalletConfig; timestamp: number; credentialId?: string; address?: string; } export declare enum ENV { PROD = "prod", DEV = "dev", BETA = "beta", PRE = "pre", ALPHA = "alpha" } export {}; //# sourceMappingURL=types.d.ts.map