[spesmilo/electrum] Implement BIP174 for serialising partial and unsigned transactions (#4615)

If it helps, the Coldcard wallet plugin already can make a PSBT: see [function `built_psbt()`](https://github.com/Coldcard/electrum/blob/0c0fbdc72731dbae254b83f6886475533a53a149/electrum/plugins/coldcard/coldcard.py#L368) in the PR .

We do somewhat cheat because we didn’t do any merging or combining, and just assume the result is a finalized transaction coming back from the Coldcard. (That’s a safe assumption given the role of Coldcard in this case as a hardware keystore and signer.) We didn’t need a PSBT parser.

Another limitation is the «Save as PSBT» button on the transaction dialog, appears only if the transaction is associated with a Coldcard based wallet. It should be possible for Electrum to offer PSBT output there for almost any unsigned transaction.

Naturally as PSBT support matures in Electrum, we will use those features as much as possible for this plugin. Always happy to delete code!

PS: You may find this debug tool, [`psbt_dump`](https://github.com/peter-conalgo/psbt_dump), to be useful, and @achow101 has been really helpful as well.

Добавить комментарий