joinmarket/scripts
Adam Gibson 7e73e4caa9
Add websocket for subscription, OpenAPI spec
1. Moves the JMWalletDaemon service class into
the jmclient package (see the wallet_rpc.py module).
2. Adds dependencies "klein" and "autobahn" to the
jmclient package, as well as "pyjwt".
3. Adds another module websocketserver.py, using
autobahn, to allow the JMWalletDaemon service to
serve subscriptions over a websocket, for e.g.
transaction notifications.
4. Adds tests both for the websocket connection
and for the JSON-RPC HTTP connection.

JmwalletdWebSocketServerFactory.sendTxNotification
sends the json-ified transaction details using
jmbitcoin.human_readable_transaction (as is currently
used in our CLI), along with the txid.
Also adds a coinjoin state update event sent via
the websocket (switch from taker/maker/none).
Require authentication to connect to websocket.

5. Add OpenApi definition of API in yaml;
also auto-create human-readable API docs in markdown.
6. Add fidelity bond function to API
7. Add config read/write route to API
8. Remove snicker rpc calls temporarily
9. Updates to docoinjoin: corrects taker_finished
   for this custom case, does not shut down at end.
10. Address detailed review comments of @PulpCattel.
2021-10-10 16:41:02 +01:00
..
obwatch Fix ob-watcher script after dust threshold change 2021-09-07 09:19:50 +01:00
snicker chmod +x 2021-09-08 09:51:24 +03:00
add-utxo.py Remove unused imports 2021-04-14 15:54:18 +03:00
convert_old_wallet.py Merge #793: Update tests to use 1/0 not True/False addr type 2021-02-13 17:27:51 +00:00
genwallet.py genwallet.py: Add option --recovery-seed-file 2021-09-01 21:18:42 +02:00
jmwalletd.py Add websocket for subscription, OpenAPI spec 2021-10-10 16:41:02 +01:00
joinmarket-qt.py add release notes and version for 0.9.2 2021-10-01 12:22:38 +01:00
joinmarket-qt.sh Add wrapper shell script for JoinMarketQt 2020-05-04 23:48:22 +03:00
joinmarketd.py BIP78 sender protocol via daemon 2021-03-14 11:53:51 +00:00
qtsupport.py Add signet support 2021-01-30 22:12:00 +02:00
README.md Update README.md 2021-01-10 13:48:10 -05:00
receive-payjoin.py Merge #852: Remove unused imports 2021-04-15 18:08:37 +03:00
sample-schedule-for-testnet fix sample schedule for testnet 2020-05-18 15:06:17 +01:00
sendpayment.py Show fidelity bond value in manual order picking 2021-09-25 22:04:40 +03:00
sendtomany.py Remove unused imports 2021-04-14 15:54:18 +03:00
tumbler.py Remove twisted logging on testnet 2020-11-11 04:33:41 +02:00
wallet-tool.py Change shebang to python3 and +x for scripts 2020-05-04 23:48:19 +03:00
yg-privacyenhanced.py add opt-in rbf support for direct sends 2021-08-25 00:35:16 +00:00
yield-generator-basic.py Move YG settings to a config file 2021-01-20 12:45:47 +00: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 -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 -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.

genwallet.py

Non-interactively generate a wallet, giving only wallet name and password. Returns wallet seed as recovery_seed:. Useful for automating JoinMarket deployments.