Verify API
HTTP endpoint for server-side Groth16 proof verification.
Runnable example:
examples/server-verify-node— minimal Nodehttpproxy that forwards a posted proof to the hosted verifier and responds 200 / 403.
OpenAPI specification
The full machine-readable spec lives at zkrune.com/openapi.yaml (OpenAPI 3.1, MIT-licensed). Use it to:
- Import into Postman — Import → Link → paste
https://zkrune.com/openapi.yaml. Generates a ready-to-run collection. - Generate clients —
openapi-generator-cli,oazapfts,orval, or any OpenAPI 3.1-compatible tool. - Lint your integration — drop the spec into your editor's OpenAPI plugin to type-check requests/responses.
The reference below is the human-readable summary; the YAML is authoritative.
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.
