Skip to content
API reference

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

Returns

Promise<ProverWorkerAnswer>

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 codeWhat it means
0It copied the files, and printed how many.
1The copy failed. The directory could not be written, or this copy of the package was built without its files. The message says which.
2The arguments were wrong: no subcommand, an unknown one, or other than one directory. It prints its usage.

Last updated

On this page