Quickstart (under 10 minutes)
Goal: run the same pipeline CI exercises — compile a small JWT circuit, compile Show, then drive prepare / show through ecdsa-spartan2. This validates your toolchain; wiring the TypeScript SDK is a follow-on (needs WASM + keys copied into openac-sdk/assets).
Prerequisites (once)
- Node ≥ 18, Yarn, Rust stable, Circom 2.2.x, and system packages per
.github/workflows/ecdsa-spartan2.yaml(build-essential,libgmp-dev,libsodium-dev,nasm,nlohmann-json3-devon Ubuntu).
1) Circom package (≈ 3–5 min first time)
cd wallet-unit-poc/circom
yarn install
yarn compile:jwt:1k
yarn compile:show
2) Spartan2 CLI (≈ 10–15 min cold cargo build)
cd ../ecdsa-spartan2
cargo build --release
The first build pulls and compiles Spartan2, arkworks, and the witnesscalc C bindings. Subsequent builds are seconds.
3) One-shot prepare + show flow (1k)
Matches the CI script (sizes: 1k | 2k | 4k | 8k):
SIZE=1k
cargo run --release -- prepare setup --size $SIZE --input ../circom/inputs/jwt/$SIZE/default.json
cargo run --release -- show setup --size $SIZE --input ../circom/inputs/show/default.json
cargo run --release -- generate_shared_blinds --size $SIZE
cargo run --release -- prepare prove --size $SIZE --input ../circom/inputs/jwt/$SIZE/default.json
RUST_LOG=info cargo run --release -- prepare reblind --size $SIZE
RUST_LOG=info cargo run --release -- show prove --size $SIZE --input ../circom/inputs/show/default.json
RUST_LOG=info cargo run --release -- show reblind --size $SIZE
cargo run --release -- prepare verify --size $SIZE
cargo run --release -- show verify --size $SIZE
You should see successful verification and a predicate / public output consistent with the bundled show inputs.
4) Optional — SDK smoke path
After keys exist under ecdsa-spartan2/keys/ and assets are populated per openac-sdk/README.md:
cd ../openac-sdk
npm install
npm test
Vitest exercises parsing, witness math, and (when artifacts exist) WASM — see wallet-unit-poc/openac-sdk/tests/.
Where to go next
- Concepts — Prepare vs Show vs SDK naming.
- OpenAC SDK installation — WASM, keys, CDN layout.
- Paper § protocol — definitions of Prepare/Show interfaces.