aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/client.cpp
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2023-05-22 11:18:41 -0400
committerAndrew Chow <github@achow101.com>2023-05-22 11:28:11 -0400
commit22139f6e83a2bedd2dad9f280567d2c76c54252f (patch)
treeeb41a79eecb3d3c9d6508f4cae7c57958ad9e0c9 /src/rpc/client.cpp
parent456701420b157f4c02592a2aea6fc32b1620c56a (diff)
parent1bce12acd3e271a7c88d9400b4e3a5645bc8a911 (diff)
downloadbitcoin-22139f6e83a2bedd2dad9f280567d2c76c54252f.tar.xz
Merge bitcoin/bitcoin#25796: rpc: add `descriptorprocesspsbt` rpc
1bce12acd3e271a7c88d9400b4e3a5645bc8a911 test: add test for `descriptorprocesspsbt` RPC (ishaanam) fb2a3a70e860aa87fb7a21f6554ed9f3ce901e2d rpc: add descriptorprocesspsbt rpc (ishaanam) Pull request description: This PR implements an RPC called `descriptorprocesspsbt`. This RPC is based off of `walletprocesspsbt`, but instead of interacting with the wallet to update, sign and finalize a psbt, it instead accepts an array of output descriptors and uses that information along with information from the mempool, txindex, and the utxo set to do so. `utxoupdatepsbt` also updates a psbt in this manner, but doesn't sign or finalize it. Because of this overlap, a helper function that is added in this PR is called by both `utxoupdatepsbt` and `descriptorprocesspsbt`. Whether or not the helper function signs a psbt is dictated by if the HidingSigningProvider passed to it contains any private information. There is also a test added in this PR for this new RPC that uses p2wsh, p2wpkh, and legacy outputs. Edit: see https://github.com/bitcoin/bitcoin/pull/25796#issuecomment-1228830963 ACKs for top commit: achow101: re-ACK 1bce12acd3e271a7c88d9400b4e3a5645bc8a911 instagibbs: reACK https://github.com/bitcoin/bitcoin/pull/25796/commits/1bce12acd3e271a7c88d9400b4e3a5645bc8a911 Tree-SHA512: e1d0334739943e71f2ee68b4db7637ebe725da62e7aa4be071f71c7196d2a5970a31ece96d91e372d34454cde8509e95ab0eebd2c8edb94f7d5a781a84f8fc5d
Diffstat (limited to 'src/rpc/client.cpp')
-rw-r--r--src/rpc/client.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp
index f3c19003ff..d08e2d55d1 100644
--- a/src/rpc/client.cpp
+++ b/src/rpc/client.cpp
@@ -133,6 +133,9 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "walletprocesspsbt", 1, "sign" },
{ "walletprocesspsbt", 3, "bip32derivs" },
{ "walletprocesspsbt", 4, "finalize" },
+ { "descriptorprocesspsbt", 1, "descriptors"},
+ { "descriptorprocesspsbt", 3, "bip32derivs" },
+ { "descriptorprocesspsbt", 4, "finalize" },
{ "createpsbt", 0, "inputs" },
{ "createpsbt", 1, "outputs" },
{ "createpsbt", 2, "locktime" },