MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SerializeHDKeypaths

Function SerializeHDKeypaths

src/psbt.h:205–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203// Serialize HD keypaths to a stream from a map
204template<typename Stream>
205void SerializeHDKeypaths(Stream& s, const std::map<CPubKey, KeyOriginInfo>& hd_keypaths, CompactSizeWriter type)
206{
207 for (const auto& keypath_pair : hd_keypaths) {
208 if (!keypath_pair.first.IsValid()) {
209 throw std::ios_base::failure("Invalid CPubKey being serialized");
210 }
211 SerializeToVector(s, type, std::span{keypath_pair.first});
212 SerializeHDKeypath(s, keypath_pair.second);
213 }
214}
215
216// Deserialize a PSBT_{IN/OUT}_MUSIG2_PARTICIPANT_PUBKEYS field
217template<typename Stream>

Callers 3

SerializeMethod · 0.85
SerializeMethod · 0.85
script_sign.cppFile · 0.85

Calls 3

SerializeToVectorFunction · 0.85
SerializeHDKeypathFunction · 0.85
IsValidMethod · 0.45

Tested by

no test coverage detected