Type Alias MoneroAddress

Source
pub type MoneroAddress = Address<{ _ }>;
Expand description

Instantiation of the Address type with Monero’s network bytes.

Aliased Type§

pub struct MoneroAddress { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 336 bytes

Implementations

Source§

impl<const ADDRESS_BYTES: u128> Address<ADDRESS_BYTES>

Source

pub fn new( network: Network, kind: AddressType, spend: EdwardsPoint, view: EdwardsPoint, ) -> Self

Create a new address.

Source

pub fn from_str_with_unchecked_network(s: &str) -> Result<Self, AddressError>

Parse an address from a String, accepting any network it is.

Source

pub fn from_str(network: Network, s: &str) -> Result<Self, AddressError>

Create a new address from a &str.

This takes in an argument for the expected network, erroring if a distinct network was used. It also errors if the address is invalid (as expected).

Source

pub fn network(&self) -> Network

The network this address is intended for use on.

Source

pub fn kind(&self) -> &AddressType

The type of address this is.

Source

pub fn is_subaddress(&self) -> bool

If this is a subaddress.

Source

pub fn payment_id(&self) -> Option<[u8; 8]>

The payment ID for this address.

Source

pub fn is_guaranteed(&self) -> bool

If this address is guaranteed.

A guaranteed address is one where any outputs scanned to it are guaranteed to be spendable under the hardness of various cryptographic problems (which are assumed hard). This is via a modified shared-key derivation which eliminates the burning bug.

Source

pub fn spend(&self) -> EdwardsPoint

The public spend key for this address.

Source

pub fn view(&self) -> EdwardsPoint

The public view key for this address.

Trait Implementations

Source§

impl<const ADDRESS_BYTES: u128> Clone for Address<ADDRESS_BYTES>

Source§

fn clone(&self) -> Address<ADDRESS_BYTES>

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<const ADDRESS_BYTES: u128> Debug for Address<ADDRESS_BYTES>

Source§

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

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

impl<const ADDRESS_BYTES: u128> Display for Address<ADDRESS_BYTES>

Source§

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

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

impl<const ADDRESS_BYTES: u128> PartialEq for Address<ADDRESS_BYTES>

Source§

fn eq(&self, other: &Address<ADDRESS_BYTES>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const ADDRESS_BYTES: u128> Zeroize for Address<ADDRESS_BYTES>

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
Source§

impl<const ADDRESS_BYTES: u128> Copy for Address<ADDRESS_BYTES>

Source§

impl<const ADDRESS_BYTES: u128> Eq for Address<ADDRESS_BYTES>

Source§

impl<const ADDRESS_BYTES: u128> StructuralPartialEq for Address<ADDRESS_BYTES>