pub struct Address(/* private fields */);
Expand description
Public address of an Aleo account
Implementations§
source§impl Address
impl Address
sourcepub fn from_private_key(private_key: &PrivateKey) -> Self
pub fn from_private_key(private_key: &PrivateKey) -> Self
Derive an Aleo address from a private key
@param {PrivateKey} private_key The private key to derive the address from @returns {Address} Address corresponding to the private key
sourcepub fn from_view_key(view_key: &ViewKey) -> Self
pub fn from_view_key(view_key: &ViewKey) -> Self
Derive an Aleo address from a view key
@param {ViewKey} view_key The view key to derive the address from @returns {Address} Address corresponding to the view key
sourcepub fn from_string(address: &str) -> Self
pub fn from_string(address: &str) -> Self
Create an aleo address object from a string representation of an address
@param {string} address String representation of an addressm @returns {Address} Address
Methods from Deref<Target = Address<Testnet3>>§
pub fn to_group(&self) -> &Group<E>
pub fn to_group(&self) -> &Group<E>
Returns the address as a group element.
Methods from Deref<Target = Group<E>>§
pub 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.
pub 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.
pub 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> = _
pub fn mul_by_cofactor(&self) -> Group<E>
pub fn mul_by_cofactor(&self) -> Group<E>
Returns self * COFACTOR
.
pub fn div_by_cofactor(&self) -> Group<E>
pub fn div_by_cofactor(&self) -> Group<E>
Returns self / COFACTOR
.
Trait Implementations§
source§impl FromWasmAbi for Address
impl FromWasmAbi for Address
source§impl IntoWasmAbi for Address
impl IntoWasmAbi for Address
source§impl LongRefFromWasmAbi for Address
impl LongRefFromWasmAbi for Address
source§impl OptionFromWasmAbi for Address
impl OptionFromWasmAbi for Address
source§impl OptionIntoWasmAbi for Address
impl OptionIntoWasmAbi for Address
source§impl PartialEq for Address
impl PartialEq for Address
source§impl RefFromWasmAbi for Address
impl RefFromWasmAbi for Address
source§impl RefMutFromWasmAbi for Address
impl RefMutFromWasmAbi for Address
source§impl TryFromJsValue for Address
impl TryFromJsValue for Address
source§impl VectorFromWasmAbi for Address
impl VectorFromWasmAbi for Address
source§impl VectorIntoWasmAbi for Address
impl VectorIntoWasmAbi for Address
impl Copy for Address
impl Eq for Address
impl StructuralEq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.