Skip to content

Rust library for exporting Arkworks Groth16 proofs and verifying keys into snarkjs-compatible JSON (BN254, BLS12-381).

License

Notifications You must be signed in to change notification settings

mysteryon88/ark-snarkjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ark-snarkjs

Utilities for exporting arkworks proofs and verifying keys into a format compatible with snarkjs. Currently supports Groth16 on curves BN254 and BLS12-381.

dependency status

Installation

cargo add ark-snarkjs

Example

Here is a full example with a simple circuit, proof generation, verification, and exporting proof + verifying key into snarkjs-compatible JSON.

use ark_snarkjs::{export_proof, export_vk};

let proof_json = export_proof::<ark_bn254::Bn254, _>(
    &proof,
    &public_inputs,
    "proof.json",
);

let vk_json = export_vk::<ark_bn254::Bn254, _>(
    &vk,
    public_inputs.len(),
    "verification_key.json",
);

Both proof.json and vk.json are fully compatible with snarkjs, so you can directly use them with the snarkjs verify command.

Supported Curves

  • BN254
  • BLS12-381

License

MIT

About

Rust library for exporting Arkworks Groth16 proofs and verifying keys into snarkjs-compatible JSON (BN254, BLS12-381).

Topics

Resources

License

Stars

Watchers

Forks

Languages