diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-01-04 20:05:56 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-01-24 20:04:18 -0500 |
commit | dba91a9a6783057d7f308eeabb0ef4a6772c9562 (patch) | |
tree | e3a8401593fa1d845f48f33fa53e0f7943b89a39 /contrib/spendfrom/README | |
parent | ea9788517bfa3e53e192c5af9e64e73625f9db74 (diff) | |
download | bitcoin-dba91a9a6783057d7f308eeabb0ef4a6772c9562.tar.xz |
spendfrom.py sends coins from a particular address or addresses
Should be both useful and also a pretty good demonstration of
using the raw transactions API.
Diffstat (limited to 'contrib/spendfrom/README')
-rw-r--r-- | contrib/spendfrom/README | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/spendfrom/README b/contrib/spendfrom/README new file mode 100644 index 0000000000..8a087a0c1e --- /dev/null +++ b/contrib/spendfrom/README @@ -0,0 +1,32 @@ +Use the raw transactions API to send coins received on a particular +address (or addresses). + +Depends on jsonrpc + +Usage: + +spendfrom.py --from=FROMADDRESS1[,FROMADDRESS2] --to=TOADDRESS --amount=amount \ + --fee=fee --datadir=/path/to/.bitcoin --testnet --dry_run + +With no arguments, outputs a list of amounts associated with addresses. + +With arguments, sends coins received by the FROMADDRESS addresses to the TOADDRESS. + +You may explictly specify how much fee to pay (a fee more than 1% of the amount +will fail, though, to prevent bitcoin-losing accidents). Spendfrom may fail if +it thinks the transaction would never be confirmed (if the amount being sent is +too small, or if the transaction is too many bytes for the fee). + +If a change output needs to be created, the change will be sent to the last +FROMADDRESS (if you specify just one FROMADDRESS, change will go back to it). + +If --datadir is not specified, the default datadir is used. + +The --dry_run option will just create and sign the the transaction and print +the transaction data (as hexadecimal), instead of broadcasting it. + +If the transaction is created and broadcast successfully, a transaction id +is printed. + +If this was a tool for end-users and not programmers, it would have much friendlier +error-handling. |