UNPKG

@unqtech/age-verification-mitid

Version:

Frontend SDK for age verification via UNQVerify using MitID

32 lines (24 loc) 1 kB
interface UnqVerifyConfig { publicKey: string; ageToVerify: number; redirectUri: string; onVerified: (payload: Record<string, unknown>) => void; onFailure?: (error?: unknown) => void; } declare function startVerificationWithRedirect(): Promise<void>; declare function startVerificationWithPopup(providedPopup?: Window): Promise<void>; type DecodedPayload = { ageVerified: boolean; userId: string; exp: number; iat: number; }; declare function handleRedirectResult({ onVerified, onFailure, }: { onVerified: (payload: DecodedPayload) => void; onFailure?: (error?: unknown) => void; }): Promise<void>; declare function isVerified(): boolean; declare function getVerifiedAge(): number | null; declare function resetVerification(): void; declare function init(config: UnqVerifyConfig): void; export { type UnqVerifyConfig, getVerifiedAge, handleRedirectResult, init, isVerified, resetVerification, startVerificationWithPopup, startVerificationWithRedirect };