pub enum TxOutTarget {
ToKey {
key: [u8; 32],
},
ToTaggedKey {
key: [u8; 32],
view_tag: u8,
},
}Expand description
Type of output formats, only TxOutTarget::ToKey and TxOutTarget::ToTaggedKey are used, other formats are legacy to the
original cryptonote implementation.
Variants§
Implementations§
Source§impl TxOutTarget
impl TxOutTarget
Sourcepub fn as_one_time_key(&self) -> Option<PublicKey>
pub fn as_one_time_key(&self) -> Option<PublicKey>
Returns the one-time public key if this is a TxOutTarget::ToKey or TxOutTarget::ToTaggedKey and None otherwise.
Sourcepub fn check_view_tag(&self, rv: PublicKey, index: usize) -> bool
pub fn check_view_tag(&self, rv: PublicKey, index: usize) -> bool
Derives a view tag and checks if it matches the outputs view tag, if no view tag is present the default is true.
Trait Implementations§
Source§impl Clone for TxOutTarget
impl Clone for TxOutTarget
Source§fn clone(&self) -> TxOutTarget
fn clone(&self) -> TxOutTarget
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 TxOutTarget
impl Debug for TxOutTarget
Source§impl Decodable for TxOutTarget
impl Decodable for TxOutTarget
Source§fn consensus_decode<R: Read + ?Sized>(r: &mut R) -> Result<TxOutTarget, Error>
fn consensus_decode<R: Read + ?Sized>(r: &mut R) -> Result<TxOutTarget, Error>
Decode an object with a well-defined format.
Source§impl<'de> Deserialize<'de> for TxOutTarget
impl<'de> Deserialize<'de> for TxOutTarget
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 Encodable for TxOutTarget
impl Encodable for TxOutTarget
Source§impl PartialEq for TxOutTarget
impl PartialEq for TxOutTarget
Source§impl Serialize for TxOutTarget
impl Serialize for TxOutTarget
impl Eq for TxOutTarget
impl StructuralPartialEq for TxOutTarget
Auto Trait Implementations§
impl Freeze for TxOutTarget
impl RefUnwindSafe for TxOutTarget
impl Send for TxOutTarget
impl Sync for TxOutTarget
impl Unpin for TxOutTarget
impl UnwindSafe for TxOutTarget
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