How to create unsigned tx in a watch-only wallet?
Hi it's moral_agent from the reddit post.
https://www.reddit.com/r/Bitcoin/comments/ir308h/watch_only_balance_not_spendable_in_bitcoin_core/g5gg33f/
I do not know whether this will help you or not but I will tell you what helped me and what I think I was doing wrong.
In order to create a PSBT that spends a watch-only output, it is not always sufficient to import the address of the output.
For a pay-to-script-hash address you will also need to import the script of the output. This makes sense, since creating a valid P2SH transaction requires that you include (and satisfy) the script. Your cold-signing wallet is only expected to supply the signature, not the script, so the PSBT needs to contain that information, so your hot computer must have it to create a PSBT.
I was able to import the required script by doing importmulti. I actually didn't import the script, I imported the script descriptor sort of like this:
importmulti &quot;[{ &quot;desc&quot;: &quot;sh(multi(2,BLAH-BLAH-HEX))&quot; }]
I didn't check that syntax for bugs so you're on your own there. Importmulti takes a bunch of args, most of which are optional.
I got the output descriptor for the address I was trying to spend from by runnning getaddressinfo on the address on the computer where the address was originally generated, and which therefore knew what the script was.
Hope that helps. Let me know if you have success!