import type { OprfMode, ResponseMatch, ResponseRedaction } from './schema.ts'; /** Reclaim attestor caps OPRF-hashed values at 62 bytes (TOPRF marker * encoding). Surfaces as a clean error here rather than a confusing * attestor-side failure at proof time. */ export declare const OPRF_MAX_BYTES = 62; export interface MatcherSynthesis { match: ResponseMatch; redaction?: ResponseRedaction; /** The captured value, keyed by `paramName`. NOT baked into the shipped * recipe — the caller uses it for the author's own proof; each verifying * user's value is re-extracted live (see verify/run.ts `extractBareParams`). */ paramValues?: Record; } /** * Build the matcher pieces (one responseMatch + one responseRedaction) for a * target value seen in a captured response. The design, in one line: * * the REDACTION selects with xPath/jsonPath and names the value with a * capture group; the MATCH is a `contains` of the surrounding structure with * the value replaced by `{{paramName}}`. * * The match is what the attestor enforces (against the prover's revealed * bytes), so it must anchor the value in context the prover can't relocate — a * JSON key (`"login":"{{v}}"`) or the value's HTML element (`{{v}}`). * The redaction's regex only extracts/narrows; xPath/jsonPath do the selecting. * * `hash` (OPRF) is opt-in — enable it only when the request asks to protect * PII. It rides the `contains {{v}}` path: the redaction carries `hash`, match * keeps `{{v}}`, and the attestor substitutes the nullifier from paramValues at * proof time. Throws when `hash` is set on a free-form value (no safe class). */ export declare function synthesizeMatcher(body: string, contentType: string, target: string, paramName: string, hash?: OprfMode): MatcherSynthesis | undefined; /** True when `target` has a character class safe to OPRF-hash. Free-form values * (names with spaces, arbitrary unicode/punctuation) return false — the caller * must NOT default them to a hash (it would throw in synthesizeMatcher). */ export declare function isOprfHashable(target: string): boolean;