5#ifndef BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H
6#define BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H
14template <
bool has_witness>
26 template <
typename Other>
27 constexpr int Compare(
const Other& other)
const
29 static_assert(ALWAYS_FALSE<Other>,
"Forbidden comparison type");
36 template <
typename Other>
38 template <
typename Other>
40 template <
typename Other>
49 static std::optional<transaction_identifier>
FromHex(std::string_view hex)
52 if (!u)
return std::nullopt;
58 constexpr const std::byte*
data()
const {
return reinterpret_cast<const std::byte*
>(
m_wrapped.
data()); }
59 constexpr const std::byte*
begin()
const {
return reinterpret_cast<const std::byte*
>(
m_wrapped.
begin()); }
60 constexpr const std::byte*
end()
const {
return reinterpret_cast<const std::byte*
>(
m_wrapped.
end()); }
constexpr bool IsNull() const
constexpr unsigned char * end()
void Unserialize(Stream &s)
std::string ToString() const
constexpr int Compare(const base_blob &other) const
Lexicographic ordering.
constexpr unsigned char * begin()
void Serialize(Stream &s) const
std::string GetHex() const
constexpr const unsigned char * data() const
transaction_identifier represents the two canonical transaction identifier types (txid,...
std::string ToString() const
static constexpr auto size()
void Unserialize(Stream &s)
void Serialize(Stream &s) const
constexpr const std::byte * begin() const
const uint256 & ToUint256() const LIFETIMEBOUND
constexpr bool IsNull() const
Wrapped uint256 methods.
transaction_identifier(const uint256 &wrapped)
bool operator<(const Other &other) const
bool operator==(const Other &other) const
constexpr int Compare(const Other &other) const
std::string GetHex() const
bool operator!=(const Other &other) const
constexpr int Compare(const uint256 &other) const
constexpr const std::byte * data() const
static transaction_identifier FromUint256(const uint256 &id)
constexpr const std::byte * end() const
constexpr int Compare(const transaction_identifier< has_witness > &other) const
static std::optional< transaction_identifier > FromHex(std::string_view hex)
static std::optional< uint256 > FromHex(std::string_view str)