use bellman::groth16::{prepare_verifying_key, PreparedVerifyingKey, VerifyingKey};
use bls12_381::Bls12;
use derive_getters::Getters;
use zcash_proofs::prover::LocalTxProver;
lazy_static::lazy_static! {
pub static ref SAPLING: LocalTxProver = LocalTxProver::bundled();
pub static ref SPROUT: SproutParams = Default::default();
}
#[derive(Getters)]
pub struct SproutParams {
prepared_verifying_key: PreparedVerifyingKey<Bls12>,
}
impl Default for SproutParams {
fn default() -> Self {
let sprout_vk = VerifyingKey::<Bls12>::read(&include_bytes!("sprout-groth16.vk")[..])
.expect("should be able to read and parse Sprout verification key");
Self {
prepared_verifying_key: prepare_verifying_key(&sprout_vk),
}
}
}