2016-11-25 20:44:01 +02:00
# Command line scripts for Joinmarket
2017-07-23 20:25:26 +03:00
(If upgrading to version 0.3.0+, don't forget to read [this ](../docs/SEGWIT-UPGRADE.md ) on upgrading the wallet.)
2016-11-25 20:44:01 +02:00
All user level scripts here.
(The phrase "normal Joinmarket" in the below refers to the [existing repo ](https://github.com/Joinmarket-Org/joinmarket ).
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:
2017-04-26 20:55:24 +03:00
### sendpayment.py
2016-11-25 20:44:01 +02:00
Either use the same syntax as for normal Joinmarket:
2021-01-10 13:48:10 -05:00
`python sendpayment.py -N 3 -m 1 -P wallet.jmdat 50000000 <address>`
2016-11-25 20:44:01 +02:00
or use the new schedule approach. For an example, see the [sample schedule file ](https://github.com/AdamISZ/joinmarket-clientserver/blob/master/scripts/sample-schedule-for-testnet ).
Do:
2021-01-10 13:48:10 -05:00
`python sendpayment.py -S sample-schedule-for-testnet wallet.jmdat`
2016-11-25 20:44:01 +02:00
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).
2016-12-27 21:12:00 +02:00
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 ) .
2016-11-25 20:44:01 +02:00
The schedule file can have any name, and is a comma separated value file, the lists
2016-12-27 21:12:00 +02:00
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).*
2017-04-26 20:55:24 +03:00
### tumbler.py
2016-12-27 21:12:00 +02:00
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 ](https://github.com/JoinMarket-Org/joinmarket/wiki/Step-by-step-running-the-tumbler ).
2017-03-02 13:11:05 +02:00
For detailed information on how to use this, please read [this ](https://github.com/AdamISZ/joinmarket-clientserver/tree/master/docs/tumblerguide.md ).
2016-11-25 20:44:01 +02:00
2017-04-26 20:55:24 +03:00
### wallet-tool.py
2016-11-25 20:44:01 +02:00
This is the same as in normal Joinmarket.
2017-04-26 20:55:24 +03:00
### joinmarketd.py
2016-11-25 20:44:01 +02:00
2017-09-22 21:20:03 +02:00
This file is to be considered experimental for now. It only
2016-12-27 21:12:00 +02:00
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]`
2016-11-25 20:44:01 +02:00
2016-12-27 21:12:00 +02:00
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.
2016-11-25 20:44:01 +02:00
2017-04-26 20:55:24 +03:00
### add-utxo.py
2016-11-25 20:44:01 +02:00
This works exactly as in normal Joinmarket, with the exception of the location
of the `commitments.json` file, explained above.
2017-04-26 20:55:24 +03:00
### sendtomany.py
2016-11-25 20:44:01 +02:00
As above.
2020-09-17 09:56:55 +00:00
### genwallet.py
Non-interactively generate a wallet, giving only wallet name and password. Returns wallet seed as `recovery_seed:` . Useful for automating JoinMarket deployments.