decoderawtransaction

The decoderawtransaction RPC method decodes a serialized (hex-encoded) raw transaction and displays its information in a human-readable format. This method is useful for inspecting raw transactions before broadcasting them to the Bitcoin network or for debugging purposes.

Parameters

parameter
type
description
hex_string
string (required)
The serialized raw transaction in hex format.
Return Object
parameter
type
description
txid
string
The transaction ID.
hash
string
The transaction hash.
version
numeric
The transaction version.
size
numeric
The transaction size in bytes.
vsize
numeric
The virtual transaction size in bytes.
weight
numeric
The transaction weight.
locktime
numeric
The lock time for the transaction.
vin
array
An array of objects, each representing an input of the transaction.
vin.txid
string
The transaction ID of the previous transaction output to spend.
vin.vout
numeric
The index of the output to spend from the previous transaction.
vin.scriptSig
object
The script used to redeem the previous transaction output.
vin.scriptSig.asm
string
The assembly representation of the script.
vin.scriptSig.hex
string
The hex-encoded script.
vin.sequence
numeric
The sequence number.
vout
array
An array of objects, each representing an output of the transaction.
vout.value
numeric
The amount sent to the output.
vout.n
numeric
The index of the output.
vout.scriptPubKey
object
The script used to lock the output.
vout.scriptPubKey.asm
string
The assembly representation of the script.
vout.scriptPubKey.hex
string
The hex-encoded script.
vout.scriptPubKey.reqSigs
numeric
The required number of signatures.
vout.scriptPubKey.type
string
The type of the script (e.g., 'pubkeyhash').
vout.scriptPubKey.addresses
array
An array of Bitcoin addresses associated with the output.
JSON Examples
JSON Examples

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?