Created
September 27, 2023 07:04
-
-
Save shekohex/e85475578b870e38e9c4ad1058696568 to your computer and use it in GitHub Desktop.
Extended Witness using ark-circom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn extended_witness_circom2() -> Result<()> { | |
use std::collections::HashMap; | |
use ark_circom::WitnessCalculator; | |
let mut wtns = WitnessCalculator::new("./test-vectors/circom2_multiplier2.wasm").unwrap(); | |
let inputs = HashMap::from([ | |
(String::from("a"), vec![4.into()]), | |
(String::from("b"), vec![5.into()]), | |
]); | |
let sanity_check = true; | |
// calculate the witness | |
let witness = wtns.calculate_witness_element::<Bn254, _>(inputs, sanity_check)?; | |
eprintln!("witness: {:?}", witness); | |
Ok(()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment