Struct monero::util::address::Address[][src]

pub struct Address {
    pub network: Network,
    pub addr_type: AddressType,
    pub public_spend: PublicKey,
    pub public_view: PublicKey,
}

A complete Monero typed address valid for a specific network.

Fields

network: Network

The network on which the address is valid and should be used.

addr_type: AddressType

The address type.

public_spend: PublicKey

The address spend public key.

public_view: PublicKey

The address view public key.

Implementations

impl Address[src]

pub fn standard(
    network: Network,
    public_spend: PublicKey,
    public_view: PublicKey
) -> Address
[src]

Create a standard address which is valid on the given network.

pub fn subaddress(
    network: Network,
    public_spend: PublicKey,
    public_view: PublicKey
) -> Address
[src]

Create a sub-address which is valid on the given network.

pub fn integrated(
    network: Network,
    public_spend: PublicKey,
    public_view: PublicKey,
    payment_id: PaymentId
) -> Address
[src]

Create an address with an integrated payment id which is valid on the given network.

pub fn from_viewpair(network: Network, keys: &ViewPair) -> Address[src]

Create a standard address from a view pair which is valid on the given network.

pub fn from_keypair(network: Network, keys: &KeyPair) -> Address[src]

Create a standard address from a key pair which is valid on the given network.

pub fn from_bytes(bytes: &[u8]) -> Result<Address, Error>[src]

Parse an address from a vector of bytes, fail if the magic byte is incorrect, if public keys are not valid points, if payment id is invalid, and if checksums missmatch.

pub fn as_bytes(&self) -> Vec<u8>[src]

Serialize the address as a vector of bytes.

pub fn as_hex(&self) -> String[src]

Serialize the address as an hexadecimal string.

Trait Implementations

impl Clone for Address[src]

impl Copy for Address[src]

impl Debug for Address[src]

impl<'de> Deserialize<'de> for Address[src]

impl Display for Address[src]

impl Eq for Address[src]

impl FromStr for Address[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Address[src]

impl PartialEq<Address> for Address[src]

impl Serialize for Address[src]

impl StructuralEq for Address[src]

impl StructuralPartialEq for Address[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.