44 return os <<
strprintf(
"CAddress(addr=%s, nTime=%s, nServices=[%s])",
52 if (!
k.key.IsValid())
return os <<
"CExtKey(<invalid>)";
53 std::array<std::byte, BIP32_EXTKEY_SIZE> code;
61 std::array<std::byte, BIP32_EXTKEY_SIZE> code;
73 return os <<
"ByRatioNegSize(" <<
static_cast<const FeeFrac&
>(b) <<
")";
108 return os <<
strprintf(
"WitnessUnknown(version=%u, program=%s)",
w.GetWitnessVersion(),
HexStr(
w.GetWitnessProgram()));
113 return os <<
strprintf(
"PayToAnchor(version=%u, program=%s)",
p.GetWitnessVersion(),
HexStr(
p.GetWitnessProgram()));
123 std::visit([&
os](
const auto&
alt) {
os <<
alt; }, dest);
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
std::string FormatHDKeypath(const std::vector< uint32_t > &path, bool apostrophe)
std::string ToString() const
Wrapper around FeeFrac & derived types, which adds a total ordering which first sorts by feerate and ...
A CService with information about it as peer.
ServiceFlags nServices
Serialized as uint64_t in V1, and as CompactSize in V2.
NodeSeconds nTime
Always included in serialization. The behavior is unspecified if the value is not representable as ui...
const CScript & GetScript() const LIFETIMEBOUND
An encapsulated public key.
static constexpr unsigned int COMPRESSED_SIZE
Serialized script, used inside transaction inputs and outputs.
A combination of a network address (CNetAddr) and a (TCP) port.
std::string ToStringAddrPort() const
Minimal stream for writing to an existing span of bytes.
std::string ScriptToAsmStr(const CScript &script, const bool fAttemptSighashDecode)
Create the assembly string representation of a CScript object.
std::string HexStr(const std::span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
auto Join(const C &container, const S &separator, UnaryOp unary_op)
Join all container items.
std::string GetNetworkName(enum Network net)
std::vector< std::string > serviceFlagsToStr(uint64_t flags)
Convert service flags (a bitmask of NODE_*) to human readable strings.
Location information for an address in AddrMan.
Data structure storing a fee and size.
KeyFingerprint fingerprint
First 32 bits of the Hash160 of the public key at the root of the path.
std::vector< uint32_t > path
const CPubKey & GetPubKey() const LIFETIMEBOUND
CTxDestination subtype to encode any future Witness version.
std::ostream & operator<<(std::ostream &os, const AddressPosition &pos)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.