spawn-zk-snarks 0.1.5

Zero-knowledge proof library with EVM compatibility
Documentation
//! # spawn-zk-snarks
//! 
//! A Rust library that provides a robust implementation of Zero-Knowledge Proofs (ZKPs) 
//! using the Groth16 proving system. Built on top of the arkworks ecosystem, it offers 
//! both high performance and EVM compatibility.
//! 
//! ## Features
//! 
//! - **Groth16 Proving System**
//!   - Generate proving and verification keys
//!   - Create verifiable proofs for given witnesses
//!   - Verify proofs with the generated verification keys
//!   - Efficient constraint system implementation
//! 
//! - **Circuit Implementation**
//!   - Arithmetic circuit support
//!   - Constraint generation
//!   - Witness computation
//!   - Flexible circuit configuration
//! 
//! ## Quick Start
//! 
//! ```rust
//! use spawn_zk_snarks::{Groth16Setup, ArithmeticCircuit};
//! use ark_bn254::Fr;
//! use ark_ff::One;
//! 
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Setup phase
//! let setup = Groth16Setup::new(3, 2)?;
//! 
//! // Generate proof
//! let inputs = vec![Fr::one()];
//! let witness = vec![Fr::one(), Fr::one()];
//! let proof = setup.prove(&inputs, &witness)?;
//! 
//! // Verify proof
//! let is_valid = setup.verify(&proof, &inputs)?;
//! assert!(result);
//! # Ok(())
//! # }
//! ```
//! 
//! ## Performance
//! 
//! Based on benchmark results:
//! 
//! ```text
//! proof generation    time:   [1.3244 ms 1.3519 ms 1.3931 ms]
//! proof verification  time:   [760.30 µs 762.93 µs 765.25 µs]
//! evm conversion     time:   [289.96 ns 291.12 ns 292.43 ns]
//! ```
//! 
//! For detailed benchmark results, see [BENCHMARKS.md](BENCHMARKS.md).
//! 
//! ## Security Considerations
//! 
//! - Uses the battle-tested Groth16 proving system
//! - Built on the arkworks cryptographic library
//! - Constant-time operations for core cryptographic functions
//! - Regular security audits recommended before production use

#![cfg_attr(docsrs, feature(doc_cfg))]
#![deny(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]

mod circuits;
mod groth16;
mod evm;

pub use circuits::{ArithmeticCircuit, CircuitError};
pub use groth16::{Groth16Setup, Groth16Error};
pub use evm::{proof_to_calldata, generate_verifier_contract};

#[cfg(test)]
mod tests;