Skip to content

@armada/sdk / index / ProverWorkerRequest

Type Alias: ProverWorkerRequest

ProverWorkerRequest = { id: number; op: "prove"; input: unknown; wasm: Uint8Array; zkey: Uint8Array; } | { id: number; op: "verify"; proof: Groth16Proof; publicSignals: string[]; vkey: object; } | { id: number; op: "close"; }

Defined in: src/prover/worker-prover.ts:16

Why not worker_threads here: snarkjs/ffjavascript pulls in the web-worker polyfill, which fails when snarkjs is required inside a node worker_threads worker (nested-worker collision). It runs fine inside a browser Web Worker, so the SDK ships the protocol + handler and the consumer wires their Worker (Vite/webpack own the worker-entry bundling). node stays on createSnarkjsProver.