diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -3,3 +3,13 @@ This release includes the following features and fixes: + +Updated RPCs +------------ + +The `utxoupdatepsbt` RPC method has been updated to take a `descriptors` +argument. When provided, input and output scripts and keys will be filled in +when known. + +See the RPC help text for full details. + diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -29,6 +29,7 @@ {"mockscheduler", 0, "delta_time"}, {"generate", 0, "nblocks"}, {"generate", 1, "maxtries"}, + {"utxoupdatepsbt", 1, "descriptors"}, {"generatetoaddress", 0, "nblocks"}, {"generatetoaddress", 2, "maxtries"}, {"getnetworkhashps", 0, "nblocks"}, diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1957,7 +1957,7 @@ { "rawtransactions", "finalizepsbt", finalizepsbt, {"psbt", "extract"} }, { "rawtransactions", "createpsbt", createpsbt, {"inputs","outputs","locktime"} }, { "rawtransactions", "converttopsbt", converttopsbt, {"hexstring","permitsigdata"} }, - { "rawtransactions", "utxoupdatepsbt", utxoupdatepsbt, {"psbt"} }, + { "rawtransactions", "utxoupdatepsbt", utxoupdatepsbt, {"psbt", "descriptors"} }, { "rawtransactions", "joinpsbts", joinpsbts, {"txs"} }, { "rawtransactions", "analyzepsbt", analyzepsbt, {"psbt"} }, { "blockchain", "gettxoutproof", gettxoutproof, {"txids", "blockhash"} }, diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -304,7 +304,7 @@ # Try again, now while providing descriptors descs = [self.nodes[1].getaddressinfo(addr)['desc'] for addr in [ addr1, addr2, addr3]] - updated = self.nodes[1].utxoupdatepsbt(psbt, descs) + updated = self.nodes[1].utxoupdatepsbt(psbt=psbt, descriptors=descs) decoded = self.nodes[1].decodepsbt(updated) # we do not have 'witness UTXO' test_psbt_input_keys(decoded['inputs'][1], [])