dcr

Decred (DCR)

Method: POST decoderawtransaction

dropdown
POST

decoderawtransaction

Returns a JSON object representing the provided serialized, hex-encoded transaction.

Parameters

data - string

serialized, hex-encoded transaction.

Request

curl --location --request POST 'https://dcr.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "decoderawtransaction",
"params": ["03000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff02000000000000000000000e6a0cc1ff0800b3e0fccf37a786b7c6ed842b0000000000001976a91469ed0fbcc41348fef05385091d9d4a306387b2bd88ac00000000000000000170cf592b0000000000000000ffffffff0800002f646372642f"],
"id": "getblock.io"}'


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "expiry": 0,
        "locktime": 0,
        "txid": "a2dfb8de368fafb349f9b37f7f59065860488c394a522ffb7fec4e3f9a10e08e",
        "version": 3,
        "vin": [
            {
                "amountin": 7.27306096,
                "blockheight": 0,
                "blockindex": 4294967295,
                "coinbase": "00002f646372642f",
                "sequence": 4294967295
            }
        ],
        "vout": [
            {
                "n": 0,
                "scriptPubKey": {
                    "asm": "OP_RETURN c1ff0800b3e0fccf37a786b7",
                    "hex": "6a0cc1ff0800b3e0fccf37a786b7",
                    "type": "nulldata"
                },
                "value": 0,
                "version": 0
            },
            {
                "n": 1,
                "scriptPubKey": {
                    "addresses": [
                        "DsaczRtjC31N6XVV69qcBoyR2BEEmjRDay3"
                    ],
                    "asm": "OP_DUP OP_HASH160 69ed0fbcc41348fef05385091d9d4a306387b2bd OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a91469ed0fbcc41348fef05385091d9d4a306387b2bd88ac",
                    "reqSigs": 1,
                    "type": "pubkeyhash"
                },
                "value": 7.3013191,
                "version": 0
            }
        ]
    }
}