Open drbh opened 5 years ago
Not JSON but mayne this helps? Use whatever circuit instead of what I've provided.
use std::fs;
let params = generate_random_parameters::<Bn256, _, _>(
MerkleTreeCircuit {
params: j_params,
nullifier: None,
secret: None,
proof: vec![],
},
rng,
)?;
let mut v = vec![];
params.write(&mut v)?;
fs::write("test/test.params", hex::encode(&v[..]).unwrap();
I am a bit confused about saving the
params
,proofs
andpvk
as JSON files so I can move them between machines.I've followed the example repo at https://github.com/arcalinea/bellman-examples/blob/master/src/cube.rs#L154 and also see a write implementation on the proof structure here: https://github.com/zkcrypto/bellman/blob/master/src/groth16/mod.rs#L43
Can someone help me export these variables?