pub struct AnchorProverSetup<F: PrimeField, const M: usize, const N: usize> { /* private fields */ }Implementations§
Source§impl<F: PrimeField, const M: usize, const N: usize> AnchorProverSetup<F, M, N>
impl<F: PrimeField, const M: usize, const N: usize> AnchorProverSetup<F, M, N>
pub fn new( params3: PoseidonParameters<F>, params4: PoseidonParameters<F>, ) -> Self
pub fn setup_arbitrary_data( recipient: F, relayer: F, fee: F, refund: F, commitment: F, ) -> AnchorConstraintDataInput<F>
pub fn construct_public_inputs( chain_id: F, nullifier_hash: F, roots: [F; M], recipient: F, relayer: F, fee: F, refund: F, commitment: F, ) -> Vec<F>
pub fn deconstruct_public_inputs( public_inputs: &[F], ) -> (F, F, Vec<F>, F, F, F, F, F)
pub fn setup_leaf<R: Rng>( &self, chain_id: F, rng: &mut R, ) -> Result<(LeafPrivate<F>, LeafPublic<F>, F, F), Error>
pub fn setup_leaf_with_privates( &self, chain_id: F, secret: F, nullfier: F, ) -> Result<(LeafPrivate<F>, LeafPublic<F>, F, F), Error>
pub fn setup_circuit<R: Rng>( self, chain_id: F, leaves: &[F], index: u64, roots: [F; M], recipient: F, relayer: F, fee: F, refund: F, commitment: F, rng: &mut R, ) -> Result<(Circuit_x5<F, N, M>, F, F, Vec<F>, Vec<F>), Error>
pub fn setup_circuit_with_privates( self, chain_id: F, secret: F, nullifier: F, leaves: &[F], index: u64, roots: [F; M], recipient: F, relayer: F, fee: F, refund: F, commitment: F, ) -> Result<(Circuit_x5<F, N, M>, F, F, Vec<F>, Vec<F>), Error>
pub fn setup_random_circuit<R: Rng>( self, rng: &mut R, ) -> Result<(Circuit_x5<F, N, M>, F, F, Vec<F>, Vec<F>), Error>
pub fn setup_circuit_with_privates_raw( self, chain_id: u128, secret: Vec<u8>, nullifier: Vec<u8>, leaves: Vec<Vec<u8>>, index: u64, roots: [Vec<u8>; M], recipient: Vec<u8>, relayer: Vec<u8>, commitment: Vec<u8>, fee: u128, refund: u128, ) -> Result<(Circuit_x5<F, N, M>, Vec<u8>, Vec<u8>, Vec<Vec<u8>>, Vec<Vec<u8>>), Error>
pub fn setup_tree(&self, leaves: &[F]) -> Result<Tree_x5<F>, Error>
pub fn setup_tree_and_path( &self, leaves: &[F], index: u64, ) -> Result<(Tree_x5<F>, Path<TreeConfig_x5<F>, N>), Error>
Trait Implementations§
Source§impl<F: Clone + PrimeField, const M: usize, const N: usize> Clone for AnchorProverSetup<F, M, N>
impl<F: Clone + PrimeField, const M: usize, const N: usize> Clone for AnchorProverSetup<F, M, N>
Source§fn clone(&self) -> AnchorProverSetup<F, M, N>
fn clone(&self) -> AnchorProverSetup<F, M, N>
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 M: usize, const N: usize> Freeze for AnchorProverSetup<F, M, N>
impl<F, const M: usize, const N: usize> RefUnwindSafe for AnchorProverSetup<F, M, N>where
F: RefUnwindSafe,
impl<F, const M: usize, const N: usize> Send for AnchorProverSetup<F, M, N>
impl<F, const M: usize, const N: usize> Sync for AnchorProverSetup<F, M, N>
impl<F, const M: usize, const N: usize> Unpin for AnchorProverSetup<F, M, N>where
F: Unpin,
impl<F, const M: usize, const N: usize> UnwindSafe for AnchorProverSetup<F, M, N>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