MCPcopy Create free account
hub / github.com/ElementsProject/elements / SerializeHDKeypaths

Function SerializeHDKeypaths

src/psbt.h:218–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216// Serialize HD keypaths to a stream from a map
217template<typename Stream>
218void SerializeHDKeypaths(Stream& s, const std::map<CPubKey, KeyOriginInfo>& hd_keypaths, CompactSizeWriter type)
219{
220 for (auto keypath_pair : hd_keypaths) {
221 if (!keypath_pair.first.IsValid()) {
222 throw std::ios_base::failure("Invalid CPubKey being serialized");
223 }
224 SerializeToVector(s, type, Span(keypath_pair.first));
225 SerializeHDKeypath(s, keypath_pair.second);
226 }
227}
228
229/** A structure for PSBTs which contain per-input information */
230struct PSBTInput

Callers 3

SerializeMethod · 0.85
SerializeMethod · 0.85
FUZZ_TARGET_INITFunction · 0.85

Calls 4

SerializeToVectorFunction · 0.85
SerializeHDKeypathFunction · 0.85
SpanFunction · 0.70
IsValidMethod · 0.45

Tested by 1

FUZZ_TARGET_INITFunction · 0.68