use crate::{
errors::NovaError,
traits::{commitment::CommitmentEngineTrait, Group},
};
use serde::{Deserialize, Serialize};
pub trait EvaluationEngineTrait<G: Group>: Clone + Send + Sync {
type ProverKey: Clone + Send + Sync + Serialize + for<'de> Deserialize<'de>;
type VerifierKey: Clone + Send + Sync + Serialize + for<'de> Deserialize<'de>;
type EvaluationArgument: Clone + Send + Sync + Serialize + for<'de> Deserialize<'de>;
fn setup(
ck: &<<G as Group>::CE as CommitmentEngineTrait<G>>::CommitmentKey,
) -> (Self::ProverKey, Self::VerifierKey);
fn prove(
ck: &<<G as Group>::CE as CommitmentEngineTrait<G>>::CommitmentKey,
pk: &Self::ProverKey,
transcript: &mut G::TE,
comm: &<<G as Group>::CE as CommitmentEngineTrait<G>>::Commitment,
poly: &[G::Scalar],
point: &[G::Scalar],
eval: &G::Scalar,
) -> Result<Self::EvaluationArgument, NovaError>;
fn verify(
vk: &Self::VerifierKey,
transcript: &mut G::TE,
comm: &<<G as Group>::CE as CommitmentEngineTrait<G>>::Commitment,
point: &[G::Scalar],
eval: &G::Scalar,
arg: &Self::EvaluationArgument,
) -> Result<(), NovaError>;
}