import { l as FormDef, n as AntiSpamVerdict, r as ChallengeAdapter, t as AntiSpamConfig } from "./types-D1S3rFK7.js";
//#region src/antispam.d.ts
/**
 * Server-issued, HMAC-signed render token. The timestamp is signed so a client cannot
 * forge `renderedAt` — `verifyRenderToken` recomputes the MAC over the EMBEDDED timestamp
 * before trusting it. Host emits at form-render, embeds as a hidden field.
 * Fail-closed: throws on an empty secret (delegated to `hmacSign`).
 */
declare function issueRenderToken(secret: string, now: number): Promise<string>;
/**
 * Constant-time verify of a render token. Recomputes the HMAC over the embedded timestamp
 * and compares (timing-safe) BEFORE reading the age — a forged/tampered token yields
 * `{ ok: false }` with NO `ageMs` leaked. Fail-closed on empty secret.
 */
declare function verifyRenderToken(secret: string, token: string, now: number): Promise<{
  ok: boolean;
  ageMs?: number;
}>;
/**
 * Run the configured anti-spam checks. Returns a verdict — the CALLER decides reject-vs-quarantine.
 * Policy is FLAG, not silently drop (data-loss floor): `recordSubmission` stores spam=true.
 * The time-trap reads `ageMs` from the signed render token, never a client `renderedAt`.
 */
declare function checkAntiSpam(form: FormDef, raw: Record<string, unknown>, ctx: {
  renderToken?: string;
  secret?: string;
  now: number;
  challengeToken?: string;
  ip?: string;
}): Promise<AntiSpamVerdict>;
//#endregion
export { type AntiSpamConfig, type AntiSpamVerdict, type ChallengeAdapter, checkAntiSpam, issueRenderToken, verifyRenderToken };