| 809 | } |
| 810 | |
| 811 | bool DecodeRawPSBT(PartiallySignedTransaction& psbt, const std::string& tx_data, std::string& error) |
| 812 | { |
| 813 | CDataStream ss_data(MakeByteSpan(tx_data), SER_NETWORK, PROTOCOL_VERSION); |
| 814 | try { |
| 815 | ss_data >> psbt; |
| 816 | if (!ss_data.empty()) { |
| 817 | error = "extra data after PSBT"; |
| 818 | return false; |
| 819 | } |
| 820 | } catch (const std::exception& e) { |
| 821 | error = e.what(); |
| 822 | return false; |
| 823 | } |
| 824 | return true; |
| 825 | } |
| 826 | |
| 827 | uint32_t PartiallySignedTransaction::GetVersion() const |
| 828 | { |