/** The subset of a grant that the human authorizes and the device signs over. * Assembled from the grant record (grants.ts) — never from anything the client * sends, so /verify can re-derive it from the server's own state (FR-2). */ export interface IntentBoundsInput { /** The grant id — already unique per grant, so two grants never share a hash. */ grantId: string; merchant: string; /** Cumulative budget, in dollars (the value the human reads on the page). */ budget: number; /** Per-purchase cap, in dollars. */ perSpend: number; /** Item bounds — WHAT the agent may buy. Arrays are sorted before encoding. */ allow?: { skus?: string[]; categories?: string[]; }; /** When the grant was opened (ISO 8601), so re-creating identical bounds later * still hashes distinctly. */ createdAt: string; /** Optional validity horizon (ISO 8601); omitted from the hash when absent. */ expiresAt?: string; /** A per-grant random salt, so the hash cannot be precomputed from the public * bounds alone (minted once at create, sealed in the record). */ nonce: string; /** The wallet credentials the human presented BEFORE signing (#172) — an age proof that * unlocks restricted items, a membership that discounts every purchase. These are TERMS of * the grant, shown on the signing page, so they must be inside the signed bytes: without * them here, a claim recorded between /request and /verify would ride a signature the human * gave for different terms. Only the load-bearing fields are encoded (the threshold, the * rate) — `verifiedAt` is an audit timestamp, not a term, and would make the hash unstable * between the two round trips. Absent ⇒ omitted from the bytes entirely, so a grant with no * credentials hashes exactly as it did before this field existed. */ ageProof?: { provenAge: number; expiresAt?: string; }; membershipProof?: { membershipNumber: string; discountPct: number; }; } /** * The stable, JSON-canonical encoding of a grant's bounds (FR-1). Reuses the * package's `canonical()` (recursive key sort) for key order and number * formatting, and sorts the `allow` arrays here so `["b","a"]` and `["a","b"]` * encode identically. The `allow` object is ALWAYS present with both arrays (empty * when unset), so a grant with no item bounds and a grant with empty item bounds * hash the same and the shape never varies. */ export declare function canonicalIntentBounds(input: IntentBoundsInput): string; /** sha256(canonicalIntentBounds), base64url — the value the ceremony nonce binds * to and that /verify re-derives from the server's grant record and requires to * match (FR-2). */ export declare function boundsHash(input: IntentBoundsInput): string; /** * The OpenID4VP nonce, bound to the bounds: sha256( challenge ‖ boundsHash ), * base64url. The wallet's Key Binding JWT names this nonce, so the holder's signature * covers the exact bounds it was derived from. Deterministic in its two inputs, so * /request (which knows the challenge) and /verify (which re-opens it) derive the * identical nonce. */ export declare function deriveNonce(challengeB64url: string, boundsHashB64url: string): string;