#
Raw Transactions Commands
#
createrawtransaction
Category: Rawtransactions | Version: v1.2.14+
Create a transaction spending the given inputs and sending to the given addresses. Returns a hex-encoded raw transaction. The transaction is not signed and is not stored in the wallet or transmitted to the network.
Syntax
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...} (locktime) (expiryheight)
Parameters
Address object format
{
"address": 0.01,
"address": {"currency": 0.01},
"data": "hex"
}
Result
Examples
verus -testnet createrawtransaction '[{"txid":"myid","vout":0}]' '{"myaddress":0.01}'
## With OP_RETURN data
verus -testnet createrawtransaction '[{"txid":"myid","vout":0}]' '{"myaddress":0.01,"data":"00010203"}'
Common Errors
Related Commands
— Add inputs to fund the transactionfundrawtransaction — Sign the transactionsignrawtransaction — Broadcast signed transactionsendrawtransaction — Inspect the raw transactiondecoderawtransaction
Notes
- This creates an unsigned transaction. Use
signrawtransactionbefore broadcasting. - Typical workflow:
createrawtransaction→fundrawtransaction→signrawtransaction→sendrawtransaction. - The
datakey creates an OP_RETURN output. - Supports multi-currency outputs via the object value format.
Tested On
- VRSCTEST — Block height: 926996 | Version: v1.2.14-2 (documented from help; not executed to avoid creating transactions)
#
decoderawtransaction
Category: Rawtransactions | Version: v1.2.14+
Return a JSON object representing the serialized, hex-encoded transaction.
Syntax
decoderawtransaction "hexstring"
Parameters
Result
Examples
## First get a raw transaction hex
verus -testnet getrawtransaction "1f345eb81bfc9b349b39fbb87edf284c565084bacc5a7f75113ab0dcf47ee7d8"
## Then decode it
verus -testnet decoderawtransaction "0400008085202f890206d5c092..."
Testnet output (truncated):
{
"txid": "1f345eb81bfc9b349b39fbb87edf284c565084bacc5a7f75113ab0dcf47ee7d8",
"overwintered": true,
"version": 4,
"versiongroupid": "892f2085",
"locktime": 0,
"expiryheight": 926685,
"vin": [
{
"txid": "0099668458e75500a75422ff5dc5e1236da73e5624939bb47431c8a792c0d506",
"vout": 0,
"addresses": ["iHErKKqAxAyBPaaf4MphkYFctDamXxTA2Y"],
"scriptSig": { "asm": "...", "hex": "..." },
"value": 0.00000000,
"sequence": 4294967295
}
],
"vout": [...]
}
Common Errors
Related Commands
— Get raw hex from a txidgetrawtransaction — Decode a scriptdecodescript — Create raw transactionscreaterawtransaction
Notes
- Read-only operation — does not modify the wallet or blockchain.
- Useful for inspecting transactions before signing or broadcasting.
- The
addressesfield invinshows the spending addresses.
Tested On
- VRSCTEST — Block height: 926996 | Version: v1.2.14-2
#
decodescript
Category: Rawtransactions | Version: v1.2.14+
Decode a hex-encoded script.
Syntax
decodescript "hex"
Parameters
Result
{
"asm": "asm",
"hex": "hex",
"type": "type",
"reqSigs": 1,
"addresses": ["address"],
"p2sh": "address"
}
Examples
## Decode a standard P2PKH script
verus -testnet decodescript "76a91489abcdefabbaabbaabbaabbaabbaabbaabbaabba88ac"
Testnet output:
{
"type": "pubkeyhash",
"spendableoutput": true,
"reqSigs": 1,
"addresses": [
"RMq8TyhrWAY76qY2EUcQfxW7GhNpnwvsSC"
],
"p2sh": "bS8xsSnoTMoWXr26adY8pZwyLvadMh3nWr"
}
Common Errors
Related Commands
— Decode a full transactiondecoderawtransaction — Create raw transactionscreaterawtransaction
Notes
- Useful for analyzing scripts from transaction outputs.
- The
p2shfield shows what the P2SH address would be if this script were wrapped. spendableoutputindicates if the script type is recognized as spendable.
Tested On
- VRSCTEST — Block height: 926996 | Version: v1.2.14-2
#
fundrawtransaction
Category: Rawtransactions | Version: v1.2.14+
Add inputs to a transaction until it has enough value to meet its output value. Adds one change output to the outputs. Existing inputs are not modified.
Syntax
fundrawtransaction "hexstring" '[utxos]' (changeaddress) (explicitfee)
Parameters
Result
{
"hex": "value",
"fee": 0.0001,
"changepos": 1
}
Examples
## Create an empty transaction
verus -testnet createrawtransaction "[]" '{"myaddress":0.01}'
## Fund it
verus -testnet fundrawtransaction "rawtransactionhex"
## Sign it
verus -testnet signrawtransaction "fundedtransactionhex"
## Send it
verus -testnet sendrawtransaction "signedtransactionhex"
Common Errors
Related Commands
— Create the initial transactioncreaterawtransaction — Sign after fundingsignrawtransaction — Broadcast signed transactionsendrawtransaction
Notes
- Inputs added by this command are not signed — use
signrawtransactionafterward. - Previously signed inputs may need to be re-signed since inputs/outputs have been modified.
- The optional UTXO list allows controlling which inputs are used for funding.
Tested On
- VRSCTEST — Block height: 926996 | Version: v1.2.14-2 (documented from help)
#
getrawtransaction
Category: Rawtransactions | Version: v1.2.14+
Return the raw transaction data. If verbose=0, returns hex-encoded data. If verbose is non-zero, returns a JSON object with transaction details.
Syntax
getrawtransaction "txid" (verbose)
Parameters
Result
If verbose=0: hex-encoded transaction string.
If verbose>0: JSON object with txid, version, vin, vout, blockhash, confirmations, time, blocktime, and more.
Examples
## Get raw hex
verus -testnet getrawtransaction "1f345eb81bfc9b349b39fbb87edf284c565084bacc5a7f75113ab0dcf47ee7d8"
Testnet output (truncated):
0400008085202f890206d5c092a7c83174b49b9324563ea76d23e1c55dff2254a70055e758846699...
## Get verbose JSON
verus -testnet getrawtransaction "1f345eb81bfc9b349b39fbb87edf284c565084bacc5a7f75113ab0dcf47ee7d8" 1
Common Errors
Related Commands
— Decode raw hex to JSONdecoderawtransaction — Broadcast a transactionsendrawtransaction
Notes
- By default, this only works for transactions in the mempool or with unspent outputs.
- To query any transaction, start the node with
-txindexcommand line option. - Verbose mode (1) returns the same data as
decoderawtransactionplus block info.
Tested On
- VRSCTEST — Block height: 926996 | Version: v1.2.14-2
#
sendrawtransaction
Category: Rawtransactions | Version: v1.2.14+
Submits a raw transaction (serialized, hex-encoded) to the local node and network.
Syntax
sendrawtransaction "hexstring" (allowhighfees)
Parameters
Result
Examples
## Typical workflow
verus -testnet createrawtransaction '[{"txid":"mytxid","vout":0}]' '{"myaddress":0.01}'
verus -testnet signrawtransaction "myhex"
verus -testnet sendrawtransaction "signedhex"
Common Errors
Related Commands
— Create the transactioncreaterawtransaction — Sign before sendingsignrawtransaction — Add inputs for fundingfundrawtransaction
Notes
- The transaction must be fully signed before broadcasting.
- Typical workflow:
createrawtransaction→fundrawtransaction→signrawtransaction→sendrawtransaction. - Use
allowhighfees=trueto bypass the high-fee safety check.
Tested On
- VRSCTEST — Block height: 926996 | Version: v1.2.14-2 (documented from help; not executed)
#
signrawtransaction
Category: Rawtransactions | Version: v1.2.14+
Sign inputs for a raw transaction (serialized, hex-encoded).
Syntax
signrawtransaction "hexstring" ([prevtxs]) ([privatekeys]) (sighashtype) (branchid)
Parameters
Sighash types
ALL, NONE, SINGLE, ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY
prevtxs format
[
{
"txid": "id",
"vout": 0,
"scriptPubKey": "hex",
"redeemScript": "hex",
"amount": 0.01
}
]
Result
{
"hex": "value",
"complete": true,
"errors": []
}
Examples
verus -testnet signrawtransaction "myhex"
Common Errors
Related Commands
— Create the transactioncreaterawtransaction — Add funding inputsfundrawtransaction — Broadcast after signingsendrawtransaction
Notes
- If no private keys are provided, the wallet's keys are used.
- Check
completein the result — if false, more signatures are needed (e.g., multisig). - The
branchidparameter allows signing with consensus rules ahead of the node's current height.
Tested On
- VRSCTEST — Block height: 926996 | Version: v1.2.14-2 (documented from help)