Commit graph

5 commits

Author SHA1 Message Date
roshii
c8eef50e93 Migrate to modern packaging and src layout 2023-10-05 19:32:20 +02:00
roshii
b2822ddb95 Implement wallet RPC's JWT token authority 2023-08-29 21:34:53 +02:00
Dennis Reimann
91c2c480f8
API documentation via ReDoc 2022-01-26 16:04:00 +01:00
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
Adam Gibson
80e17df4a6
Add jmwalletd script as RPC server.
Uses Klein to provide HTTP server support.
Adds cookie based auth to requests (made JWT token
based in later commits).
Basic routes are: /unlock, /lock, /display,
/create of wallet.
Encapsulates WalletDaemon as a Service
Add snicker receiver service start, stop
Adds yg/maker function as stoppable service.

Adds a JMShutdown command to
the AMP protocol, allowing a clean shutdown
of a long running bot (e.g. maker) by shutting
down its message channel connections, without
shutting down the entire process.

Adds payment(direct send) request, first draft
2021-10-10 10:50:11 +01:00