Similar to what #16373 did for bumpfee
, this PR lets sendmany
and sendtoaddress
return a PSBT for wallets without private keys:
0Result:
1"txid" (string) The transaction id.
2{
3 "psbt": "psbt" (string) The base64-encoded unsigned PSBT of the new transaction. Only returned when wallet private keys are disabled.
4}
I consolidated code between these two RPC calls, since sendtoaddress
is essentially sendmany
with 1 destination. Unless I overlooked something, the only behaviour change is that some sendtoaddress
error codes changed from -4
to -6
. The release note mentions this.
The PSBT code is prepared for hardware wallet support (e.g. #16546). It checks if the PSBT is complete, which currently can’t happen with watch-only wallets.