Struct snarkvm_circuit::v0::AleoV0
source · pub struct AleoV0;
Trait Implementations§
source§impl Aleo for AleoV0
impl Aleo for AleoV0
source§fn encryption_domain() -> Field<AleoV0>
fn encryption_domain() -> Field<AleoV0>
Returns the encryption domain as a constant field element.
source§fn graph_key_domain() -> Field<AleoV0>
fn graph_key_domain() -> Field<AleoV0>
Returns the graph key domain as a constant field element.
source§fn serial_number_domain() -> Field<AleoV0>
fn serial_number_domain() -> Field<AleoV0>
Returns the serial number domain as a constant field element.
source§fn g_scalar_multiply(scalar: &Scalar<AleoV0>) -> Group<AleoV0>
fn g_scalar_multiply(scalar: &Scalar<AleoV0>) -> Group<AleoV0>
Returns the scalar multiplication on the generator G
.
source§fn commit_bhp256(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Field<AleoV0>
fn commit_bhp256( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Field<AleoV0>
Returns a BHP commitment with an input hasher of 256-bits.
source§fn commit_bhp512(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Field<AleoV0>
fn commit_bhp512( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Field<AleoV0>
Returns a BHP commitment with an input hasher of 512-bits.
source§fn commit_bhp768(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Field<AleoV0>
fn commit_bhp768( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Field<AleoV0>
Returns a BHP commitment with an input hasher of 768-bits.
source§fn commit_bhp1024(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Field<AleoV0>
fn commit_bhp1024( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Field<AleoV0>
Returns a BHP commitment with an input hasher of 1024-bits.
source§fn commit_ped64(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Field<AleoV0>
fn commit_ped64( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Field<AleoV0>
Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.
source§fn commit_ped128(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Field<AleoV0>
fn commit_ped128( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Field<AleoV0>
Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.
source§fn commit_to_group_bhp256(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Group<AleoV0>
fn commit_to_group_bhp256( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Group<AleoV0>
Returns a BHP commitment with an input hasher of 256-bits.
source§fn commit_to_group_bhp512(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Group<AleoV0>
fn commit_to_group_bhp512( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Group<AleoV0>
Returns a BHP commitment with an input hasher of 512-bits.
source§fn commit_to_group_bhp768(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Group<AleoV0>
fn commit_to_group_bhp768( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Group<AleoV0>
Returns a BHP commitment with an input hasher of 768-bits.
source§fn commit_to_group_bhp1024(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Group<AleoV0>
fn commit_to_group_bhp1024( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Group<AleoV0>
Returns a BHP commitment with an input hasher of 1024-bits.
source§fn commit_to_group_ped64(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Group<AleoV0>
fn commit_to_group_ped64( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Group<AleoV0>
Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.
source§fn commit_to_group_ped128(
input: &[Boolean<AleoV0>],
randomizer: &Scalar<AleoV0>
) -> Group<AleoV0>
fn commit_to_group_ped128( input: &[Boolean<AleoV0>], randomizer: &Scalar<AleoV0> ) -> Group<AleoV0>
Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.
source§fn hash_bhp256(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
fn hash_bhp256(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
Returns the BHP hash with an input hasher of 256-bits.
source§fn hash_bhp512(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
fn hash_bhp512(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
Returns the BHP hash with an input hasher of 512-bits.
source§fn hash_bhp768(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
fn hash_bhp768(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
Returns the BHP hash with an input hasher of 768-bits.
source§fn hash_bhp1024(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
fn hash_bhp1024(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
Returns the BHP hash with an input hasher of 1024-bits.
source§fn hash_ped64(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
fn hash_ped64(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
Returns the Pedersen hash for a given (up to) 64-bit input.
source§fn hash_ped128(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
fn hash_ped128(input: &[Boolean<AleoV0>]) -> Field<AleoV0>
Returns the Pedersen hash for a given (up to) 128-bit input.
source§fn hash_psd2(input: &[Field<AleoV0>]) -> Field<AleoV0>
fn hash_psd2(input: &[Field<AleoV0>]) -> Field<AleoV0>
Returns the Poseidon hash with an input rate of 2.
source§fn hash_psd4(input: &[Field<AleoV0>]) -> Field<AleoV0>
fn hash_psd4(input: &[Field<AleoV0>]) -> Field<AleoV0>
Returns the Poseidon hash with an input rate of 4.
source§fn hash_psd8(input: &[Field<AleoV0>]) -> Field<AleoV0>
fn hash_psd8(input: &[Field<AleoV0>]) -> Field<AleoV0>
Returns the Poseidon hash with an input rate of 8.
source§fn hash_many_psd2(
input: &[Field<AleoV0>],
num_outputs: u16
) -> Vec<Field<AleoV0>, Global>
fn hash_many_psd2( input: &[Field<AleoV0>], num_outputs: u16 ) -> Vec<Field<AleoV0>, Global>
Returns the extended Poseidon hash with an input rate of 2.
source§fn hash_many_psd4(
input: &[Field<AleoV0>],
num_outputs: u16
) -> Vec<Field<AleoV0>, Global>
fn hash_many_psd4( input: &[Field<AleoV0>], num_outputs: u16 ) -> Vec<Field<AleoV0>, Global>
Returns the extended Poseidon hash with an input rate of 4.
source§fn hash_many_psd8(
input: &[Field<AleoV0>],
num_outputs: u16
) -> Vec<Field<AleoV0>, Global>
fn hash_many_psd8( input: &[Field<AleoV0>], num_outputs: u16 ) -> Vec<Field<AleoV0>, Global>
Returns the extended Poseidon hash with an input rate of 8.
source§fn hash_to_group_bhp256(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_bhp256(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
Returns the BHP hash with an input hasher of 256-bits.
source§fn hash_to_group_bhp512(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_bhp512(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
Returns the BHP hash with an input hasher of 512-bits.
source§fn hash_to_group_bhp768(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_bhp768(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
Returns the BHP hash with an input hasher of 768-bits.
source§fn hash_to_group_bhp1024(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_bhp1024(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
Returns the BHP hash with an input hasher of 1024-bits.
source§fn hash_to_group_ped64(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_ped64(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
Returns the Pedersen hash for a given (up to) 64-bit input.
source§fn hash_to_group_ped128(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_ped128(input: &[Boolean<AleoV0>]) -> Group<AleoV0>
Returns the Pedersen hash for a given (up to) 128-bit input.
source§fn hash_to_group_psd2(input: &[Field<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_psd2(input: &[Field<AleoV0>]) -> Group<AleoV0>
Returns the Poseidon hash with an input rate of 2 on the affine curve.
source§fn hash_to_group_psd4(input: &[Field<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_psd4(input: &[Field<AleoV0>]) -> Group<AleoV0>
Returns the Poseidon hash with an input rate of 4 on the affine curve.
source§fn hash_to_group_psd8(input: &[Field<AleoV0>]) -> Group<AleoV0>
fn hash_to_group_psd8(input: &[Field<AleoV0>]) -> Group<AleoV0>
Returns the Poseidon hash with an input rate of 8 on the affine curve.
source§fn hash_to_scalar_psd2(input: &[Field<AleoV0>]) -> Scalar<AleoV0>
fn hash_to_scalar_psd2(input: &[Field<AleoV0>]) -> Scalar<AleoV0>
Returns the Poseidon hash with an input rate of 2 on the scalar field.
source§fn hash_to_scalar_psd4(input: &[Field<AleoV0>]) -> Scalar<AleoV0>
fn hash_to_scalar_psd4(input: &[Field<AleoV0>]) -> Scalar<AleoV0>
Returns the Poseidon hash with an input rate of 4 on the scalar field.
source§fn hash_to_scalar_psd8(input: &[Field<AleoV0>]) -> Scalar<AleoV0>
fn hash_to_scalar_psd8(input: &[Field<AleoV0>]) -> Scalar<AleoV0>
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<AleoV0, DEPTH>,
root: &Field<AleoV0>,
leaf: &Vec<Boolean<AleoV0>, Global>
) -> Boolean<AleoV0>
fn verify_merkle_path_bhp<const DEPTH: u8>( path: &MerklePath<AleoV0, DEPTH>, root: &Field<AleoV0>, leaf: &Vec<Boolean<AleoV0>, Global> ) -> Boolean<AleoV0>
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<AleoV0, DEPTH>,
root: &Field<AleoV0>,
leaf: &Vec<Field<AleoV0>, Global>
) -> Boolean<AleoV0>
fn verify_merkle_path_psd<const DEPTH: u8>( path: &MerklePath<AleoV0, DEPTH>, root: &Field<AleoV0>, leaf: &Vec<Field<AleoV0>, Global> ) -> Boolean<AleoV0>
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
const MAX_DATA_SIZE_IN_FIELDS: u32 = <Self::Network as console::Network>::MAX_DATA_SIZE_IN_FIELDS
source§impl Environment for AleoV0
impl Environment for AleoV0
source§fn zero() -> LinearCombination<<AleoV0 as Environment>::BaseField>
fn zero() -> LinearCombination<<AleoV0 as Environment>::BaseField>
Returns the zero
constant.
source§fn one() -> LinearCombination<<AleoV0 as Environment>::BaseField>
fn one() -> LinearCombination<<AleoV0 as Environment>::BaseField>
Returns the one
constant.
source§fn new_variable(
mode: Mode,
value: <AleoV0 as Environment>::BaseField
) -> Variable<<AleoV0 as Environment>::BaseField>
fn new_variable( mode: Mode, value: <AleoV0 as Environment>::BaseField ) -> Variable<<AleoV0 as Environment>::BaseField>
Returns a new variable of the given mode and value.
source§fn new_witness<Fn, Output>(mode: Mode, logic: Fn) -> Outputwhere
Fn: FnOnce() -> <Output as Inject>::Primitive,
Output: Inject,
fn new_witness<Fn, Output>(mode: Mode, logic: Fn) -> Outputwhere Fn: FnOnce() -> <Output as Inject>::Primitive, Output: Inject,
Returns a new witness of the given mode and value.
source§fn scope<S, Fn, Output>(name: S, logic: Fn) -> Outputwhere
S: Into<String>,
Fn: FnOnce() -> Output,
fn scope<S, Fn, Output>(name: S, logic: Fn) -> Outputwhere S: Into<String>, 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<<AleoV0 as Environment>::BaseField>>,
B: Into<LinearCombination<<AleoV0 as Environment>::BaseField>>,
C: Into<LinearCombination<<AleoV0 as Environment>::BaseField>>,
fn enforce<Fn, A, B, C>(constraint: Fn)where Fn: FnOnce() -> (A, B, C), A: Into<LinearCombination<<AleoV0 as Environment>::BaseField>>, B: Into<LinearCombination<<AleoV0 as Environment>::BaseField>>, C: Into<LinearCombination<<AleoV0 as Environment>::BaseField>>,
Adds one constraint enforcing that (A * B) == C
.
source§fn is_satisfied() -> bool
fn is_satisfied() -> bool
Returns true
if all constraints in the environment are satisfied.
source§fn is_satisfied_in_scope() -> bool
fn is_satisfied_in_scope() -> bool
Returns true
if all constraints in the current scope are satisfied.
source§fn num_constants() -> u64
fn num_constants() -> u64
Returns the number of constants in the entire circuit.
source§fn num_public() -> u64
fn num_public() -> u64
Returns the number of public variables in the entire circuit.
source§fn num_private() -> u64
fn num_private() -> u64
Returns the number of private variables in the entire circuit.
source§fn num_constraints() -> u64
fn num_constraints() -> u64
Returns the number of constraints in the entire circuit.
source§fn num_constants_in_scope() -> u64
fn num_constants_in_scope() -> u64
Returns the number of constants for the current scope.
source§fn num_public_in_scope() -> u64
fn num_public_in_scope() -> u64
Returns the number of public variables for the current scope.
source§fn num_private_in_scope() -> u64
fn num_private_in_scope() -> u64
Returns the number of private variables for the current scope.
source§fn num_constraints_in_scope() -> u64
fn num_constraints_in_scope() -> u64
Returns the number of constraints for the current scope.
source§fn num_nonzeros_in_scope() -> (u64, u64, u64)
fn num_nonzeros_in_scope() -> (u64, u64, u64)
Returns the number of nonzeros for the current scope.
source§fn halt<S, T>(message: S) -> Twhere
S: Into<String>,
fn halt<S, T>(message: S) -> Twhere S: Into<String>,
Halts the program from further synthesis, evaluation, and execution in the current environment.
source§fn inject_r1cs(r1cs: R1CS<<AleoV0 as Environment>::BaseField>)
fn inject_r1cs(r1cs: R1CS<<AleoV0 as Environment>::BaseField>)
Returns the R1CS circuit, resetting the circuit.
source§fn eject_r1cs_and_reset() -> R1CS<<AleoV0 as Environment>::BaseField>
fn eject_r1cs_and_reset() -> R1CS<<AleoV0 as Environment>::BaseField>
Returns the R1CS circuit, resetting the circuit.
source§fn eject_assignment_and_reset(
) -> Assignment<<<AleoV0 as Environment>::Network as Environment>::Field>
fn eject_assignment_and_reset( ) -> Assignment<<<AleoV0 as Environment>::Network as Environment>::Field>
Returns the R1CS assignment of the circuit, resetting the circuit.
type Affine = <Circuit as Environment>::Affine
type BaseField = <Circuit as Environment>::BaseField
type Network = <Circuit as Environment>::Network
type ScalarField = <Circuit as Environment>::ScalarField
source§const EDWARDS_A: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_A
const EDWARDS_A: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_A
A
of the twisted Edwards curve.source§const EDWARDS_D: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_D
const EDWARDS_D: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_D
D
of the twisted Edwards curve.source§const MONTGOMERY_A: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_A
const MONTGOMERY_A: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_A
A
of the Montgomery curve.source§const MONTGOMERY_B: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_B
const MONTGOMERY_B: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_B
B
of the Montgomery curve.source§const MAX_STRING_BYTES: u32 = <Self::Network as console::Environment>::MAX_STRING_BYTES
const MAX_STRING_BYTES: u32 = <Self::Network as console::Environment>::MAX_STRING_BYTES
source§fn assert<Boolean>(boolean: Boolean)where
Boolean: Into<LinearCombination<Self::BaseField>>,
fn assert<Boolean>(boolean: Boolean)where Boolean: Into<LinearCombination<Self::BaseField>>,
true
.source§fn assert_eq<A, B>(a: A, b: B)where
A: Into<LinearCombination<Self::BaseField>>,
B: Into<LinearCombination<Self::BaseField>>,
fn assert_eq<A, B>(a: A, b: B)where A: Into<LinearCombination<Self::BaseField>>, B: Into<LinearCombination<Self::BaseField>>,
A == B
.source§fn assert_neq<A, B>(a: A, b: B)where
A: Into<LinearCombination<Self::BaseField>>,
B: Into<LinearCombination<Self::BaseField>>,
fn assert_neq<A, B>(a: A, b: B)where A: Into<LinearCombination<Self::BaseField>>, B: Into<LinearCombination<Self::BaseField>>,
A != B
.source§impl PartialEq<AleoV0> for AleoV0
impl PartialEq<AleoV0> for AleoV0
impl Copy for AleoV0
impl Eq for AleoV0
impl StructuralEq for AleoV0
impl StructuralPartialEq for AleoV0
Auto Trait Implementations§
impl RefUnwindSafe for AleoV0
impl Send for AleoV0
impl Sync for AleoV0
impl Unpin for AleoV0
impl UnwindSafe for AleoV0
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.