joinmarket/scripts
Adam Gibson 070c5bf9b9
python-bitcointx backend for jmbitcoin.
Replaces core transaction, address, serialization
and sign functionality for Bitcoin with
python-bitcointx backend.

Removes bech32 and btscript
modules from jmbitcoin. Removes all string,
hex, binary conversion routines. A generic
hex/binary conversion now is added to jmbase.
Removes all transaction serialization and
deserialization routines. Removes the now
irrelevant test modules.

Remaining functions in jmbitcoin remove any parsing of
hex format, requiring callers to use binary only.

One additional test added, testing the remaining
function in secp256k1_transaction.py: the signing
of transactions. Deserialized form is now
bitcointx.CMutableTransaction.

For jmbase, in addition to the above, generic conversions
for utxos to and from strings is added, and a dynamic conversion
for AMP messages to binary-only. Within the code, utxos are
now only in (binarytxid, int) form, except where converted
for communcation.

Tthe largest part of the changes are
the modifications to jmbitcoin calls in jmclient;
as well as different encapsulation with CMutableTransaction,
there is also a removal of some but not all hex parsing;
it remains for rpc calls to Core and for AMP message
parsing. Backwards compatibility must be ensured so some
joinmarket protocol messages still use hex, and it is
also preserved in persistence of PoDLE data.
As part of this, some significant simplification of
certain legacy functions within the wallet has been done.

jmdaemon is entirely unaltered (save for one test which
simulates jmclient code).
2020-07-06 16:36:46 +01:00
..
cmtdata Add commitments tools 2016-11-25 20:44:01 +02:00
logs Ignore *.egg-info, and scripts/logs/*.schedule 2017-05-02 22:19:22 -04:00
obwatch Remove link to old non segwit version and change new version link to use JoinMarket github organization 2020-05-20 23:24:59 +03:00
wallets schedules read from files; joinmarketd state bugfix on ioauth receipt 2016-11-25 15:49:18 +02:00
add-utxo.py python-bitcointx backend for jmbitcoin. 2020-07-06 16:36:46 +01:00
convert_old_wallet.py python-bitcointx backend for jmbitcoin. 2020-07-06 16:36:46 +01:00
joinmarket-qt.py python-bitcointx backend for jmbitcoin. 2020-07-06 16:36:46 +01:00
joinmarket-qt.sh Add wrapper shell script for JoinMarketQt 2020-05-04 23:48:22 +03:00
joinmarketd.py Change shebang to python3 and +x for scripts 2020-05-04 23:48:19 +03:00
qtsupport.py Merge #588: QValidator port number restriction only for ports 2020-06-02 19:41:27 +01:00
README.md change default wallet name 2018-08-07 14:17:13 +02:00
receive-payjoin.py Change shebang to python3 and +x for scripts 2020-05-04 23:48:19 +03:00
sample-schedule-for-testnet fix sample schedule for testnet 2020-05-18 15:06:17 +01:00
sendpayment.py Merge #544: Fidelity bond wallets 2020-06-02 22:25:36 +01:00
sendtomany.py python-bitcointx backend for jmbitcoin. 2020-07-06 16:36:46 +01:00
tumbler.py Allow accessing basic wallet info without blockchain source 2020-06-03 13:48:11 +03:00
wallet-tool.py Change shebang to python3 and +x for scripts 2020-05-04 23:48:19 +03:00
yg-privacyenhanced.py Merge #524: Change shebang to python3 and +x for scripts 2020-05-08 15:29:09 +01:00
yield-generator-basic.py Change shebang to python3 and +x for scripts 2020-05-04 23:48:19 +03:00

Command line scripts for Joinmarket

(If upgrading to version 0.3.0+, don't forget to read this on upgrading the wallet.)

All user level scripts here.

(The phrase "normal Joinmarket" in the below refers to the existing repo.

The subdirectories logs and wallets have the same role as in normal Joinmarket. The subdirectory cmtdata contains only your commitments.json storage of your used commitments (ignored by github of course!). The filename is set in joinmarket.cfg.

The joinmarket.cfg will be created and maintained in this directory.

Brief explanation of the function of each of the scripts:

sendpayment.py

Either use the same syntax as for normal Joinmarket:

`python sendpayment.py --fast -N 3 -m 1 -P wallet.jmdat 50000000 <address>`

or use the new schedule approach. For an example, see the sample schedule file. Do:

`python sendpayment.py --fast -S sample-schedule-for-testnet wallet.jmdat`

Note that the magic string INTERNAL in the file creates a payment to a new address in the next mixdepth (wrapping around to zero if you reach the maximum mixdepth).

To pay a fraction of the total in a mixdepth you can simply make the amount field in the schedule a decimal instead of an integer (0.0 < amt < 1.0 of course).

The schedule file can have any name, and is a comma separated value file, the lists must follow that format; see the comment in the sample file above (each list is length 5 items).

*This part can be ignored for a first run:

Additional fields in config: in the config section [DAEMON] you can specify whether to run the daemon as a separate process or not. By default, the daemon will run in the same Python process, for maximum convenience, so you needn't separately start joinmarketd.py (see below).

You can run the daemon separately by setting nodaemon=0 in [DAEMON]. You can choose to use ssl within this single-process configuration with use_ssl=true (again, see below for more on this).*

tumbler.py

This is an extension of the functionality of sendpayment.py in that it auto-generates a schedule of payments to internal and external addresses, following the same algo as in normal Joinmarket and described here.

For detailed information on how to use this, please read this.

wallet-tool.py

This is the same as in normal Joinmarket.

joinmarketd.py

This file is to be considered experimental for now. It only takes two arguments, the port it serves on (default 27183), and whether to use TLS for client-server communication (default 0=no tls, 1=tls):

`python joinmarketd.py [port number] [1/0]`

To use tls you must create a key.pem and cert.pem in a subdirectory /ssl, representing a self-signed certificate. This needs some work to be cleaned up, but does work already.

add-utxo.py

This works exactly as in normal Joinmarket, with the exception of the location of the commitments.json file, explained above.

sendtomany.py

As above.