walletprocesspsbt
walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs finalize ) Update a PSBT with input information from our wallet and then sign inputs that we can sign for. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted. Arguments: 1. psbt (string, required) The transaction base64 string 2. sign (boolean, optional, default=true) Also sign the transaction when updating (requires wallet to be unlocked) 3. sighashtype (string, optional, default="DEFAULT for Taproot, ALL otherwise") The signature hash type to sign with if not specified by the PSBT. Must be one of "DEFAULT" "ALL" "NONE" "SINGLE" "ALL|ANYONECANPAY" "NONE|ANYONECANPAY" "SINGLE|ANYONECANPAY" 4. bip32derivs (boolean, optional, default=true) Include BIP 32 derivation paths for public keys if we know them 5. finalize (boolean, optional, default=true) Also finalize inputs if possible Result: { (json object) "psbt" : "str", (string) The base64-encoded partially signed transaction "complete" : true|false, (boolean) If the transaction has a complete set of signatures "hex" : "hex" (string, optional) The hex-encoded network transaction if complete } Examples: > bitcoin-cli walletprocesspsbt "psbt"
Signature
walletprocesspsbt(psbt: string, sign?: boolean, sighashtype?: string, bip32derivs?: boolean, finalize?: boolean) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"walletprocesspsbt","params":["\"<psbt>\"",true,"DEFAULT for Taproot",true,true]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| psbt | string | yes | The transaction base64 string |
| sign | boolean | — | Also sign the transaction when updating (requires wallet to be unlocked) |
| sighashtype | string | — | The signature hash type to sign with if not specified by the PSBT. Must be one of "DEFAULT" "ALL" "NONE" "SINGLE" "ALL|ANYONECANPAY" "NONE|ANYONECANPAY" "SINGLE|ANYONECANPAY" |
| bip32derivs | boolean | — | Include BIP 32 derivation paths for public keys if we know them |
| finalize | boolean | — | Also finalize inputs if possible |
Result
Type: any
{ (json object) "psbt" : "str", (string) The base64-encoded partially signed transaction "complete" : true|false, (boolean) If the transaction has a complete set of signatures "hex" : "hex" (string, optional) The hex-encoded network transaction if complete }
Source: services/core-node/bcore/src/wallet/rpc/spend.cpp:1842
C++ symbol: walletprocesspsbt