Getting Started
Installation
Clone the repo, install the workspace, and run the one-time setup that compiles the circuits, performs the Groth16 trusted setup, and builds the SDK and contracts.
1 — Install dependencies
git clone https://github.com/privashh/shh.git
cd shh
pnpm installpnpm install wires every workspace package (packages/*, apps/*) and installs snarkjs, Hardhat, ethers, and the rest.
2 — Run the one-time setup
The setup script compiles the circuits, runs the Powers-of-Tau + Groth16 trusted setup, then builds the SDK and contracts:
pnpm setupThat single command expands to the four sub-steps below — useful if you want to re-run just one:
pnpm circuits:compile # circom → .wasm + .r1cs
pnpm circuits:setup # Powers of Tau + Groth16 zkeys + Solidity verifiers
pnpm --filter @shh/sdk build # tsc → dist (browser + node entries)
pnpm --filter @shh/contracts build # hardhat compile3 — Verify the install
Run the full verification gate to confirm everything compiled and the cryptography agrees end to end:
pnpm --filter @shh/sdk test # 9/9 notes, Merkle, value conservation
pnpm --filter @shh/circuits test # 4/4 valid witness proves+verifies; tampered fails
pnpm contracts:test # 10/10 deposit→prove→withdraw, double-spend,
# ASP gating, shielded bridge, front-runningWith the install verified, boot the whole stack in the Quick start.