pub struct AleoV0;

Trait Implementations§

source§

impl Aleo for AleoV0

source§

fn encryption_domain() -> Field<Self>

Returns the encryption domain as a constant field element.

source§

fn graph_key_domain() -> Field<Self>

Returns the graph key domain as a constant field element.

source§

fn serial_number_domain() -> Field<Self>

Returns the serial number domain as a constant field element.

source§

fn g_scalar_multiply(scalar: &Scalar<Self>) -> Group<Self>

Returns the scalar multiplication on the generator G.

source§

fn commit_bhp256( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Field<Self>

Returns a BHP commitment with an input hasher of 256-bits.

source§

fn commit_bhp512( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Field<Self>

Returns a BHP commitment with an input hasher of 512-bits.

source§

fn commit_bhp768( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Field<Self>

Returns a BHP commitment with an input hasher of 768-bits.

source§

fn commit_bhp1024( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Field<Self>

Returns a BHP commitment with an input hasher of 1024-bits.

source§

fn commit_ped64( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Field<Self>

Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.

source§

fn commit_ped128( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Field<Self>

Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.

source§

fn commit_to_group_bhp256( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Group<Self>

Returns a BHP commitment with an input hasher of 256-bits.

source§

fn commit_to_group_bhp512( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Group<Self>

Returns a BHP commitment with an input hasher of 512-bits.

source§

fn commit_to_group_bhp768( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Group<Self>

Returns a BHP commitment with an input hasher of 768-bits.

source§

fn commit_to_group_bhp1024( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Group<Self>

Returns a BHP commitment with an input hasher of 1024-bits.

source§

fn commit_to_group_ped64( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Group<Self>

Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.

source§

fn commit_to_group_ped128( input: &[Boolean<Self>], randomizer: &Scalar<Self> ) -> Group<Self>

Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.

source§

fn hash_bhp256(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 256-bits.

source§

fn hash_bhp512(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 512-bits.

source§

fn hash_bhp768(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 768-bits.

source§

fn hash_bhp1024(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 1024-bits.

source§

fn hash_ped64(input: &[Boolean<Self>]) -> Field<Self>

Returns the Pedersen hash for a given (up to) 64-bit input.

source§

fn hash_ped128(input: &[Boolean<Self>]) -> Field<Self>

Returns the Pedersen hash for a given (up to) 128-bit input.

source§

fn hash_psd2(input: &[Field<Self>]) -> Field<Self>

Returns the Poseidon hash with an input rate of 2.

source§

fn hash_psd4(input: &[Field<Self>]) -> Field<Self>

Returns the Poseidon hash with an input rate of 4.

source§

fn hash_psd8(input: &[Field<Self>]) -> Field<Self>

Returns the Poseidon hash with an input rate of 8.

source§

fn hash_many_psd2(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>

Returns the extended Poseidon hash with an input rate of 2.

source§

fn hash_many_psd4(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>

Returns the extended Poseidon hash with an input rate of 4.

source§

fn hash_many_psd8(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>

Returns the extended Poseidon hash with an input rate of 8.

source§

fn hash_to_group_bhp256(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 256-bits.

source§

fn hash_to_group_bhp512(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 512-bits.

source§

fn hash_to_group_bhp768(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 768-bits.

source§

fn hash_to_group_bhp1024(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 1024-bits.

source§

fn hash_to_group_ped64(input: &[Boolean<Self>]) -> Group<Self>

Returns the Pedersen hash for a given (up to) 64-bit input.

source§

fn hash_to_group_ped128(input: &[Boolean<Self>]) -> Group<Self>

Returns the Pedersen hash for a given (up to) 128-bit input.

source§

fn hash_to_group_psd2(input: &[Field<Self>]) -> Group<Self>

Returns the Poseidon hash with an input rate of 2 on the affine curve.

source§

fn hash_to_group_psd4(input: &[Field<Self>]) -> Group<Self>

Returns the Poseidon hash with an input rate of 4 on the affine curve.

source§

fn hash_to_group_psd8(input: &[Field<Self>]) -> Group<Self>

Returns the Poseidon hash with an input rate of 8 on the affine curve.

source§

fn hash_to_scalar_psd2(input: &[Field<Self>]) -> Scalar<Self>

Returns the Poseidon hash with an input rate of 2 on the scalar field.

source§

fn hash_to_scalar_psd4(input: &[Field<Self>]) -> Scalar<Self>

Returns the Poseidon hash with an input rate of 4 on the scalar field.

source§

fn hash_to_scalar_psd8(input: &[Field<Self>]) -> Scalar<Self>

Returns the Poseidon hash with an input rate of 8 on the scalar field.

source§

fn verify_merkle_path_bhp<const DEPTH: u8>( path: &MerklePath<Self, DEPTH>, root: &Field<Self>, leaf: &Vec<Boolean<Self>> ) -> Boolean<Self>

Returns true if the given Merkle path is valid for the given root and leaf.

source§

fn verify_merkle_path_psd<const DEPTH: u8>( path: &MerklePath<Self, DEPTH>, root: &Field<Self>, leaf: &Vec<Field<Self>> ) -> Boolean<Self>

Returns true if the given Merkle path is valid for the given root and leaf.

source§

const MAX_DATA_SIZE_IN_FIELDS: u32 = <Self::Network as console::Network>::MAX_DATA_SIZE_IN_FIELDS

The maximum number of field elements in data (must not exceed u16::MAX).
source§

impl Clone for AleoV0

source§

fn clone(&self) -> AleoV0

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AleoV0

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AleoV0

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Environment for AleoV0

source§

fn zero() -> LinearCombination<Self::BaseField>

Returns the zero constant.

source§

fn one() -> LinearCombination<Self::BaseField>

Returns the one constant.

source§

fn new_variable(mode: Mode, value: Self::BaseField) -> Variable<Self::BaseField>

Returns a new variable of the given mode and value.

source§

fn new_witness<Fn: FnOnce() -> Output::Primitive, Output: Inject>( mode: Mode, logic: Fn ) -> Output

Returns a new witness of the given mode and value.

source§

fn scope<S: Into<String>, Fn, Output>(name: S, logic: Fn) -> Outputwhere Fn: FnOnce() -> Output,

Enters a new scope for the environment.

source§

fn enforce<Fn, A, B, C>(constraint: Fn)where Fn: FnOnce() -> (A, B, C), A: Into<LinearCombination<Self::BaseField>>, B: Into<LinearCombination<Self::BaseField>>, C: Into<LinearCombination<Self::BaseField>>,

Adds one constraint enforcing that (A * B) == C.

source§

fn is_satisfied() -> bool

Returns true if all constraints in the environment are satisfied.

source§

fn is_satisfied_in_scope() -> bool

Returns true if all constraints in the current scope are satisfied.

source§

fn num_constants() -> u64

Returns the number of constants in the entire circuit.

source§

fn num_public() -> u64

Returns the number of public variables in the entire circuit.

source§

fn num_private() -> u64

Returns the number of private variables in the entire circuit.

source§

fn num_constraints() -> u64

Returns the number of constraints in the entire circuit.

source§

fn num_nonzeros() -> (u64, u64, u64)

Returns the number of nonzeros in the entire circuit.

source§

fn num_constants_in_scope() -> u64

Returns the number of constants for the current scope.

source§

fn num_public_in_scope() -> u64

Returns the number of public variables for the current scope.

source§

fn num_private_in_scope() -> u64

Returns the number of private variables for the current scope.

source§

fn num_constraints_in_scope() -> u64

Returns the number of constraints for the current scope.

source§

fn num_nonzeros_in_scope() -> (u64, u64, u64)

Returns the number of nonzeros for the current scope.

source§

fn halt<S: Into<String>, T>(message: S) -> T

Halts the program from further synthesis, evaluation, and execution in the current environment.

source§

fn inject_r1cs(r1cs: R1CS<Self::BaseField>)

Returns the R1CS circuit, resetting the circuit.

source§

fn eject_r1cs_and_reset() -> R1CS<Self::BaseField>

Returns the R1CS circuit, resetting the circuit.

source§

fn eject_assignment_and_reset( ) -> Assignment<<Self::Network as Environment>::Field>

Returns the R1CS assignment of the circuit, resetting the circuit.

source§

fn reset()

Clears the circuit and initializes an empty environment.

§

type Affine = <Circuit as Environment>::Affine

§

type BaseField = <Circuit as Environment>::BaseField

§

type Network = <Circuit as Environment>::Network

§

type ScalarField = <Circuit as Environment>::ScalarField

§

const EDWARDS_A: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_A

The coefficient A of the twisted Edwards curve.
§

const EDWARDS_D: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_D

The coefficient D of the twisted Edwards curve.
§

const MONTGOMERY_A: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_A

The coefficient A of the Montgomery curve.
§

const MONTGOMERY_B: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_B

The coefficient B of the Montgomery curve.
§

const MAX_STRING_BYTES: u32 = <Self::Network as console::Environment>::MAX_STRING_BYTES

The maximum number of bytes allowed in a string.
§

fn assert<Boolean>(boolean: Boolean)where Boolean: Into<LinearCombination<Self::BaseField>>,

Adds one constraint enforcing that the given boolean is true.
§

fn assert_eq<A, B>(a: A, b: B)where A: Into<LinearCombination<Self::BaseField>>, B: Into<LinearCombination<Self::BaseField>>,

Adds one constraint enforcing that the A == B.
§

fn assert_neq<A, B>(a: A, b: B)where A: Into<LinearCombination<Self::BaseField>>, B: Into<LinearCombination<Self::BaseField>>,

Adds one constraint enforcing that the A != B.
§

fn count() -> (u64, u64, u64, u64, (u64, u64, u64))

Returns a tuple containing the number of constants, public variables, private variables, constraints, and nonzeros in the entire environment.
§

fn count_in_scope() -> (u64, u64, u64, u64, (u64, u64, u64))

Returns a tuple containing the number of constants, public variables, private variables, constraints, and nonzeros for the current scope.
source§

impl Hash for AleoV0

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<AleoV0> for AleoV0

source§

fn eq(&self, other: &AleoV0) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for AleoV0

source§

impl Eq for AleoV0

source§

impl StructuralEq for AleoV0

source§

impl StructuralPartialEq for AleoV0

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

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

§

fn vzip(self) -> V