UNPKG

onetime-sdk

Version:

A secure SDK for sending and verifying OTPs via email and SMS.

26 lines (22 loc) 629 B
type Channel = 'email' | 'sms'; interface InitOTPClientOptions { apiKey: string; baseURL?: string; timeout?: number; retries?: number; } interface SendOTPParams { channel: Channel; recipient: string; template?: string; metadata?: Record<string, any>; } interface VerifyOTPParams { channel: Channel; recipient: string; code: string; } declare const sendOTP: (params: SendOTPParams) => Promise<any>; declare const verifyOTP: (params: VerifyOTPParams) => Promise<any>; declare const initOTPClient: (options: InitOTPClientOptions) => void; export { initOTPClient, sendOTP, verifyOTP };