Skip to content

Bitcoin Cash Node bitcoin-tx utility version v27.0.1-6a03070

Usage Description
bitcoin-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction
bitcoin-tx [options] -create [commands] Create hex-encoded bitcoin transaction

Options

Argument Description
-?, -h, -help Print this help message and exit
-create Create new, empty TX.
-json Select JSON output
-txid Output only the hex-encoded transaction id of the resultant transaction.
-usecashaddr In JSON output, use CashAddr address format for destination encoding instead of the legacy base58 format (default: 1)

Chain selection options

Argument Description
-chipnet Use the upcoming upgrade activation chain
-regtest Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.
-scalenet Use the scaling test chain
-testnet Use the test chain
-testnet4 Use the test4 chain

Commands

Argument Description
delin=N Delete input N from TX
delout=N Delete output N from TX
in=TXID:VOUT(:SEQUENCE_NUMBER) Add input to TX
locktime=N Set TX lock time to N
nversion=N Set TX version to N
outaddr=VALUE:ADDRESS Add address-based output to TX
outdata=[VALUE:]DATA Add data-based output to TX
outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS] Add Pay To n-of-m Multi-sig output to TX. n = REQUIRED, m = PUBKEYS. Optionally add the "S" flag to wrap the output in a pay-to-script-hash.
outpubkey=VALUE:PUBKEY[:FLAGS] Add pay-to-pubkey output to TX. Optionally add the "S" flag to wrap the output in a pay-to-script-hash.
outscript=VALUE:SCRIPT[:FLAGS] Add raw script output to TX. Optionally add the "S" flag to wrap the output in a pay-to-script-hash.
sign=SIGHASH-FLAGS Add zero or more signatures to transaction. This command requires JSON registers:prevtxs=JSON object, privatekeys=JSON object. See signrawtransactionwithkey docs for format of sighash flags, JSON objects.
sort Sort the transaction's inputs and outputs according to BIP69

Register Commands

Argument Description
load=NAME:FILENAME Load JSON file FILENAME into register NAME
set=NAME:JSON-STRING Set register NAME to given JSON-STRING

Documentation on docs.bitcoincashnode.org reflects the current master branch in Git, and may include API changes that are not yet present in the latest release.