| 203 | // Serialize HD keypaths to a stream from a map |
| 204 | template<typename Stream> |
| 205 | void 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 |
| 217 | template<typename Stream> |
no test coverage detected