otp-token.d.ts

567 B v1.0
import type { Otp } from './types.js';
/**
 * Returns the one-time passcode from the values of the `OTP-Token` headers of a message header
 * section, following the receiver steps of the draft (section 3.2), or undefined if there is no
 * valid one. Pass every `OTP-Token` value of the message's own header section, not of a MIME
 * part: more than one makes the message have none. The values are the raw ones, with any
 * folding left in and no encoded words decoded
 */
export declare function parseOtpToken(values: string | string[] | undefined): Otp | undefined;