Verify API
HTTP endpoint for server-side Groth16 proof verification.
POST /api/verify-proof
Verify a Groth16 proof against a trusted verification key stored on the server. The client never sends the vKey — the server loads it from its own filesystem based on circuitName.
Endpoint
Request Body
| Field | Type | Description |
|---|---|---|
circuitName | string | One of the supported circuit IDs |
proof | Groth16Proof | The proof object from snarkjs.groth16.fullProve() |
publicSignals | string[] | Public output signals |
Response — Success
Response — Errors
| Status | Reason |
|---|---|
| 400 | Missing proof, publicSignals, or circuitName |
| 400 | Unknown circuit: circuitName not in supported list |
| 503 | Circuit under maintenance |
| 500 | Internal server error |
Supported Circuits
age-verification · balance-proof · membership-proof · range-proof · private-voting · hash-preimage · credential-proof · token-swap · signature-verification · patience-proof · quadratic-voting · nft-ownership · anonymous-reputation · whale-holder
Self-Hosting
To run the verifier on your own infrastructure:
- Clone the repo and deploy to Vercel / Node.js.
- Circuit artifacts (WASM + vKey) are in
public/circuits/. - The endpoint at
app/api/verify-proof/route.tsloads vKeys from the server. - Point
verifierUrlin your SDK/widget config to your deployment.
