| 846 | std::vector<int> m_depths; |
| 847 | protected: |
| 848 | std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript> scripts, FlatSigningProvider& out) const override |
| 849 | { |
| 850 | TaprootBuilder builder; |
| 851 | assert(m_depths.size() == scripts.size()); |
| 852 | for (size_t pos = 0; pos < m_depths.size(); ++pos) { |
| 853 | builder.Add(m_depths[pos], scripts[pos], TAPROOT_LEAF_TAPSCRIPT); |
| 854 | } |
| 855 | if (!builder.IsComplete()) return {}; |
| 856 | assert(keys.size() == 1); |
| 857 | XOnlyPubKey xpk(keys[0]); |
| 858 | if (!xpk.IsFullyValid()) return {}; |
| 859 | builder.Finalize(xpk); |
| 860 | WitnessV1Taproot output = builder.GetOutput(); |
| 861 | out.tr_spenddata[output].Merge(builder.GetSpendData()); |
| 862 | out.pubkeys.emplace(keys[0].GetID(), keys[0]); |
| 863 | return Vector(GetScriptForDestination(output)); |
| 864 | } |
| 865 | bool ToStringSubScriptHelper(const SigningProvider* arg, std::string& ret, const StringType type, const DescriptorCache* cache = nullptr) const override |
| 866 | { |
| 867 | if (m_depths.empty()) return true; |
nothing calls this directly
no test coverage detected