pub struct AleoCanaryV0;
Trait Implementations§
Source§impl Aleo for AleoCanaryV0
impl Aleo for AleoCanaryV0
Source§fn initialize_global_constants()
fn initialize_global_constants()
Initializes the global constants for the Aleo environment.
Source§fn encryption_domain() -> Field<Self>
fn encryption_domain() -> Field<Self>
Returns the encryption domain as a constant field element.
Source§fn graph_key_domain() -> Field<Self>
fn graph_key_domain() -> Field<Self>
Returns the graph key domain as a constant field element.
Source§fn serial_number_domain() -> Field<Self>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
fn hash_bhp1024(input: &[Boolean<Self>]) -> Field<Self>
Returns the BHP hash with an input hasher of 1024-bits.
Source§fn hash_keccak256(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
fn hash_keccak256(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
Returns the Keccak hash with a 256-bit output.
Source§fn hash_keccak384(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
fn hash_keccak384(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
Returns the Keccak hash with a 384-bit output.
Source§fn hash_keccak512(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
fn hash_keccak512(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
Returns the Keccak hash with a 512-bit output.
Source§fn hash_ped64(input: &[Boolean<Self>]) -> Field<Self>
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>
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>
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>
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>
fn hash_psd8(input: &[Field<Self>]) -> Field<Self>
Returns the Poseidon hash with an input rate of 8.
Source§fn hash_sha3_256(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
fn hash_sha3_256(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
Returns the SHA-3 hash with a 256-bit output.
Source§fn hash_sha3_384(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
fn hash_sha3_384(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
Returns the SHA-3 hash with a 384-bit output.
Source§fn hash_sha3_512(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
fn hash_sha3_512(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>
Returns the SHA-3 hash with a 512-bit output.
Source§fn hash_many_psd2(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>
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>>
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>>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
const MAX_DATA_SIZE_IN_FIELDS: u32 = <Self::Network as console::Network>::MAX_DATA_SIZE_IN_FIELDS
Source§impl Clone for AleoCanaryV0
impl Clone for AleoCanaryV0
Source§fn clone(&self) -> AleoCanaryV0
fn clone(&self) -> AleoCanaryV0
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AleoCanaryV0
impl Debug for AleoCanaryV0
Source§impl Display for AleoCanaryV0
impl Display for AleoCanaryV0
Source§impl Environment for AleoCanaryV0
impl Environment for AleoCanaryV0
Source§fn zero() -> LinearCombination<Self::BaseField>
fn zero() -> LinearCombination<Self::BaseField>
Returns the zero
constant.
Source§fn one() -> LinearCombination<Self::BaseField>
fn one() -> LinearCombination<Self::BaseField>
Returns the one
constant.
Source§fn new_variable(mode: Mode, value: Self::BaseField) -> Variable<Self::BaseField>
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
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,
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>>,
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
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_variables() -> u64
fn num_variables() -> u64
Returns the number of constant, public, and 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 get_variable_limit() -> Option<u64>
fn get_variable_limit() -> Option<u64>
Returns the variable limit for the circuit, if one exists.
Source§fn set_variable_limit(limit: Option<u64>)
fn set_variable_limit(limit: Option<u64>)
Sets the variable limit for the circuit.
Source§fn get_constraint_limit() -> Option<u64>
fn get_constraint_limit() -> Option<u64>
Returns the constraint limit for the circuit, if one exists.
Source§fn set_constraint_limit(limit: Option<u64>)
fn set_constraint_limit(limit: Option<u64>)
Sets the constraint limit for the circuit.
Source§fn halt<S: Into<String>, T>(message: S) -> T
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>)
fn inject_r1cs(r1cs: R1CS<Self::BaseField>)
Returns the R1CS circuit, resetting the circuit.
Source§fn eject_r1cs_and_reset() -> R1CS<Self::BaseField>
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>
fn eject_assignment_and_reset() -> Assignment<<Self::Network as Environment>::Field>
Returns the R1CS assignment of the circuit, resetting the circuit.
type Affine = <CanaryCircuit as Environment>::Affine
type BaseField = <CanaryCircuit as Environment>::BaseField
type Network = <CanaryCircuit as Environment>::Network
type ScalarField = <CanaryCircuit 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)
fn assert<Boolean>(boolean: Boolean)
true
.Source§fn assert_neq<A, B>(a: A, b: B)
fn assert_neq<A, B>(a: A, b: B)
A != B
.Source§impl Hash for AleoCanaryV0
impl Hash for AleoCanaryV0
Source§impl PartialEq for AleoCanaryV0
impl PartialEq for AleoCanaryV0
impl Copy for AleoCanaryV0
impl Eq for AleoCanaryV0
impl StructuralPartialEq for AleoCanaryV0
Auto Trait Implementations§
impl Freeze for AleoCanaryV0
impl RefUnwindSafe for AleoCanaryV0
impl Send for AleoCanaryV0
impl Sync for AleoCanaryV0
impl Unpin for AleoCanaryV0
impl UnwindSafe for AleoCanaryV0
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more