decoderawtransaction RPC Method
Parameters
hexstring
string
REQUIRED
Loading...
iswitness
boolean
Loading...
Returns
result
object
Loading...
txid
string
Loading...
hash
string
Loading...
version
integer
Loading...
size
integer
Loading...
locktime
integer
Loading...
vin
array
Loading...
txid
string
Loading...
vout
integer
Loading...
scriptSig
object
Loading...
asm
string
Loading...
hex
string
Loading...
sequence
integer
Loading...
vout
array
Loading...
value
number
Loading...
n
integer
Loading...
scriptPubKey
object
Loading...
asm
string
Loading...
reqSigs
integer
Loading...
hex
string
Loading...
addresses
array
Loading...
type
string
Loading...
error
string
Loading...
id
integer
Loading...
Request
curl https://docs-demo.bch-mainnet.quiknode.pro/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"id": 1, "jsonrpc": "2.0", "method": "decoderawtransaction", "params": ["0100000001eaefefbd1f687ef4e861804aed59ef05e743ea85f432cc146f325d759a026ce6010000006a4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057abffffffff02005a6202000000001976a914fe7e0711287688b33b9a5c239336c4700db34e6388ac10ca0f24010000001976a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac00000000"]}'
var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); var raw = JSON.stringify({ "id": 1, "jsonrpc": "2.0", "method": "decoderawtransaction", "params": [ "0100000001eaefefbd1f687ef4e861804aed59ef05e743ea85f432cc146f325d759a026ce6010000006a4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057abffffffff02005a6202000000001976a914fe7e0711287688b33b9a5c239336c4700db34e6388ac10ca0f24010000001976a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac00000000" ] }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch("https://docs-demo.bch-mainnet.quiknode.pro/", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
import requests import json url = "https://docs-demo.bch-mainnet.quiknode.pro/" payload = json.dumps({ "id": 1, "jsonrpc": "2.0", "method": "decoderawtransaction", "params": [ "0100000001eaefefbd1f687ef4e861804aed59ef05e743ea85f432cc146f325d759a026ce6010000006a4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057abffffffff02005a6202000000001976a914fe7e0711287688b33b9a5c239336c4700db34e6388ac10ca0f24010000001976a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac00000000" ] }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
require "uri" require "json" require "net/http" url = URI("https://docs-demo.bch-mainnet.quiknode.pro/") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = "application/json" request.body = JSON.dump({ "id": 1, "jsonrpc": "2.0", "method": "decoderawtransaction", "params": [ "0100000001eaefefbd1f687ef4e861804aed59ef05e743ea85f432cc146f325d759a026ce6010000006a4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057abffffffff02005a6202000000001976a914fe7e0711287688b33b9a5c239336c4700db34e6388ac10ca0f24010000001976a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac00000000" ] }) response = https.request(request) puts response.read_body
Response
{ "result": { "txid": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8", "hash": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8", "version": 1, "size": 225, "locktime": 0, "vin": [ { "txid": "e66c029a755d326f14cc32f485ea43e705ef59ed4a8061e8f47e681fbdefefea", "vout": 1, "scriptSig": { "asm": "30440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656[ALL] 03142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab", "hex": "4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab" }, "sequence": 4294967295 } ], "vout": [ { "value": 0.4, "n": 0, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 fe7e0711287688b33b9a5c239336c4700db34e63 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914fe7e0711287688b33b9a5c239336c4700db34e6388ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "bitcoincash:qrl8upc39pmg3vemnfwz8yekc3cqmv6wvvaw90pzy2" ] } }, { "value": 48.9998184, "n": 1, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "bitcoincash:qzhe9tvcclmh2k0evscdlme2dqzms7eylqhcjc69c7" ] } } ] }, "error": null, "id": 1 }
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free