pub struct VAnchorProverSetup<F: PrimeField, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> { /* private fields */ }Implementations§
Source§impl<F: PrimeField, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
impl<F: PrimeField, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
pub fn new( params2: PoseidonParameters<F>, params3: PoseidonParameters<F>, params4: PoseidonParameters<F>, params5: PoseidonParameters<F>, ) -> Self
pub fn new_utxo<R: RngCore>( &self, chain_id: F, amount: F, index: Option<F>, secret_key: Option<F>, blinding: Option<F>, rng: &mut R, ) -> Result<Utxo<F>, Error>
pub fn setup_random_circuit<R: RngCore>( self, rng: &mut R, ) -> Result<VACircuit<F, PoseidonCRH_x5_2<F>, PoseidonCRH_x5_2Gadget<F>, TreeConfig_x5<F>, LeafCRHGadget<F>, PoseidonCRH_x5_3Gadget<F>, TREE_DEPTH, INS, OUTS, M>, Error>
pub fn setup_circuit_with_utxos( self, public_amount: F, ext_data_hash: F, in_root_set: [F; M], in_indices: [u64; INS], in_leaves: [Vec<F>; INS], in_utxos: [Utxo<F>; INS], out_utxos: [Utxo<F>; OUTS], ) -> Result<(VACircuit<F, PoseidonCRH_x5_2<F>, PoseidonCRH_x5_2Gadget<F>, TreeConfig_x5<F>, LeafCRHGadget<F>, PoseidonCRH_x5_3Gadget<F>, TREE_DEPTH, INS, OUTS, M>, Vec<F>), Error>
pub fn setup_circuit( self, public_amount: F, arbitrary_data: VAnchorArbitraryData<F>, in_utxos: [Utxo<F>; INS], in_indicies: [F; INS], in_paths: Vec<Path<TreeConfig_x5<F>, TREE_DEPTH>>, in_root_set: [F; M], out_utxos: [Utxo<F>; OUTS], ) -> Result<VACircuit<F, PoseidonCRH_x5_2<F>, PoseidonCRH_x5_2Gadget<F>, TreeConfig_x5<F>, LeafCRHGadget<F>, PoseidonCRH_x5_3Gadget<F>, TREE_DEPTH, INS, OUTS, M>, Error>
pub fn setup_keypairs<R: RngCore, const N: usize>( rng: &mut R, ) -> [Keypair<F, PoseidonCRH_x5_2<F>>; N]
pub fn setup_tree( &self, leaves: &[F], index: u64, ) -> Result<(Path<TreeConfig_x5<F>, TREE_DEPTH>, F), Error>
pub fn construct_public_inputs( chain_id: F, public_amount: F, roots: Vec<F>, nullifiers: Vec<F>, commitments: Vec<F>, ext_data_hash: F, ) -> Vec<F>
pub fn deconstruct_public_inputs( public_inputs: Vec<F>, ) -> Result<(F, F, Vec<F>, Vec<F>, Vec<F>, F), Error>
pub fn setup_arbitrary_data(ext_data: F) -> VAnchorArbitraryData<F>
Trait Implementations§
Source§impl<F: Clone + PrimeField, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> Clone for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
impl<F: Clone + PrimeField, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> Clone for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
Source§fn clone(&self) -> VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
fn clone(&self) -> VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<F, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> Freeze for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
impl<F, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> RefUnwindSafe for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>where
F: RefUnwindSafe,
impl<F, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> Send for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
impl<F, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> Sync for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>
impl<F, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> Unpin for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>where
F: Unpin,
impl<F, const TREE_DEPTH: usize, const M: usize, const INS: usize, const OUTS: usize> UnwindSafe for VAnchorProverSetup<F, TREE_DEPTH, M, INS, OUTS>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more