export-sui-verifier-core
Library crate for loading Groth16 artifacts and rendering Sui Move verifier packages.
Capabilities
- loads snarkjs-compatible JSON inputs
- loads Arkworks VK/proof JSON or raw hex inputs
- loads compact Arkworks bundle JSON
- infers the curve and input format from artifact metadata
- supports BN254 and BLS12-381
- validates protocol, curve, subgroup membership, input counts, and field bounds
- serializes verification keys, proofs, and public inputs for
sui::groth16 - performs local Arkworks Groth16 verification when proof vectors are supplied
- renders Sui Move packages with
Move.toml,sources/verifier.move, optional proof/public-input tests, and generated package README
Generated Move API
Generated modules expose:
verifying_key_bytes()prepare()verify(proof_bytes, public_inputs_bytes): boolverify_with_prepared(prepared_verifying_key, proof_bytes, public_inputs_bytes): boolverify_entry(proof_bytes, public_inputs_bytes)when generated inentryortestmode
The verifier expects Arkworks canonical compressed proof bytes plus concatenated 32-byte little-endian public inputs.
Main Modules
formats: high-level loaders for snarkjs JSON and Arkworks inputsparser::arkworks: direct Arkworks VK/proof/public input parsersnarkjs: strict snarkjs-compatible JSON parsingmodel: normalized Groth16 IRcurves: curve-specific adapters for BN254 and BLS12-381movegen: Sui Move package rendering and proof-data snippetsverifier: local Arkworks verification helpers
Rust Usage
Use the crate directly when embedding generation in another Rust tool. Most users should use the export-sui-verifier CLI.
use create_adapter;
use load_arkworks_bundle;
use ;
#
Crate Docs
- docs.rs:
https://docs.rs/export-sui-verifier-core - Rust import path:
export_sui_verifier_core