import type { SampledSpan, ScoreResponsesResult } from './types.js'; /** * Derive the challenge seed. The preimage is the RFC 8785 JCS * canonicalization of an object carrying the four bound fields, so the * component boundaries are unambiguous: presentation_digest is a * distinct JSON member (null when absent), never foldable into the * nonce. An earlier concatenation preimage let a null-presentation * record with nonce = P || N derive the same seed as a P-presentation * record with nonce N; the structured preimage closes that. */ export declare function deriveSeed(contentDigest: string, presentationDigestOrNull: string | null, nonce: string, version: string): string; /** * Sample `n` spans of `spanLen` code points from `sourceText` at * distinct positions determined by `seed` (algorithm span_sample_v1). * * The source is split into code points via Array.from, so astral * characters (emoji) count as one position each and spans never split * a surrogate pair. With L code points the position range is * L - spanLen + 1. Throws when spanLen or n is not a positive integer, * when the source is shorter than spanLen code points, or when n * exceeds the position range. */ export declare function sampleSpans(sourceText: string, seed: string, n: number, spanLen: number): SampledSpan[]; /** * Commit to span texts: "sha256:" + sha256hex(UTF-8 of each span * text), in the given (sampling) order. */ export declare function commitSpans(spanTexts: readonly string[]): string[]; /** * Score responses against span texts under exact_match_v1: exact * string equality per index. Throws when the arrays differ in length; * a missing response is a protocol error, not a miss. */ export declare function scoreResponses(spanTexts: readonly string[], responses: readonly string[]): ScoreResponsesResult; //# sourceMappingURL=sampler.d.ts.map