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>
impl<const ADDRESS_BYTES: u128> Address<ADDRESS_BYTES>
Sourcepub fn new(
network: Network,
kind: AddressType,
spend: EdwardsPoint,
view: EdwardsPoint,
) -> Self
pub fn new( network: Network, kind: AddressType, spend: EdwardsPoint, view: EdwardsPoint, ) -> Self
Create a new address.
Sourcepub fn from_str_with_unchecked_network(s: &str) -> Result<Self, AddressError>
pub fn from_str_with_unchecked_network(s: &str) -> Result<Self, AddressError>
Parse an address from a String, accepting any network it is.
Sourcepub fn from_str(network: Network, s: &str) -> Result<Self, AddressError>
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).
Sourcepub fn kind(&self) -> &AddressType
pub fn kind(&self) -> &AddressType
The type of address this is.
Sourcepub fn is_subaddress(&self) -> bool
pub fn is_subaddress(&self) -> bool
If this is a subaddress.
Sourcepub fn payment_id(&self) -> Option<[u8; 8]>
pub fn payment_id(&self) -> Option<[u8; 8]>
The payment ID for this address.
Sourcepub fn is_guaranteed(&self) -> bool
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.
Sourcepub fn spend(&self) -> EdwardsPoint
pub fn spend(&self) -> EdwardsPoint
The public spend key for this address.
Sourcepub fn view(&self) -> EdwardsPoint
pub fn view(&self) -> EdwardsPoint
The public view key for this address.