Issue Details
- Number
- 17619
- Title
- rfc: store PSBTs in wallet
- Description
- Now that #16944 has landed the GUI can create a PSBT and put it on the clipboard. The user can then use this with e.g. [HWI](https://github.com/bitcoin-core/HWI):
```
hwi --fingerprint=00000000 signtx
```
But if something goes wrong and clipboard loses the PSBT, they have to start over.
#17509 adds support saving the PSBT to disk. Currently it only uses binary format, but it's easy to add base64 too, as @gwillen did in #16954. Problem then is: if the user chooses the wrong format, they have to create the transaction all over again.
I propose that we store PSBTs in the wallet. They would show up in the transaction tab with some icon to indicate that they're incomplete. The user can copy them to clipboard or save to disk whenever they like. It should also be possible to delete them.
When a user loads a PSBT (e.g. via #17509) we should match it against what's in the wallet, and automagically join it. When a PSBT is complete it can be broadcast, deleted from the wallet, replaced by the regular transaction. All these steps should probably prompt for permission.
Slightly more advanced: PSBTs could keep coins locked by default (which incidentally creates a convenient way to persist locked coins, though there's other was to do that).
This is probably most useful for the GUI, but we could also support this with a few new RPC methods like `listwalletpsbts` (bash autocompletion ftw #17289). This also saves applications like [Specter](https://github.com/cryptoadvance/specter-desktop) (@stepansnigirev) and [Junction](https://github.com/justinmoon/junction) (@justinmoon) from having to build their own pseudo-wallet, when dealing with air gapped wallets.
- URL
-
https://github.com/bitcoin/bitcoin/issue/17619
- Closed by
-
Back to List