> For AI agents: the documentation index is at https://sdk.nimbusprivacy.xyz/llms.txt, and every page is available as Markdown at its URL with .md appended.

# Prover worker and CLI (/reference/prover-worker)

Most apps copy the SDK's files with `copy-assets` and never write a worker.
[Prover worker and CLI](https://sdk.nimbusprivacy.xyz/helpers/prover-worker) 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.

```ts
function proveWorkerRequest(
  request: ProverWorkerRequest,
  deps: ProverWorkerDeps,
): Promise<ProverWorkerAnswer>;
```

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.

**Parameters**

| Parameter | Type                  | Description                                                            |
| --------- | --------------------- | ---------------------------------------------------------------------- |
| `request` | `ProverWorkerRequest` | The circuit, its checked proving key and witness graph, and the input. |
| `deps`    | `ProverWorkerDeps`    | The initialised witness-graph and prover WASM modules.                 |

**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.

**Example**

```ts
import { proveWorkerRequest } from "@umbra/nimbus-solana-web/prover-worker";
import type { ProverWorkerDeps, ProverWorkerRequest } from "@umbra/nimbus-solana-web/prover-worker";

declare const request: ProverWorkerRequest;
declare const deps: ProverWorkerDeps;
const answer = await proveWorkerRequest(request, deps);
```

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.

```bash
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 21 October 2026
