| 1575 | } |
| 1576 | |
| 1577 | std::unique_ptr<DescriptorImpl> Clone() const override |
| 1578 | { |
| 1579 | std::vector<std::unique_ptr<DescriptorImpl>> subdescs; |
| 1580 | subdescs.reserve(m_subdescriptor_args.size()); |
| 1581 | std::transform(m_subdescriptor_args.begin(), m_subdescriptor_args.end(), std::back_inserter(subdescs), [](const std::unique_ptr<DescriptorImpl>& d) { return d->Clone(); }); |
| 1582 | return std::make_unique<TRDescriptor>(m_pubkey_args.at(0)->Clone(), std::move(subdescs), m_depths); |
| 1583 | } |
| 1584 | }; |
| 1585 | |
| 1586 | /* We instantiate Miniscript here with a simple integer as key type. |