ark-snarkjs

Crates.ioark-snarkjs
lib.rsark-snarkjs
version0.1.3
created_at2025-09-19 12:04:34.389914+00
updated_at2026-01-23 13:01:35.222352+00
descriptionRust library for exporting Arkworks Groth16 proofs and verifying keys into snarkjs-compatible JSON (BN254, BLS12-381), as well as garaga-compatible format.
homepagehttps://github.com/mysteryon88/ark-to-snarkjs
repositoryhttps://github.com/mysteryon88/ark-to-snarkjs
max_upload_size
id1846346
size34,650
Sergey (mysteryon88)

documentation

README

ark-snarkjs

Utilities for exporting arkworks proofs and verifying keys into formats compatible with snarkjs and garaga. 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.

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

let proof_json = export_proof_garaga::<ark_bn254::Bn254, _>(
    &proof, 
    &public_inputs, 
    "garaga_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

Commit count: 12

cargo fmt