Poseidon
  • Poseidon: zk-SNARK setup tool
  • Poseidon v1.2.0
  • Getting Started
    • What are zk-SNARK Circuits ?
    • Quickstart
  • Folder Structure
  • Circuit Compilation
    • Compile circuit - Advanced
    • Compile Circuit - Beginner
  • Expected Folder Layout
  • Zk-Proofs and Verification
    • Proof Generation - Prover
    • JSON Files
    • Proof Verification - Verifier
  • Resources
    • Circuit Development
Powered by GitBook
On this page
  1. Zk-Proofs and Verification

Proof Generation - Prover

Generate zk-SNARK proofs

Please make sure that you compile your circuit, perform tau ceremony, setup proving key before performing proof generation

Make sure input.json exists in the project root or same folder.

Here is a sample input.json for the circuit1.circom boilerplate circuit.

{
    "inputs": [123456789, 987654321]
}

This command takes your compiled circuit, proving key, and input signals to generate a zk-SNARK proof. It automates the process using snarkjs behind the scenes.

py poseidon.py --prove circuit1

🧱 What it needs:

  • circuit_name.wasm – WebAssembly file for witness generation

  • circuit_name.r1cs – constraint system

  • proving_key.zkey – proving key generated from --init-setup

  • input.json – input values (both public and private)

⚙️ What it does:

  1. Generates the witness from input.json using the .wasm file

  2. Creates the proof and public.json using snarkjs groth16 prove

  3. Saves:

    • proof.json – the zk-SNARK proof

    • public.json – public inputs needed for verification

✅ Output files:

  • proof.json

  • public.json

PreviousExpected Folder LayoutNextJSON Files

Last updated 1 month ago