decoderawtransaction
Example Request and Result for decoderawtransaction method
In this section, we provide an illustrative example of a request made to retrieve details contents using the decoderawtransaction
method. Additionally, we present the resulting response containing information about the hex-encoded and serialized transaction.
Parameters
Field | Type | Description |
---|---|---|
hexstring* | string | The transaction hex string |
iswitness | boolean | Heuristic tests will be employed for decoding in the event that iswitness is absent. Only witness deserialization will be tried if this is true. We shall try non-witness deserialization only if it is false. If the caller knows, this boolean should indicate if the transaction contains inputs (such as entirely legitimate or on-chain transactions). |
The example in this section uses a non-existing project id.
Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
Curl Request example
curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'content-type: application/json;' \
--data '{
"jsonrpc": "1.0",
"id": "bwarelabs",
"method": "decoderawtransaction",
"params": [
"0200000001e114ded2868c57821e336374c948158cebf18daaf5c7bc756b199d118d6e229d0000000000ffffffff010000000000000000066a040001020300000000"
]
}'