Prover worker and CLI
The function a prover worker of your own answers with, and the copy-assets command that copies the SDK's browser files.
Most apps copy the SDK's files with copy-assets and never write a worker.
Prover worker and CLI explains both ways.
proveWorkerRequest
Use it inside your own prover worker, to answer each message the SDK sends it. It comes from the
package's ./prover-worker entry.
function proveWorkerRequest(
request: ProverWorkerRequest,
deps: ProverWorkerDeps,
): Promise<ProverWorkerAnswer>;Types used: ProverWorkerRequest, ProverWorkerDeps, ProverWorkerAnswer
Example
import { } from "@umbra/nimbus-solana-web/prover-worker";
import type { ProverWorkerDeps, ProverWorkerRequest } from "@umbra/nimbus-solana-web/prover-worker";
declare const : ProverWorkerRequest;
declare const : ProverWorkerDeps;
const = await (, );Parameters
Prop
Type
Returns
Promise<ProverWorkerAnswer>
proved with the proof and public signals, or failed with the prover's reason and
message: backend when the graph cannot be parsed or refuses the inputs, including inputs that
do not satisfy the circuit. It never rejects, so the worker always answers.
Computes a request's witness and proves it, inside the prover worker.
The graph is freed and the witness zeroed before the answer, on every path.
Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/prover-worker.ts.
copy-assets
The package installs a command, nimbus-solana-web, with this one subcommand. It copies the
browser files the SDK runs into a directory your app serves.
nimbus-solana-web copy-assets <directory>It takes exactly one argument, the directory, and no options. It creates the directory when it does not exist. It overwrites files of the same names and touches no other file.
| Exit code | What it means |
|---|---|
0 | It copied the files, and printed how many. |
1 | The copy failed. The directory could not be written, or this copy of the package was built without its files. The message says which. |
2 | The arguments were wrong: no subcommand, an unknown one, or other than one directory. It prints its usage. |
Last updated