/** Why a draw was refused. Finer-grained than ยง9's collapsed wire set so the seam can * log precisely; surfaces MAY coarsen (e.g. `not-yet-valid`/`expired` โ†’ "expired"). */ export type RefusalCode = "signature" | "bounds-tampered" | "intent-mismatch" | "currency-mismatch" | "invalid-amount" | "over-cap" | "over-total" | "not-yet-valid" | "expired" | "out-of-scope" | "unpermitted-presentment" | "replay" | "step-up" | "revoked" | "consumed" | "revocation-unavailable"; /** Who refused. The gate seam always answers as the merchant; the wallet server and * PSP use their own values so cross-party logs attribute cleanly. */ export type RefusalEnforcer = "wallet" | "merchant" | "psp"; /** The recovery class an unattended loop branches on: * - "retry": transient (e.g. store unavailable) โ€” retry with backoff, unattended. * - "needs-human": a live ceremony resumes it (step-up) โ€” surface an approve link. * - "terminal": do not retry; the draw can never succeed as-is. */ export type RefusalRetryable = "retry" | "needs-human" | "terminal"; export interface Refusal { code: RefusalCode; enforcer: RefusalEnforcer; retryable: RefusalRetryable; /** Per-code detail for the enforcer's own logs / approve page (not the wire). */ detail?: Record; } /** The gate-seam constructor: merchant-attributed, retryability derived from the code. */ export declare function refusal(code: RefusalCode, detail?: Record): Refusal;