Bitcoin Core 32.99.0
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
bip352::SilentPaymentsLabel Class Reference

#include <bip352.h>

Public Member Functions

 SilentPaymentsLabel (const secp256k1_silentpayments_label &label)
 
 SilentPaymentsLabel (SilentPaymentsLabel &&) noexcept
 
SilentPaymentsLabel & operator= (SilentPaymentsLabel &&) noexcept
 
 SilentPaymentsLabel (const SilentPaymentsLabel &)
 
SilentPaymentsLabel & operator= (const SilentPaymentsLabel &)
 
 ~SilentPaymentsLabel ()
 
template<typename Stream >
void Serialize (Stream &s) const
 
const secp256k1_silentpayments_label * Get () const LIFETIMEBOUND
 

Static Public Member Functions

template<typename Stream >
static std::optional< SilentPaymentsLabel > Unserialize (Stream &s)
 

Static Private Member Functions

static std::optional< SilentPaymentsLabel > FromBytes (std::span< const unsigned char, CPubKey::COMPRESSED_SIZE > vch)
 Parses raw bytes into a fully valid label returns std::nullopt if vch is not a validly-encoded label. More...
 

Private Attributes

std::unique_ptr< secp256k1_silentpayments_label > m_label
 
unsigned char m_vch [CPubKey::COMPRESSED_SIZE]
 

Friends

bool operator== (const SilentPaymentsLabel &a, const SilentPaymentsLabel &b)
 
bool operator< (const SilentPaymentsLabel &a, const SilentPaymentsLabel &b)
 
bool operator> (const SilentPaymentsLabel &a, const SilentPaymentsLabel &b)
 
bool operator< (const SilentPaymentsLabel &a, std::span< const unsigned char, CPubKey::COMPRESSED_SIZE > b)
 Transparent comparisons against a raw 33-byte compressed label key, so a LabelTweakMap can be looked up by key bytes (e.g. More...
 
bool operator< (std::span< const unsigned char, CPubKey::COMPRESSED_SIZE > a, const SilentPaymentsLabel &b)
 

Detailed Description

Definition at line 105 of file bip352.h.

Constructor & Destructor Documentation

◆ SilentPaymentsLabel() [1/3]

bip352::SilentPaymentsLabel::SilentPaymentsLabel ( const secp256k1_silentpayments_label &  label)

Definition at line 107 of file bip352.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SilentPaymentsLabel() [2/3]

bip352::SilentPaymentsLabel::SilentPaymentsLabel ( SilentPaymentsLabel &&  )
defaultnoexcept

◆ SilentPaymentsLabel() [3/3]

bip352::SilentPaymentsLabel::SilentPaymentsLabel ( const SilentPaymentsLabel &  label)

Definition at line 126 of file bip352.cpp.

◆ ~SilentPaymentsLabel()

bip352::SilentPaymentsLabel::~SilentPaymentsLabel ( )
default

Member Function Documentation

◆ FromBytes()

std::optional< SilentPaymentsLabel > bip352::SilentPaymentsLabel::FromBytes ( std::span< const unsigned char, CPubKey::COMPRESSED_SIZE >  vch)
staticprivate

Parses raw bytes into a fully valid label returns std::nullopt if vch is not a validly-encoded label.

Definition at line 113 of file bip352.cpp.

Here is the call graph for this function:

◆ Get()

const secp256k1_silentpayments_label * bip352::SilentPaymentsLabel::Get ( ) const

Definition at line 139 of file bip352.cpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

SilentPaymentsLabel & bip352::SilentPaymentsLabel::operator= ( const SilentPaymentsLabel &  label)

Definition at line 131 of file bip352.cpp.

◆ operator=() [2/2]

SilentPaymentsLabel & bip352::SilentPaymentsLabel::operator= ( SilentPaymentsLabel &&  )
defaultnoexcept

◆ Serialize()

template<typename Stream >
void bip352::SilentPaymentsLabel::Serialize ( Stream &  s) const
inline

Definition at line 144 of file bip352.h.

Here is the caller graph for this function:

◆ Unserialize()

template<typename Stream >
static std::optional< SilentPaymentsLabel > bip352::SilentPaymentsLabel::Unserialize ( Stream &  s)
inlinestatic

Definition at line 150 of file bip352.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator< [1/3]

bool operator< ( const SilentPaymentsLabel &  a,
const SilentPaymentsLabel &  b 
)
friend

Definition at line 127 of file bip352.h.

◆ operator< [2/3]

bool operator< ( const SilentPaymentsLabel &  a,
std::span< const unsigned char, CPubKey::COMPRESSED_SIZE >  b 
)
friend

Transparent comparisons against a raw 33-byte compressed label key, so a LabelTweakMap can be looked up by key bytes (e.g.

from a secp256k1 callback) without constructing a fully-parsed SilentPaymentsLabel.

Definition at line 136 of file bip352.h.

◆ operator< [3/3]

bool operator< ( std::span< const unsigned char, CPubKey::COMPRESSED_SIZE >  a,
const SilentPaymentsLabel &  b 
)
friend

Definition at line 139 of file bip352.h.

◆ operator==

bool operator== ( const SilentPaymentsLabel &  a,
const SilentPaymentsLabel &  b 
)
friend

Definition at line 124 of file bip352.h.

◆ operator>

bool operator> ( const SilentPaymentsLabel &  a,
const SilentPaymentsLabel &  b 
)
friend

Definition at line 130 of file bip352.h.

Member Data Documentation

◆ m_label

std::unique_ptr<secp256k1_silentpayments_label> bip352::SilentPaymentsLabel::m_label
private

Definition at line 107 of file bip352.h.

◆ m_vch

unsigned char bip352::SilentPaymentsLabel::m_vch[CPubKey::COMPRESSED_SIZE]
private

Definition at line 108 of file bip352.h.


The documentation for this class was generated from the following files: