curl https://mainnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "1.0",
"id": "curltest",
"method": "decoderawtransaction",
"params": ["hexstring"]
}'
Return a JSON object representing the serialized, hex-encoded transaction.
This method will use 10
Compute Units.
hexstring
- string, required
The transaction hex string
iswitness
- boolean, optional, default=depends on heuristic tests
Whether the transaction hex is a serialized witness transaction.
If iswitness
is not present, heuristic tests will be used in decoding. If true, only witness deserialization will be tried. If false, only non-witness deserialization will be tried. This boolean should reflect whether the transaction has inputs (e.g. fully valid, or on-chain transactions), if known by the caller.
Decode a hex-encoded script.
This method will use 10
Compute Units.
hexstring
- string, required
the hex-encoded script
Return the raw transaction data.
By default this function only works for mempool transactions. When called with a blockhash argument, getrawtransaction will return the transaction if the specified block is available and the transaction is found in that block. When called without a blockhash argument, getrawtransaction will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction is in a block in the blockchain.
Hint: Use gettransaction for wallet transactions.
If verbose is ‘true’, returns an Object with information about ‘txid’.
If verbose is ‘false’ or omitted, returns a string that is serialized, hex-encoded data for ‘txid’.
This method will use 10
Compute Units.
txid
- string, required
The transaction id
verbose
- boolean, optional, default=false
If false, return a string, otherwise return a json object
blockhash
- string, optional
The block in which to look for the transaction
Submit a raw transaction (serialized, hex-encoded) to local node and network.
Note that the transaction will be sent unconditionally to all peers, so using this for manual rebroadcast may degrade privacy by leaking the transaction’s origin, as nodes will normally not rebroadcast non-wallet transactions already in their mempool.
Also see createrawtransaction and signrawtransactionwithkey calls.
This method will use 10
.
hexstring
- string, required
The hex string of the raw transaction
maxfeerate
- numeric or string, optional, default=0.10
Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB.
Set to 0 to accept any fee rate.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|
str
string
The serialized, hex-encoded data for ‘txid’
hex | string | The transaction hash in hex |
Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex-encoded) would be accepted by mempool. This checks if the transaction violates the consensus or policy rules.
This method will use 10
Compute Units.
rawtxs
- json array, required
An array of hex strings of raw transactions.
Length must be one for now.
maxfeerate
- numeric or string, optional, default=0.10
Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB