MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Serialize

Method Serialize

src/script/sign.h:444–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442
443 template <typename Stream>
444 inline void Serialize(Stream& s) const {
445 // Write the redeem script
446 if (!redeem_script.empty()) {
447 SerializeToVector(s, PSBT_OUT_REDEEMSCRIPT);
448 s << redeem_script;
449 }
450
451 // Write the witness script
452 if (!witness_script.empty()) {
453 SerializeToVector(s, PSBT_OUT_WITNESSSCRIPT);
454 s << witness_script;
455 }
456
457 // Write any hd keypaths
458 SerializeHDKeypaths(s, hd_keypaths, PSBT_OUT_BIP32_DERIVATION);
459
460 // Write unknown things
461 for (auto& entry : unknown) {
462 s << entry.first;
463 s << entry.second;
464 }
465
466 s << PSBT_SEPARATOR;
467 }
468
469
470 template <typename Stream>

Callers

nothing calls this directly

Calls 3

SerializeToVectorFunction · 0.85
SerializeHDKeypathsFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected