| 1503 | std::vector<int> m_depths; |
| 1504 | protected: |
| 1505 | std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, std::span<const CScript> scripts, FlatSigningProvider& out) const override |
| 1506 | { |
| 1507 | TaprootBuilder builder; |
| 1508 | assert(m_depths.size() == scripts.size()); |
| 1509 | for (size_t pos = 0; pos < m_depths.size(); ++pos) { |
| 1510 | builder.Add(m_depths[pos], scripts[pos], TAPROOT_LEAF_TAPSCRIPT); |
| 1511 | } |
| 1512 | if (!builder.IsComplete()) return {}; |
| 1513 | assert(keys.size() == 1); |
| 1514 | XOnlyPubKey xpk(keys[0]); |
| 1515 | if (!xpk.IsFullyValid()) return {}; |
| 1516 | builder.Finalize(xpk); |
| 1517 | WitnessV1Taproot output = builder.GetOutput(); |
| 1518 | out.tr_trees[output] = builder; |
| 1519 | return Vector(GetScriptForDestination(output)); |
| 1520 | } |
| 1521 | bool ToStringSubScriptHelper(const SigningProvider* arg, std::string& ret, const StringType type, const DescriptorCache* cache = nullptr) const override |
| 1522 | { |
| 1523 | if (m_depths.empty()) { |
nothing calls this directly
no test coverage detected