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]
impl Address
[src]pub fn standard(
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
[src]
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
Create a standard address which is valid on the given network.
pub fn subaddress(
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
[src]
network: Network,
public_spend: PublicKey,
public_view: PublicKey
) -> Address
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]
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.
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<'de> Deserialize<'de> for Address
[src]
impl<'de> Deserialize<'de> for Address
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl StructuralEq for Address
[src]
impl StructuralEq for Address
[src]impl StructuralPartialEq for Address
[src]
impl StructuralPartialEq for Address
[src]Auto Trait Implementations
impl RefUnwindSafe for Address
impl RefUnwindSafe for Address
impl UnwindSafe for Address
impl UnwindSafe for Address