| 765 | } |
| 766 | |
| 767 | TransactionError CombinePSBTs(PartiallySignedTransaction& out, const std::vector<PartiallySignedTransaction>& psbtxs) |
| 768 | { |
| 769 | out = psbtxs[0]; // Copy the first one |
| 770 | |
| 771 | // Merge |
| 772 | for (auto it = std::next(psbtxs.begin()); it != psbtxs.end(); ++it) { |
| 773 | if (!out.Merge(*it)) { |
| 774 | return TransactionError::PSBT_MISMATCH; |
| 775 | } |
| 776 | } |
| 777 | return TransactionError::OK; |
| 778 | } |
| 779 | |
| 780 | std::string PSBTRoleName(PSBTRole role) { |
| 781 | switch (role) { |