Skip to main content

decoderawtransaction RPC Method

Decodes the raw transaction and provides chain information in the form of JSON.

Updated on
Feb 04, 2026

Parameters

hexstring
string
REQUIRED

The raw transaction hex string to decode

iswitness
boolean

Optional boolean flag indicating whether the transaction hex is a serialized witness transaction (default: false)

Returns

result
object

The decoded transaction object

txid
string

The transaction id

hash
string

The transaction hash (differs from txid for witness transactions)

version
integer

The transaction version

size
integer

The transaction size in bytes

locktime
integer

The transaction locktime

vin
array

A JSON array. Each element in the array serves as a transaction's input vector (vin).

txid
string

The transaction id

vout
integer

The output number

scriptSig
object

The script's signature

asm
string

The script's public key in the form of a string

hex
string

The hex-encoded signature script

sequence
integer

The script sequence number

vout
array

A JSON array containing tx information

value
number

The value in BTC

n
integer

The output index

scriptPubKey
object

A JSON object containing information about the PubKey script

asm
string

The script public key in the form of string

reqSigs
integer

Number of required signatures

hex
string

The hex of the script's public key in string format

addresses
array

Array of Bitcoin Cash addresses

type
string

The type of script, e.g. pubkeyhash, multisig

error
object | null

JSON-RPC error object when the request failed, or null on success

id
integer

The JSON-RPC request identifier

Request
Response
1
{
2
"result": {
3
"txid": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
4
"hash": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
5
"version": 1,
6
"size": 225,
7
"locktime": 0,
8
"vin": [
9
{
10
"txid": "e66c029a755d326f14cc32f485ea43e705ef59ed4a8061e8f47e681fbdefefea",
11
"vout": 1,
12
"scriptSig": {
13
"asm": "30440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656[ALL] 03142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab",
14
"hex": "4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab"
15
},
16
"sequence": 4294967295
17
}
18
],
19
"vout": [
20
{
21
"value": 0.4,
22
"n": 0,
23
"scriptPubKey": {
24
"asm": "OP_DUP OP_HASH160 fe7e0711287688b33b9a5c239336c4700db34e63 OP_EQUALVERIFY OP_CHECKSIG",
25
"hex": "76a914fe7e0711287688b33b9a5c239336c4700db34e6388ac",
26
"reqSigs": 1,
27
"type": "pubkeyhash",
28
"addresses": [
29
"bitcoincash:qrl8upc39pmg3vemnfwz8yekc3cqmv6wvvaw90pzy2"
30
]
31
}
32
},
33
{
34
"value": 48.9998184,
35
"n": 1,
36
"scriptPubKey": {
37
"asm": "OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG",
38
"hex": "76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac",
39
"reqSigs": 1,
40
"type": "pubkeyhash",
41
"addresses": [
42
"bitcoincash:qzhe9tvcclmh2k0evscdlme2dqzms7eylqhcjc69c7"
43
]
44
}
45
}
46
]
47
},
48
"error": null,
49
"id": 1
50
}
1
{
2
"result": {
3
"txid": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
4
"hash": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
5
"version": 1,
6
"size": 225,
7
"locktime": 0,
8
"vin": [
9
{
10
"txid": "e66c029a755d326f14cc32f485ea43e705ef59ed4a8061e8f47e681fbdefefea",
11
"vout": 1,
12
"scriptSig": {
13
"asm": "30440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656[ALL] 03142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab",
14
"hex": "4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab"
15
},
16
"sequence": 4294967295
17
}
18
],
19
"vout": [
20
{
21
"value": 0.4,
22
"n": 0,
23
"scriptPubKey": {
24
"asm": "OP_DUP OP_HASH160 fe7e0711287688b33b9a5c239336c4700db34e63 OP_EQUALVERIFY OP_CHECKSIG",
25
"hex": "76a914fe7e0711287688b33b9a5c239336c4700db34e6388ac",
26
"reqSigs": 1,
27
"type": "pubkeyhash",
28
"addresses": [
29
"bitcoincash:qrl8upc39pmg3vemnfwz8yekc3cqmv6wvvaw90pzy2"
30
]
31
}
32
},
33
{
34
"value": 48.9998184,
35
"n": 1,
36
"scriptPubKey": {
37
"asm": "OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG",
38
"hex": "76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac",
39
"reqSigs": 1,
40
"type": "pubkeyhash",
41
"addresses": [
42
"bitcoincash:qzhe9tvcclmh2k0evscdlme2dqzms7eylqhcjc69c7"
43
]
44
}
45
}
46
]
47
},
48
"error": null,
49
"id": 1
50
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free