signrawtransaction - Dogecoin
Example code for the signrawtransaction JSON-RPC method. Complete guide on how to use signrawtransaction JSON-RPC in GetBlock Web3 documentation.
This method signs inputs for a raw transaction (serialized, hex-encoded).
Parameters
hexstring
string
Yes
The hex-encoded raw transaction.
prevtxs
array
No
Array of previous transaction outputs.
privkeys
array
No
Array of private keys for signing.
sighashtype
string
No
Signature hash type (default: ALL).
Previous Transaction Object Structure
{
"txid": "transaction_id",
"vout": 0,
"scriptPubKey": "hex_script",
"redeemScript": "hex_script"
}Request
Response
Response Parameters
hex
string
The signed raw transaction (hex-encoded).
complete
boolean
True if transaction has all required signatures.
Use Case
The signrawtransaction method is essential for:
Signing transactions before broadcast
Multi-signature transaction workflows
Offline transaction signing
Hardware wallet integration
Cold storage operations
Error Handling
-22
TX decode failed
Invalid raw transaction hex.
-8
Invalid parameter
Invalid prevtxs or privkeys format.
403
Forbidden
Missing or invalid ACCESS-TOKEN.
Last updated
Was this helpful?