Skip to content

command help txcreate

The MMGen Project edited this page Sep 20, 2024 · 8 revisions
  MMGEN-TXCREATE: Create a transaction with outputs to specified coin or MMGen addresses
  USAGE:          mmgen-txcreate [opts]  [<addr,amt> ...] <change addr, addrlist ID or addr type> [addr file ...]
  OPTIONS:
  -h, --help            Print this help message
      --longhelp        Print help message for long options (common options)
  -a, --autosign        Create a transaction for offline autosigning (see
                        ‘mmgen-autosign’). The removable device is mounted and
                        unmounted automatically
  -A, --fee-adjust   f  Adjust transaction fee by factor 'f' (see below)
  -B, --no-blank        Don't blank screen before displaying unspent outputs
  -c, --comment-file f  Source the transaction's comment from file 'f'
  -C, --fee-estimate-confs c Desired number of confirmations for fee estimation
                        (default: 3)
  -d, --outdir       d  Specify an alternate directory 'd' for output
  -D, --contract-data D Path to hex-encoded contract data (ETH only)
  -E, --fee-estimate-mode M Specify the network fee estimate mode.  Choices:
                        'conservative','economical'.  Default: 'conservative'
  -f, --fee          f  Transaction fee, as a decimal BTC amount or as
                        satoshis per byte (an integer followed by 's').
                        See FEE SPECIFICATION below.  If omitted, fee will be
                        calculated using network fee estimation.
  -g, --gas          g  Specify start gas amount in Wei (ETH only)
  -i, --info            Display unspent outputs and exit
  -I, --inputs       i  Specify transaction inputs (comma-separated list of
                        MMGen IDs or coin addresses).  Note that ALL unspent
                        outputs associated with each address will be included.
  -l, --locktime     t  Lock time (block height or unix seconds) (default: 0)
  -L, --autochg-ignore-labels Ignore labels when autoselecting change addresses
  -m, --minconf      n  Minimum number of confirmations required to spend
                        outputs (default: 1)
  -q, --quiet           Suppress warnings; overwrite files without prompting
  -R, --no-rbf          Make transaction non-replaceable (non-replace-by-fee
                        according to BIP 125)
  -v, --verbose         Produce more verbose output
  -V, --vsize-adj    f  Adjust transaction's estimated vsize by factor 'f'
  -y, --yes             Answer 'yes' to prompts, suppress non-essential output
  -X, --cached-balances Use cached balances (Ethereum only)


  The transaction’s outputs are listed on the command line, while its inputs
  are chosen from a list of the wallet’s unspent outputs via an interactive
  menu.  Alternatively, inputs may be specified using the --inputs option.

  All addresses on the command line can be either Bitcoin addresses or MMGen
  IDs in the form <seed ID>:<address type letter>:<index>.

  Outputs are specified in the form <address>,<amount>, with the change output
  specified by address only.  Alternatively, the change output may be an
  addrlist ID in the form <seed ID>:<address type letter>, in which case the
  first unused address in the tracking wallet matching the requested ID will
  be automatically selected as the change output.

  If the transaction fee is not specified on the command line (see FEE
  SPECIFICATION below), it will be calculated dynamically using network fee
  estimation for the default (or user-specified) number of confirmations.
  If network fee estimation fails, the user will be prompted for a fee.

  Network-estimated fees will be multiplied by the value of --fee-adjust, if
  specified.

  To send the value of all inputs (minus TX fee) to a single output, specify
  a single address with no amount on the command line.  Alternatively, an
  addrlist ID may be specified, and the address will be chosen automatically
  as described above for the change output.


                                 FEE SPECIFICATION

  Transaction fees, both on the command line and at the interactive prompt, may
  be specified as either absolute BTC amounts, using a plain decimal number, or
  as satoshis per byte, using an integer followed by 's', for satoshi.


  EXAMPLES:

    Send 0.123 BTC to an external Bitcoin address, returning the change to a
    specific MMGen address in the tracking wallet:

      $ mmgen-txcreate 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 01ABCDEF:S:7

    Same as above, but select the change address automatically:

      $ mmgen-txcreate 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 01ABCDEF:S

    Same as above, but select the change address automatically by address type:

      $ mmgen-txcreate 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 S

    Same as above, but reduce verbosity and specify fee of 20 satoshis
    per byte:

      $ mmgen-txcreate -q -f 20s 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 S

    Send entire balance of selected inputs minus fee to an external Bitcoin
    address:

      $ mmgen-txcreate 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB

    Send entire balance of selected inputs minus fee to first unused wallet
    address of specified type:

      $ mmgen-txcreate S

  MMGEN v15.0.0                  September 2024              MMGEN-TXCREATE(1)
Clone this wiki locally