VAnchorProverSetup

Struct VAnchorProverSetup 

Source
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>

Source

pub fn new( params2: PoseidonParameters<F>, params3: PoseidonParameters<F>, params4: PoseidonParameters<F>, params5: PoseidonParameters<F>, ) -> Self

Source

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>

Source

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>

Source

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>

Source

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>

Source

pub fn setup_keypairs<R: RngCore, const N: usize>( rng: &mut R, ) -> [Keypair<F, PoseidonCRH_x5_2<F>>; N]

Source

pub fn setup_tree( &self, leaves: &[F], index: u64, ) -> Result<(Path<TreeConfig_x5<F>, TREE_DEPTH>, F), Error>

Source

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>

Source

pub fn deconstruct_public_inputs( public_inputs: Vec<F>, ) -> Result<(F, F, Vec<F>, Vec<F>, Vec<F>, F), Error>

Source

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>

Source§

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)

Performs copy-assignment from source. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more