export-aptos-verifier-core 0.1.0

Load Groth16 artifacts from snarkjs JSON or Arkworks bundles and generate Aptos Move verifier packages.
Documentation
1
2
3
4
5
6
7
8
9
use crate::error::Result;
use crate::model::{Groth16VerifierInputs, SourceFormat};
use crate::snarkjs::parse_compact_artifact;
use std::path::Path;

pub fn load_compact_bundle(path: &Path, curve_hint: Option<&str>) -> Result<Groth16VerifierInputs> {
    let (vk, proof, public_inputs) = parse_compact_artifact(path, curve_hint)?;
    Groth16VerifierInputs::from_legacy(vk, proof, public_inputs, SourceFormat::ArkworksCompact)
}