zk_generateProof
zk_generateProof
is a Dwellir-managed extension that compiles witness data into a Groth16 proof compatible with Manta Atlantic’s zk circuits. It helps teams offload heavy proving workloads while keeping witness data client-side until submission.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
circuitId | string | Yes | Identifier for the runtime circuit defined by Atlantic’s zk modules (e.g., credential minting, private transfers). |
witness | object | Yes | Structured witness data; only commitments and hashes leave the client. |
provingKeyRef | string | Yes | Hash or URL pointing to the required proving key artifact. |
noteCommitment | string | Optional | Commitment for zkAddress updates. |
Returns
Field | Type | Description |
---|---|---|
proof | string | Base64-encoded Groth16 proof suitable for runtime extrinsics. |
publicInputs | array | Ordered public inputs consumed by runtime verification. |
durationMs | number | Time spent generating the proof. |
Request Example
{
"jsonrpc": "2.0",
"method": "zk_generateProof",
"params": [{
"circuitId": "zksbt_mint_v2",
"witness": {
"schemaHash": "0x8abf...",
"issuerSk": "0x00",
"recipientCommitment": "0x6f36...",
"nullifier": "0x51da..."
},
"provingKeyRef": "ipfs://bafybeigdyr3...",
"noteCommitment": "0x92ff..."
}],
"id": 17
}
witness
payloads must be serialized off-chain and never logged server-side; Dwellir discards the object immediately after proof generation.
Usage Guidelines
- Cache proving keys locally and pass a content hash in
provingKeyRef
so Dwellir can fetch or validate against trusted sources. - Validate public inputs before broadcasting to avoid submitting malformed proofs that will be rejected on-chain.
- Pair the result with
author_submitExtrinsic
orsbt_mintPrivate
to finalize the workflow.
Errors
Code | Meaning | Resolution |
---|---|---|
-40001 | Unknown circuit | Verify the circuitId matches a supported Atlantic circuit. |
-40002 | Invalid witness | Ensure witness fields satisfy circuit constraints before retrying. |
-40003 | Proving key mismatch | Download the latest Prove Key artifacts and retry. |
Monitor proving latency to size compute resources during peak issuance windows.