Struct snarkvm_console_types_address::Address
source · pub struct Address<E: Environment> { /* private fields */ }
Implementations§
source§impl<E: Environment> Address<E>
impl<E: Environment> Address<E>
Methods from Deref<Target = Group<E>>§
sourcepub fn to_x_coordinate(&self) -> Field<E>
pub fn to_x_coordinate(&self) -> Field<E>
Returns the x-coordinate in the affine coordinates of the group.
sourcepub fn to_xy_coordinates(&self) -> (Field<E>, Field<E>)
pub fn to_xy_coordinates(&self) -> (Field<E>, Field<E>)
Returns the x-coordinate and y-coordinate in the affine coordinates of the group.
sourcepub fn to_y_coordinate(&self) -> Field<E>
pub fn to_y_coordinate(&self) -> Field<E>
Returns the y-coordinate in the affine coordinates of the group.
pub const EDWARDS_A: Field<E> = _
pub const EDWARDS_D: Field<E> = _
pub const MONTGOMERY_A: Field<E> = _
pub const MONTGOMERY_B: Field<E> = _
sourcepub fn mul_by_cofactor(&self) -> Group<E>
pub fn mul_by_cofactor(&self) -> Group<E>
Returns self * COFACTOR
.
sourcepub fn div_by_cofactor(&self) -> Group<E>
pub fn div_by_cofactor(&self) -> Group<E>
Returns self / COFACTOR
.
Trait Implementations§
source§impl<E: Environment> Compare for Address<E>
impl<E: Environment> Compare for Address<E>
source§fn is_less_than(&self, other: &Self) -> Self::Output
fn is_less_than(&self, other: &Self) -> Self::Output
Returns true
if self
is less than other
.
source§fn is_greater_than(&self, other: &Self) -> Self::Output
fn is_greater_than(&self, other: &Self) -> Self::Output
Returns true
if self
is greater than other
.
source§fn is_less_than_or_equal(&self, other: &Self) -> Self::Output
fn is_less_than_or_equal(&self, other: &Self) -> Self::Output
Returns true
if self
is less than or equal to other
.
source§fn is_greater_than_or_equal(&self, other: &Self) -> Self::Output
fn is_greater_than_or_equal(&self, other: &Self) -> Self::Output
Returns true
if self
is greater than or equal to other
.
type Output = Boolean<E>
source§impl<E: Environment> Debug for Address<E>
impl<E: Environment> Debug for Address<E>
source§impl<E: Environment> Deref for Address<E>
impl<E: Environment> Deref for Address<E>
source§impl<'de, E: Environment> Deserialize<'de> for Address<E>
impl<'de, E: Environment> Deserialize<'de> for Address<E>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes an account address from a string or bytes.
source§impl<E: Environment> Display for Address<E>
impl<E: Environment> Display for Address<E>
source§impl<E: Environment> Distribution<Address<E>> for Standard
impl<E: Environment> Distribution<Address<E>> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Address<E>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Address<E>
T
, using rng
as the source of randomness.source§impl<E: Environment> Equal for Address<E>
impl<E: Environment> Equal for Address<E>
source§impl<E: Environment> FromBits for Address<E>
impl<E: Environment> FromBits for Address<E>
source§fn from_bits_le(bits_le: &[bool]) -> Result<Self>
fn from_bits_le(bits_le: &[bool]) -> Result<Self>
Initializes a new address by recovering the x-coordinate of an affine group from a list of little-endian bits.
source§fn from_bits_be(bits_be: &[bool]) -> Result<Self>
fn from_bits_be(bits_be: &[bool]) -> Result<Self>
Initializes a new address by recovering the x-coordinate of an affine group from a list of big-endian bits.
source§impl<E: Environment> FromBytes for Address<E>
impl<E: Environment> FromBytes for Address<E>
source§impl<E: Environment> FromField for Address<E>
impl<E: Environment> FromField for Address<E>
source§impl<E: Environment> FromFields for Address<E>
impl<E: Environment> FromFields for Address<E>
source§impl<E: Environment> FromStr for Address<E>
impl<E: Environment> FromStr for Address<E>
source§impl<E: Environment> Parser for Address<E>
impl<E: Environment> Parser for Address<E>
source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into an address.
source§impl<E: PartialEq + Environment> PartialEq for Address<E>
impl<E: PartialEq + Environment> PartialEq for Address<E>
source§impl<E: Environment> Serialize for Address<E>
impl<E: Environment> Serialize for Address<E>
source§impl<E: Environment> SizeInBits for Address<E>
impl<E: Environment> SizeInBits for Address<E>
source§fn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the address size in bits.
source§impl<E: Environment> SizeInBytes for Address<E>
impl<E: Environment> SizeInBytes for Address<E>
source§fn size_in_bytes() -> usize
fn size_in_bytes() -> usize
Returns the address size in bytes.
source§impl<E: Environment> Ternary for Address<E>
impl<E: Environment> Ternary for Address<E>
source§impl<E: Environment> ToBits for Address<E>
impl<E: Environment> ToBits for Address<E>
source§fn write_bits_le(&self, vec: &mut Vec<bool>)
fn write_bits_le(&self, vec: &mut Vec<bool>)
Outputs the little-endian bit representation of self.to_x_coordinate()
without trailing zeros.
source§fn write_bits_be(&self, vec: &mut Vec<bool>)
fn write_bits_be(&self, vec: &mut Vec<bool>)
Outputs the big-endian bit representation of self.to_x_coordinate()
without leading zeros.
§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
self
as a boolean array in little-endian order.§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
self
as a boolean array in big-endian order.source§impl<E: Environment> ToBytes for Address<E>
impl<E: Environment> ToBytes for Address<E>
source§impl<E: Environment> ToField for Address<E>
impl<E: Environment> ToField for Address<E>
source§impl<E: Environment> ToFields for Address<E>
impl<E: Environment> ToFields for Address<E>
source§impl<E: Environment> TypeName for Address<E>
impl<E: Environment> TypeName for Address<E>
source§impl<E: Environment> Visibility for Address<E>
impl<E: Environment> Visibility for Address<E>
impl<E: Environment> AddressTrait for Address<E>
impl<E: Copy + Environment> Copy for Address<E>
impl<E: Eq + Environment> Eq for Address<E>
impl<E: Environment> StructuralEq for Address<E>
impl<E: Environment> StructuralPartialEq for Address<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for Address<E>where <E as Environment>::Projective: RefUnwindSafe,
impl<E> Send for Address<E>
impl<E> Sync for Address<E>
impl<E> Unpin for Address<E>where <E as Environment>::Projective: Unpin,
impl<E> UnwindSafe for Address<E>where <E as Environment>::Projective: 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
§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§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.