|
@ -9,12 +9,14 @@ use std::collections::HashMap; |
|
|
use crate::{circom::R1CSFile, witness::WitnessCalculator};
|
|
|
use crate::{circom::R1CSFile, witness::WitnessCalculator};
|
|
|
use color_eyre::Result;
|
|
|
use color_eyre::Result;
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
pub struct CircomBuilder<E: PairingEngine> {
|
|
|
pub struct CircomBuilder<E: PairingEngine> {
|
|
|
pub cfg: CircomConfig<E>,
|
|
|
pub cfg: CircomConfig<E>,
|
|
|
pub inputs: HashMap<String, Vec<BigInt>>,
|
|
|
pub inputs: HashMap<String, Vec<BigInt>>,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
// Add utils for creating this from files / directly from bytes
|
|
|
// Add utils for creating this from files / directly from bytes
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
pub struct CircomConfig<E: PairingEngine> {
|
|
|
pub struct CircomConfig<E: PairingEngine> {
|
|
|
pub r1cs: R1CS<E>,
|
|
|
pub r1cs: R1CS<E>,
|
|
|
pub wtns: WitnessCalculator,
|
|
|
pub wtns: WitnessCalculator,
|
|
|