pub struct BlindedMailboxIdentifier(/* private fields */);Expand description
Blinded identifier for a mailbox
It is blinded by adding to the mailbox public key point the Diffie-Hellman secret between the server’s key and the VTXO key from the address.
Represented as a curve point.
Implementations§
Source§impl BlindedMailboxIdentifier
impl BlindedMailboxIdentifier
Sourcepub fn to_byte_array(self) -> [u8; 33]
pub fn to_byte_array(self) -> [u8; 33]
Convert into underlying byte array.
Sourcepub fn from_byte_array(bytes: [u8; 33]) -> Self
pub fn from_byte_array(bytes: [u8; 33]) -> Self
Convert from byte array.
Sourcepub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
pub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
Create from byte slice.
Source§impl BlindedMailboxIdentifier
impl BlindedMailboxIdentifier
pub fn new( mailbox_id: MailboxIdentifier, server_pubkey: PublicKey, vtxo_key: &Keypair, ) -> BlindedMailboxIdentifier
Sourcepub fn from_pubkey(pubkey: PublicKey) -> Self
pub fn from_pubkey(pubkey: PublicKey) -> Self
Convert from a public key
Trait Implementations§
Source§impl AsRef<[u8]> for BlindedMailboxIdentifier
impl AsRef<[u8]> for BlindedMailboxIdentifier
Source§impl Clone for BlindedMailboxIdentifier
impl Clone for BlindedMailboxIdentifier
Source§fn clone(&self) -> BlindedMailboxIdentifier
fn clone(&self) -> BlindedMailboxIdentifier
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlindedMailboxIdentifier
impl Debug for BlindedMailboxIdentifier
Source§impl<'de> Deserialize<'de> for BlindedMailboxIdentifier
impl<'de> Deserialize<'de> for BlindedMailboxIdentifier
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BlindedMailboxIdentifier
impl Display for BlindedMailboxIdentifier
Source§impl<'a> DisplayHex for &'a BlindedMailboxIdentifier
impl<'a> DisplayHex for &'a BlindedMailboxIdentifier
Source§type Display = <&'a [u8; 33] as DisplayHex>::Display
type Display = <&'a [u8; 33] as DisplayHex>::Display
The type providing
fmt::Display implementation. Read moreSource§fn to_lower_hex_string(self) -> String
fn to_lower_hex_string(self) -> String
Create a lower-hex-encoded string. Read more
Source§fn to_upper_hex_string(self) -> String
fn to_upper_hex_string(self) -> String
Create an upper-hex-encoded string. Read more
Source§fn append_hex_to_string(self, case: Case, string: &mut String)
fn append_hex_to_string(self, case: Case, string: &mut String)
Appends hex-encoded content to an existing
String. Read moreSource§fn hex_reserve_suggestion(self) -> usize
fn hex_reserve_suggestion(self) -> usize
Hints how much bytes to reserve when creating a
String. Read moreSource§impl From<BlindedMailboxIdentifier> for [u8; 33]
impl From<BlindedMailboxIdentifier> for [u8; 33]
Source§fn from(p: BlindedMailboxIdentifier) -> Self
fn from(p: BlindedMailboxIdentifier) -> Self
Converts to this type from the input type.
Source§impl From<PublicKey> for BlindedMailboxIdentifier
impl From<PublicKey> for BlindedMailboxIdentifier
Source§impl FromStr for BlindedMailboxIdentifier
impl FromStr for BlindedMailboxIdentifier
Source§impl Hash for BlindedMailboxIdentifier
impl Hash for BlindedMailboxIdentifier
Source§impl Ord for BlindedMailboxIdentifier
impl Ord for BlindedMailboxIdentifier
Source§fn cmp(&self, other: &BlindedMailboxIdentifier) -> Ordering
fn cmp(&self, other: &BlindedMailboxIdentifier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BlindedMailboxIdentifier
impl PartialEq for BlindedMailboxIdentifier
Source§impl PartialOrd for BlindedMailboxIdentifier
impl PartialOrd for BlindedMailboxIdentifier
Source§impl ProtocolEncoding for BlindedMailboxIdentifier
impl ProtocolEncoding for BlindedMailboxIdentifier
Source§fn encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<(), Error>
fn encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<(), Error>
Encode the object into the writer.
Source§fn decode<R: Read + ?Sized>(r: &mut R) -> Result<Self, ProtocolDecodingError>
fn decode<R: Read + ?Sized>(r: &mut R) -> Result<Self, ProtocolDecodingError>
Decode the object from the writer.
Source§fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
Deserialize object from the given byte slice.
Source§fn serialize_hex(&self) -> String
fn serialize_hex(&self) -> String
Serialize the object to a lowercase hex string.
Source§fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
Deserialize object from hex slice.
Source§impl Serialize for BlindedMailboxIdentifier
impl Serialize for BlindedMailboxIdentifier
Source§impl TryFrom<&[u8]> for BlindedMailboxIdentifier
impl TryFrom<&[u8]> for BlindedMailboxIdentifier
impl Copy for BlindedMailboxIdentifier
impl Eq for BlindedMailboxIdentifier
impl StructuralPartialEq for BlindedMailboxIdentifier
Auto Trait Implementations§
impl Freeze for BlindedMailboxIdentifier
impl RefUnwindSafe for BlindedMailboxIdentifier
impl Send for BlindedMailboxIdentifier
impl Sync for BlindedMailboxIdentifier
impl Unpin for BlindedMailboxIdentifier
impl UnwindSafe for BlindedMailboxIdentifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more