Enum bee_message::address::Address
source · pub enum Address {
Ed25519(Ed25519Address),
}Expand description
A generic address supporting different address kinds.
Variants§
Ed25519(Ed25519Address)
An Ed25519 address.
Implementations§
source§impl Address
impl Address
sourcepub fn try_from_bech32(addr: &str) -> Result<Self, Error>
pub fn try_from_bech32(addr: &str) -> Result<Self, Error>
Tries to create an Address from a Bech32 encoded string.
sourcepub fn to_bech32(&self, hrp: &str) -> String
pub fn to_bech32(&self, hrp: &str) -> String
Encodes this address to a Bech32 string with the hrp (human readable part) argument as prefix.
sourcepub fn verify(
&self,
msg: &[u8],
signature: &SignatureUnlock
) -> Result<(), Error>
pub fn verify( &self, msg: &[u8], signature: &SignatureUnlock ) -> Result<(), Error>
Verifies a SignatureUnlock for a message against the Address.
Trait Implementations§
source§impl From<Ed25519Address> for Address
impl From<Ed25519Address> for Address
source§fn from(address: Ed25519Address) -> Self
fn from(address: Ed25519Address) -> Self
Converts to this type from the input type.
source§impl Ord for Address
impl Ord for Address
source§impl Packable for Address
impl Packable for Address
source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length of the packed bytes.
source§fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
Packs the instance to bytes and writes them to the passed writer.
source§fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R
) -> Result<Self, Self::Error>
fn unpack_inner<R: Read + ?Sized, const CHECK: bool>( reader: &mut R ) -> Result<Self, Self::Error>
Reads bytes from the passed reader and unpacks them into an instance.
source§fn pack_new(&self) -> Vec<u8, Global>
fn pack_new(&self) -> Vec<u8, Global>
Packs the instance to bytes and writes them to a newly allocated vector.
source§impl PartialEq<Address> for Address
impl PartialEq<Address> for Address
source§impl PartialOrd<Address> for Address
impl PartialOrd<Address> for Address
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more