OpaqueApp

Docs/Reference

API

The public endpoints the app and the SDK use.

Opaque's server exposes the public event stream of the pool and a relayer. Everything it serves is already on the chain; it holds no key and cannot read a note. The base URL is served by the app's configuration.

Endpoints

GET /status

Field
clusterThe genesis hash of the chain the pool is on
rpcAn RPC the app reads the chain through
programThe program address
relayerThe address the relayer sends from
indexedSlotThe last slot whose events are fully served
indexedLeavesThe number of commitments served
rootThe current tree root on chain
auditorKeyThe current audit key, as two field elements
assetsThe listed assets: mint, pool index, decimals, token program

GET /leaves?from=N

Commitments from leaf N on, in tree order, with their encrypted memos. Pages of 5,000.

GET /nullifiers?after=ID

Spent nullifiers after cursor ID, in order. Pages of 5,000.

GET /audit-tags?from=N

Sealed audit records from leaf N on, for key holders.

GET /cross/markets, GET /cross/batches?market=, GET /cross/reveals?after=, GET /cross/claims?after=

The Cross markets, the open and recent batches of one (with the price the open batch would close at now), and the public streams of reveals and payouts. Wallets replay the last two to find their own orders.

POST /cross/commit, POST /cross/reveal

Relay a sealed order and, once its batch has a price, its reveal. Both are sent from the relayer's address so neither links to a wallet.

POST /relay

Body: { proof, t, ext } exactly as produced by the SDK. Returns { signature }, or 400 with a reason when the pool would reject it. Deposits cannot be relayed; a fee, when present, must be addressed to the relayer in /status. Rate limited per client.

Privacy of the API

There is deliberately no "my notes" or "path for leaf N" endpoint. A client downloads the whole leaf and nullifier streams and matches locally, so the server never learns which notes belong to which caller.