SDK
TypeScript SDK for client-side Groth16 proof generation and verification.
Installation
Quick Start
Core Functions
generateProof(options)
Generate a Groth16 proof client-side. Circuit WASM and zkey are fetched automatically.
| Param | Type | Description |
|---|---|---|
templateId | TemplateId | Circuit identifier (e.g. 'age-verification') |
inputs | Record<string, string> | Circuit inputs as string key-value pairs |
circuitPath | string? | Custom base URL for circuit artifacts |
Returns ZKProofResult with success, proof, error, timing.
verifyProofRemote(options)
Verify a proof against the hosted verifier. The server loads its own trusted verification key.
| Param | Type | Description |
|---|---|---|
circuitName | string | Circuit identifier |
proof | Groth16Proof | The generated proof object |
publicSignals | string[] | Public signals from proof generation |
verifierUrl | string? | Custom verifier URL (default: zkrune.com) |
verifyProof(options) — Local
Verify a proof locally using snarkjs. Requires the verification key.
| Param | Type | Description |
|---|---|---|
proof | Groth16Proof | The generated proof object |
publicSignals | string[] | Public signals |
verificationKey | VerificationKey | Circuit verification key (JSON) |
ZkRune Class
MembershipRegistry
Build a group, publish the Merkle root, and let members prove inclusion with a ZK proof.
