bitcoind.app
CommandsGuidesContact ↗
Home/Rawtransactions/signrawtransactionwithkey
Rawtransactions

signrawtransactionwithkey

Sign inputs for raw transaction (serialized, hex-encoded) using given private keys.

Parameters

hexstringstringREQUIRED
The transaction hex string
privkeysarrayREQUIRED
Array of base58-encoded private keys
prevtxsarrayoptional
Array of previous dependent transaction outputs
sighashtypestringoptional
Signature hash type. Default: "ALL"

Returns

objectSigning result with hex and complete fields

Code Examples

curl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"signrawtransactionwithkey","params":["hex",["privkey"]]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/

Example Response

{
  "hex": "0200000001...",
  "complete": true
}
← Previous
sendrawtransaction
Next →
testmempoolaccept

More Rawtransactions Commands

analyzepsbtcombinepsbtcombinerawtransactionconverttopsbtcreatepsbtcreaterawtransaction

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗