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

Method MuSigPubkeyProvider

src/script/descriptor.cpp:635–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633
634public:
635 MuSigPubkeyProvider(
636 uint32_t exp_index,
637 std::vector<std::unique_ptr<PubkeyProvider>> providers,
638 KeyPath path,
639 DeriveType derive
640 )
641 : PubkeyProvider(exp_index),
642 m_participants(std::move(providers)),
643 m_path(std::move(path)),
644 m_derive(derive),
645 m_ranged_participants(std::any_of(m_participants.begin(), m_participants.end(), [](const auto& pubkey) { return pubkey->IsRange(); }))
646 {
647 if (!Assume(!(m_ranged_participants && IsRangedDerivation()))) {
648 throw std::runtime_error("musig(): Cannot have both ranged participants and ranged derivation");
649 }
650 if (!Assume(m_derive != DeriveType::HARDENED_RANGED)) {
651 throw std::runtime_error("musig(): Cannot have hardened derivation");
652 }
653 }
654
655 std::optional<CPubKey> GetPubKey(int pos, const SigningProvider& arg, FlatSigningProvider& out, const DescriptorCache* read_cache = nullptr, DescriptorCache* write_cache = nullptr) const override
656 {

Callers

nothing calls this directly

Calls 4

any_ofClass · 0.85
beginMethod · 0.45
endMethod · 0.45
IsRangeMethod · 0.45

Tested by

no test coverage detected