| 271 | } |
| 272 | |
| 273 | bool Expand(int pos, const SigningProvider& arg, std::vector<CScript>& output_scripts, FlatSigningProvider& out) const override |
| 274 | { |
| 275 | std::vector<CPubKey> pubkeys; |
| 276 | pubkeys.reserve(m_providers.size()); |
| 277 | for (const auto& p : m_providers) { |
| 278 | CPubKey key; |
| 279 | if (!p->GetPubKey(pos, arg, key)) return false; |
| 280 | pubkeys.push_back(key); |
| 281 | } |
| 282 | for (const CPubKey& key : pubkeys) { |
| 283 | out.pubkeys.emplace(key.GetID(), std::move(key)); |
| 284 | } |
| 285 | output_scripts = std::vector<CScript>{GetScriptForMultisig(m_threshold, pubkeys)}; |
| 286 | return true; |
| 287 | } |
| 288 | }; |
| 289 | |
| 290 | /** A parsed sh(S) or wsh(S) descriptor. */ |