/** * WHIR-KoalaBear runtime over the KoalaBear field * (ProofAlgId `"whir-koalabear-solwhir"`). * * Mirrors the snarkjs role: a generic runtime consumed by the SDK that takes * per-circuit artifacts fetched from circuit metadata and returns / checks a * proof. The proof is raw bytes (WHIR transcript); `publicInputs` are decimal * field-element strings, matching the groth16 `publicSignals` convention so * both algorithms share the same `ProveOutput` / `SubmitProofRequest` wire shape. * * Unlike groth16 (where `snarkjs` is a real npm package imported directly), * there is no `@lemmaoracle/whir` package: the runtime lives here, inside the * SDK. Each circuit ships a `wasm-bindgen` WASM module (built from its * `circuits-whir/` crate) exposing `prove(witnessJson, params)` and * `verify(params, publicInputsJson, proof)`. All four circuits share the same * export signatures, so this one loader drives any of them: it instantiates * the supplied module bytes directly via `WebAssembly` and marshals * strings/bytes across the boundary — no per-circuit JS glue required. * * `wasm` and `params` are two SEPARATE artifacts (see * `WhirCircuitArtifactLocation`): `wasm` is the compiled wasm-bindgen module * that is instantiated, and `params` is opaque verifier data (serialized WHIR * verification key / PCS parameters) forwarded byte-for-byte to the module's * `prove`/`verify` entry points. BOTH `prove` and `verify` take the wasm * module AND the params buffer, so the module bytes are never confused with * the params bytes. * * This is a low-level WASM boundary module (cf. `platform.ts`); the few * `eslint-disable` lines below mark the unavoidable linear-memory writes and * the post-instantiation export binding. */ export type WhirProof = Readonly<{ proof: Uint8Array; publicInputs: ReadonlyArray; }>; export type Whir = Readonly<{ prove: (witness: Readonly>, wasm: Uint8Array, params: Uint8Array) => Promise; verify: (wasm: Uint8Array, params: Uint8Array, publicInputs: ReadonlyArray, proof: Uint8Array) => Promise; }>; export type WhirModule = Readonly<{ whir: Whir; }>; export declare const whir: Whir; //# sourceMappingURL=whir-runtime.d.ts.map