bitcoin/bitcoin — pull request #4332 by jgarzik (2014-06-12 04:10:45+00:00)
Title: Add new "rawtx" command line utility

This is a simple utility that provides command line manipulation of a hex-encoded TX. The utility takes a hex string on the command line as input, performs zero or more mutations, and outputs a hex string to standard output.

This utility is also an intentional exercise of the "bitcoin library" concept. It is designed to require minimal libraries, and works entirely without need for any RPC or P2P communication.

The command line help provides a list of the mutations available:
```
Usage:
rawtx [options] Update hex-encoded bitcoin transaction

Options:
-? This help message
-delin=N Delete input N from TX
-delout=N Delete output N from TX
-in=TXID:VOUT 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
-outscript=VALUE:SCRIPT Add raw script output to TX
-regtest Enter regression test mode, which uses a special chain in which blocks can be solved instantly.
-testnet Use the test network
```