/** * @typedef {Object} ClaimsOptions * @property {string | string[] | RegExp | Array | ((claimed: string) => boolean | Promise)} [issuer] * @property {string | string[] | RegExp | Array | ((claimed: string) => boolean | Promise)} [audience] * @property {string} [subject] * @property {string} [nonce] * @property {string | string[]} [typ] * @property {string[]} [requiredClaims] * @property {string[]} [requiredScopes] * @property {number | string} [clockTolerance] * @property {number | string} [maxAge] * @property {Date} [currentDate] */ /** * Basic claim validation shared by verify. Phase-3 skeleton runs `exp` * / `nbf` / `iat` checks and enforces `typ` header consistency; the * broader claim surface (iss / aud / sub / nonce / maxAge / * requiredClaims / requiredScopes) lands in the claims-layer commit. * * @param {Record} payload * @param {Record} header * @param {ClaimsOptions} [options] * @returns {Promise} */ export function validateClaims(payload: Record, header: Record, options?: ClaimsOptions): Promise; /** * Build the payload the signer will encode. Handles `iat` (auto unless * `noTimestamp`), `exp` (from `expiresIn`), `nbf` (from `notBefore`), * `jti` (boolean → random 16 bytes hex, object → configured size / * encoding, function → custom), and copies `iss` / `aud` / `sub` / * `nonce`. Full function-shaped `jti` + custom encoding lands in the * DX commit; boolean + hex works in phase 3. * * @param {Record} payload * @param {import('./sign.js').SignOptions} options * @returns {Promise>} */ export function injectClaims(payload: Record, options: import("./sign.js").SignOptions): Promise>; export type ClaimsOptions = { issuer?: string | RegExp | string[] | (string | RegExp)[] | ((claimed: string) => boolean | Promise) | undefined; audience?: string | RegExp | string[] | (string | RegExp)[] | ((claimed: string) => boolean | Promise) | undefined; subject?: string | undefined; nonce?: string | undefined; typ?: string | string[] | undefined; requiredClaims?: string[] | undefined; requiredScopes?: string[] | undefined; clockTolerance?: string | number | undefined; maxAge?: string | number | undefined; currentDate?: Date | undefined; };