|
|
@@ -2,27 +2,58 @@
|
|
|
|
|
|
A demo chat program to document DarkFi net
|
|
|
code. Tutorial can be found in the [DarkFi
|
|
|
-book](https://darkrenaissance.github.io/darkfi/learn/dchat/dchat.html).
|
|
|
+book](https://darkrenaissance.github.io/darkfi/learn/writing-a-p2p-app.html).
|
|
|
|
|
|
-## Usage
|
|
|
+## Step 1: Spin a seed node
|
|
|
|
|
|
-Spin up a seed node:
|
|
|
+```bash
|
|
|
+cd darkfi
|
|
|
+make BINS=lilith
|
|
|
+./lilith
|
|
|
+```
|
|
|
+
|
|
|
+You should see the following output:
|
|
|
+
|
|
|
+```
|
|
|
+Config file created in '"/home/USER/.config/darkfi/lilith_config.toml"'. Please review it and try again.
|
|
|
+ ```
|
|
|
+
|
|
|
+Add dchat to the config as follows, keeping in mind that the port number
|
|
|
+must match the seed specified in Alice and Bob's settings (see: main.rs).
|
|
|
+
|
|
|
+```toml
|
|
|
+[network."dchat"]
|
|
|
+port = 50515
|
|
|
+localnet = true
|
|
|
+```
|
|
|
+
|
|
|
+Now run `lilith`:
|
|
|
+
|
|
|
+```bash
|
|
|
+./lilith
|
|
|
+```
|
|
|
+
|
|
|
+## Step 2: Using dchat
|
|
|
|
|
|
```shell
|
|
|
+<<<<<<< HEAD
|
|
|
cd example/dchat
|
|
|
cargo run
|
|
|
+=======
|
|
|
+make BINS="dchat"
|
|
|
+>>>>>>> ac3d1d7d271 (dchat: update README with lilith usage)
|
|
|
```
|
|
|
|
|
|
Run dchat as an inbound node:
|
|
|
|
|
|
```shell
|
|
|
-cargo run a
|
|
|
+./dchat a
|
|
|
```
|
|
|
|
|
|
Run dchat as an outbound node:
|
|
|
|
|
|
```shell
|
|
|
-cargo run b
|
|
|
+./dchat b
|
|
|
```
|
|
|
|
|
|
## Logging
|