Skip to content

ZeroSync/zerosync-verifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZeroSync Verifier

A Rust library to verify a ZeroSync proof.

Example

main.rs

use zerosync_verifier::verify;

const ZEROSYNC_URL: &str = "https://zerosync.org/demo/proofs/latest/";

fn main() {
   // Fetch proof and public_inputs
   let public_input_bytes = &reqwest::blocking::get(ZEROSYNC_URL.to_owned() + "air-public-input.json").unwrap().bytes().unwrap();
   let proof_bytes = &reqwest::blocking::get(ZEROSYNC_URL.to_owned() + "aggregated_proof.bin").unwrap().bytes().unwrap();

   // Verify proof
   let chain_state = verify(public_input_bytes.to_vec(), proof_bytes.to_vec());

   println!("ChainState: {}", serde_json::to_string(&chain_state.unwrap()).unwrap());
}

Cargo.toml

[dependencies]
zerosync_verifier = { git = "https://github.com/ZeroSync/zerosync-verifier" }
serde_json = "1.0"
reqwest = { version = "0.11.22", features = ["blocking"] }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages