Getting Started

Quick start

Three commands to a running privacy stack: install, set up the circuits, and start the turn-key local chain + deploy + wallet backend. Then make a Privacy Pool deposit and see it indexed.

pnpm dev is the turn-key local stack. It starts a local node, deploys the privacy core, copies circuit artifacts into the web app, and runs the wallet backend at http://localhost:3000.

Boot the stack

bash
pnpm install
pnpm setup        # compile circuits + Groth16 setup + build sdk & contracts
pnpm dev          # local chain + deploy + copy artifacts + wallet backend
  1. 1
    pnpm installWires the workspace and installs dependencies.
  2. 2
    pnpm setupCompiles circuits, runs the trusted setup, builds the SDK and contracts.
  3. 3
    pnpm devStarts a local node, deploys the core, stages circuit artifacts in apps/web/public, and serves the backend.

Make a deposit and see it indexed

With the stack up, run the demo deposit helper and query the indexer:

bash
node apps/web/scripts/demo-deposit.mjs     # make a Privacy Pool deposit
curl http://localhost:3000/api/pool/leaves # see it indexed

demo-deposit.mjs creates a fresh PoolNote, deposits the pool's denomination, and prints the commitment plus the nullifier and secret you must save to withdraw later:

text
deposited commitment: 0x1a2b…
save these secrets to withdraw later:
  nullifier: 1234567890…
  secret:    9876543210…

Run the verification gate directly

bash
pnpm --filter @shh/sdk test       # 9/9
pnpm --filter @shh/circuits test  # 4/4
pnpm contracts:test               # 10/10

Optional — real L3 + explorer

Booting actual L3 blocks needs Docker. Chain boot is optional — see each component's README and the devnet guide:

bash
cd infra/op-stack && cp .env.example .env && make generate && docker compose up -d
cd infra/explorer && cp .env.example .env && docker compose up -d

Next, understand what you just deployed: Project layout.