legogroth16 0.3.0

An implementation of the LegoGroth16, the Legosnark variant of Groth16 zkSNARK proof system
Documentation
#[cfg(feature = "circom")]
use crate::circom::error::CircomError;
use crate::link::error::LinkError;
use ark_relations::r1cs::SynthesisError;

#[derive(Clone, Debug, PartialEq)]
pub enum Error {
    SynthesisError(SynthesisError),
    LinkError(LinkError),
    VectorLongerThanExpected(usize, usize),
    InvalidProof,
    InvalidLinkCommitment,
    InvalidWitnessCommitment,
    InsufficientWitnessesForCommitment(usize, usize),
    #[cfg(feature = "circom")]
    CircomError(CircomError),
}

impl From<SynthesisError> for Error {
    fn from(e: SynthesisError) -> Self {
        Self::SynthesisError(e)
    }
}

impl From<LinkError> for Error {
    fn from(e: LinkError) -> Self {
        Self::LinkError(e)
    }
}

#[cfg(feature = "circom")]
impl From<CircomError> for Error {
    fn from(e: CircomError) -> Self {
        Self::CircomError(e)
    }
}