⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

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

ParameterTypeRequiredDescription
circuitIdstringYesIdentifier for the runtime circuit defined by Atlantic’s zk modules (e.g., credential minting, private transfers).
witnessobjectYesStructured witness data; only commitments and hashes leave the client.
provingKeyRefstringYesHash or URL pointing to the required proving key artifact.
noteCommitmentstringOptionalCommitment for zkAddress updates.

Returns

FieldTypeDescription
proofstringBase64-encoded Groth16 proof suitable for runtime extrinsics.
publicInputsarrayOrdered public inputs consumed by runtime verification.
durationMsnumberTime 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 or sbt_mintPrivate to finalize the workflow.

Errors

CodeMeaningResolution
-40001Unknown circuitVerify the circuitId matches a supported Atlantic circuit.
-40002Invalid witnessEnsure witness fields satisfy circuit constraints before retrying.
-40003Proving key mismatchDownload the latest Prove Key artifacts and retry.

Monitor proving latency to size compute resources during peak issuance windows.