Quick Start
Get clearproof running locally in under 10 minutes.
Prerequisites
- Python 3.11+ with uv
- Node.js 20+ with npm
- circom 2.2.2+ (install guide )
Installation
git clone https://github.com/clearproof/clearproof.git
cd clearproof
# Install Python dependencies
uv sync --all-extras
# Install Node dependencies
npm installCompile circuits
Circuit compilation generates the WASM prover, verification key, and zkey. Takes ~5 minutes on first run.
bash scripts/compile_circuits.shThis produces artifacts in artifacts/:
compliance_js/compliance.wasm— WASM provercompliance_final.zkey— proving key (phase 2 trusted setup)verification_key.json— verification key
Note: The trusted setup uses a dev-only ceremony. Production deployments require a proper multi-party ceremony.
Run the demo
The CLI demo generates a proof, verifies it locally, and prints the 16 public signals:
npx @clearproof/cli demoStart the API server
export PII_MASTER_KEY=$(openssl rand -hex 32)
uv run uvicorn src.api.main:app --reload --port 8000Visit http://localhost:8000/docs for the Swagger UI.
Note: The API server starts but
/proof/generaterequires runtime state: at least one issued credential, a populated issuer registry, and a built sanctions tree. Runpython scripts/build_sanctions_tree.py --offlineto bootstrap the sanctions tree with hardcoded OFAC addresses.
Run tests
# All Python tests
uv run pytest tests/ -v
# TypeScript build check
npm run build
# Hardhat contract tests
cd packages/contracts && npx hardhat test