signrawtransactionwithwallet (28.0.0 RPC) blockchain dumptxoutset getbestblockhash getblock getblockchaininfo getblockcount getblockfilter getblockfrompeer getblockhash getblockheader getblockstats getchainstates getchaintips getchaintxstats getdeploymentinfo getdifficulty getmempoolancestors getmempooldescendants getmempoolentry getmempoolinfo getrawmempool gettxout gettxoutproof gettxoutsetinfo gettxspendingprevout importmempool loadtxoutset preciousblock pruneblockchain savemempool scanblocks scantxoutset verifychain verifytxoutproof control getmemoryinfo getrpcinfo help logging stop uptime mining getblocktemplate getmininginfo getnetworkhashps getprioritisedtransactions prioritisetransaction submitblock submitheader network addnode clearbanned disconnectnode getaddednodeinfo getaddrmaninfo getconnectioncount getnettotals getnetworkinfo getnodeaddresses getpeerinfo listbanned ping setban setnetworkactive rawtransactions analyzepsbt combinepsbt combinerawtransaction converttopsbt createpsbt createrawtransaction decodepsbt decoderawtransaction decodescript descriptorprocesspsbt finalizepsbt fundrawtransaction getrawtransaction joinpsbts sendrawtransaction signrawtransactionwithkey submitpackage testmempoolaccept utxoupdatepsbt signer enumeratesigners util createmultisig deriveaddresses estimatesmartfee getdescriptorinfo getindexinfo signmessagewithprivkey validateaddress verifymessage wallet abandontransaction abortrescan addmultisigaddress backupwallet bumpfee createwallet createwalletdescriptor dumpprivkey dumpwallet encryptwallet getaddressesbylabel getaddressinfo getbalance getbalances gethdkeys getnewaddress getrawchangeaddress getreceivedbyaddress getreceivedbylabel gettransaction getunconfirmedbalance getwalletinfo importaddress importdescriptors importmulti importprivkey importprunedfunds importpubkey importwallet keypoolrefill listaddressgroupings listdescriptors listlabels listlockunspent listreceivedbyaddress listreceivedbylabel listsinceblock listtransactions listunspent listwalletdir listwallets loadwallet lockunspent migratewallet newkeypool psbtbumpfee removeprunedfunds rescanblockchain restorewallet send sendall sendmany sendtoaddress sethdseed setlabel settxfee setwalletflag signmessage signrawtransactionwithwallet simulaterawtransaction unloadwallet upgradewallet walletcreatefundedpsbt walletdisplayaddress walletlock walletpassphrase walletpassphrasechange walletprocesspsbt zmq getzmqnotifications signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted. Arguments: 1. hexstring (string, required) The transaction hex string 2. prevtxs (json array, optional) The previous dependent transaction outputs [ { (json object) "txid": "hex", (string, required) The transaction id "vout": n, (numeric, required) The output number "scriptPubKey": "hex", (string, required) The output script "redeemScript": "hex", (string, optional) (required for P2SH) redeem script "witnessScript": "hex", (string, optional) (required for P2WSH or P2SH-P2WSH) witness script "amount": amount, (numeric or string, optional) (required for Segwit inputs) the amount spent }, ... ] 3. sighashtype (string, optional, default="DEFAULT for Taproot, ALL otherwise") The signature hash type. Must be one of "DEFAULT" "ALL" "NONE" "SINGLE" "ALL|ANYONECANPAY" "NONE|ANYONECANPAY" "SINGLE|ANYONECANPAY" Result: { (json object) "hex" : "hex", (string) The hex-encoded raw transaction with signature(s) "complete" : true|false, (boolean) If the transaction has a complete set of signatures "errors" : [ (json array, optional) Script verification errors (if there are any) { (json object) "txid" : "hex", (string) The hash of the referenced, previous transaction "vout" : n, (numeric) The index of the output to spent and used as input "witness" : [ (json array) "hex", (string) ... ], "scriptSig" : "hex", (string) The hex-encoded signature script "sequence" : n, (numeric) Script sequence number "error" : "str" (string) Verification or signing error related to the input }, ... ] } Examples: > bitcoin-cli signrawtransactionwithwallet "myhex" > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "signrawtransactionwithwallet", "params": ["myhex"]}' -H 'content-type: application/json' http://127.0.0.1:8332/