import { type ChainLink } from "./serialize.js"; export type ChainRefusalCode = "malformed" | "root" | "signature" | "binding" | "typ" | "disclosure" | "audience" | "nonce" | "expired" | "not-yet-valid"; export interface ChainRefusal { ok: false; code: ChainRefusalCode; detail: string; } export interface ChainVerdict { ok: true; /** The credential's verified claims โ€” the root of the chain. */ credential: Record; /** The open mandate the wallet signed and this chain disclosed. */ open: Record; /** The closed mandate the agent signed. */ closed: Record; /** The links, as verified โ€” for a caller that must compare two chains' roots. */ links: ChainLink[]; } export interface VerifyChainOptions { /** Who the agent's hop must be addressed to โ€” this merchant. */ audience: string; /** The nonce this merchant issued for this purchase. */ nonce: string; /** Epoch ms. Injectable for expiry tests. */ nowMs?: number; } /** * Verify a dSD-JWT delegation chain: `~~~~~`. * * Every link is verified as an SD-JWT in its own right (ยง6 steps 2-3): a disclosure its signer * never committed to is refused, not read. */ export declare function verifyChain(token: string, opts: VerifyChainOptions): Promise;