pub struct Address {
pub network: Network,
pub addr_type: AddressType,
pub public_spend: PublicKey,
pub public_view: PublicKey,
}
Expand description
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§
source§impl Address
impl Address
sourcepub fn standard(
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
pub fn standard(
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
Create a standard address which is valid on the given network.
sourcepub fn subaddress(
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
pub fn subaddress(
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
Create a sub-address which is valid on the given network.
sourcepub fn integrated(
network: Network,
public_spend: PublicKey,
public_view: PublicKey,
payment_id: PaymentId
) -> Address
pub fn integrated(
network: Network,
public_spend: PublicKey,
public_view: PublicKey,
payment_id: PaymentId
) -> Address
Create an address with an integrated payment id which is valid on the given network.
sourcepub fn from_viewpair(network: Network, keys: &ViewPair) -> Address
pub fn from_viewpair(network: Network, keys: &ViewPair) -> Address
Create a standard address from a view pair which is valid on the given network.
sourcepub fn from_keypair(network: Network, keys: &KeyPair) -> Address
pub fn from_keypair(network: Network, keys: &KeyPair) -> Address
Create a standard address from a key pair which is valid on the given network.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Address> for Address
impl PartialEq<Address> for Address
source§impl ToHex for Address
impl ToHex for Address
source§fn encode_hex<T: FromIterator<char>>(&self) -> T
fn encode_hex<T: FromIterator<char>>(&self) -> T
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<T: FromIterator<char>>(&self) -> T
fn encode_hex_upper<T: FromIterator<char>>(&self) -> T
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)