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

Method ToPrivateString

src/script/descriptor.cpp:737–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735 return out;
736 }
737 bool ToPrivateString(const SigningProvider& arg, std::string& out) const override
738 {
739 bool any_privkeys = false;
740 out = "musig(";
741 for (size_t i = 0; i < m_participants.size(); ++i) {
742 const auto& pubkey = m_participants.at(i);
743 if (i) out += ",";
744 std::string tmp;
745 if (pubkey->ToPrivateString(arg, tmp)) {
746 any_privkeys = true;
747 }
748 out += tmp;
749 }
750 out += ")";
751 out += FormatHDKeypath(m_path);
752 if (IsRangedDerivation()) {
753 out += "/*";
754 }
755 return any_privkeys;
756 }
757 bool ToNormalizedString(const SigningProvider& arg, std::string& out, const DescriptorCache* cache = nullptr) const override
758 {
759 out = "musig(";

Callers

nothing calls this directly

Calls 4

FormatHDKeypathFunction · 0.85
sizeMethod · 0.45
atMethod · 0.45
ToPrivateStringMethod · 0.45

Tested by

no test coverage detected