Skip to main content
Version: Testnet

Generate proofs with Pipelined API

Overview

Generating a Zero-Knowledge Proof (ZKP) is typically a multi-step cryptographic process where computational problems are translated into a set of verifiable mathematical statements.
The specifics vary depending on the type of proof (e.g. zk-SNARKs or zk-STARKs) and ZKP generation can involve the following:

  1. Define the statement or the claim you want to prove; and design a circuit program that represents the computation as a series of simple arithmetic equations. The programs are typically written in specialized languages like Circom or Noir
  2. Compile the circuit
  3. Run the trusted set up to generate the public proving key and verification key
  4. Compute the witness and generate the proof using the full set of public inputs, private witness values and proof key.
  5. The final step is for the verifier to check the proof and the output is a simple True or False

How Pipelined API works

Our team is currently working on a product called “Pipelined API” where users can directly make an API call on the JS frontend and generate the zero knowledge proof. This reduces the complexity of the steps above and allows users to seamlessly generate the zero knowledge proof without the backend setup and orchestration that’s required in step 4.

We intend for this to simplify onboarding for developers familiar with Typescript, Javascript, Next.js framework, but not yet comfortable with Rust and backend systems. Currently, our scope covers SP1 proof type and will expand on others later. All inputs passed from both proof types are mostly public and should minimize privacy concerns. Here's an outline of the steps a developer would take:

  1. Define the statement and design a circuit program
  2. Compile the circuit
  3. Run the trusted set up
  4. Integrate with Pipelined API, send the program to prove + inputs

Through Pipelined API, we connect with multiple prover networks and provide the best proving quote (taking into account latency and costs). Users won't need to run a backend to access these networks (diagram below) and we will also directly connect with ZKVerify for proof verification through the relayer.
A flowchart diagram showing how proving and verifying tasks are handled through a pipelined API.
On the left, there are two boxes labeled “Sp1 project” and “R0 project.” Both connect via an arrow labeled prove_and_verify() to a central box labeled “Pipelined API.”
From this central box, arrows branch out to four boxes: “Local Proving,” “Sp1 Prover Network,” “Boundless,” and “Other Proving Markets.”
Each of these then connects to a final box labeled “zkVerify (through relayer).”
At the bottom, a caption reads: “User just makes a single API call from their zkVM project, all proving and verifying tasks are handled by our backend."

Next Steps

The product is a work in progress, but we are open for the community to try out! Please indicate your interest via this form and we will send you further instructions on how to integrate with the Pipelined API.