Просмотр исходного кода

Update README and darkfid.toml example.

parazyd 4 лет назад
Родитель
Сommit
069ab73c5f
2 измененных файлов с 39 добавлено и 81 удалено
  1. 28 81
      README.md
  2. 11 0
      example/config/darkfid.toml

+ 28 - 81
README.md

@@ -1,117 +1,64 @@
-## First time running the demo:
+# DarkFi
 
-1. Install [sqlcipher] (https://github.com/sqlcipher/sqlcipher).
-
-2. Configure gatewayd, cashierd, darkfid and drk TOML files. Copy paste the following defaults to .config/darkfi:
-
-**gatewayd.toml**
+## Building
 
 ```
-connect_url = "127.0.0.1:3333"
-publisher_url = "127.0.0.1:4444"
-log_path = "/tmp/gatewayd.log"	
+$ make
 ```
 
-**cashierd.toml**
+## Configuration
 
-```
-rpc_url = "127.0.0.1:8000"
-gateway_url = "127.0.0.1:3333"
-gateway_subscriber_url = "127.0.0.1:4444"
-log_path = "/tmp/cashierd.log"
-password = "TEST_PASSWORD"
-client_password = "TEST_PASSWORD"
-```
+The daemons can be configured using TOML files. Find examples in
+this repo: [example/config](example/config) and copy them over to
+`~/.config/darkfi`. The defaults should be safe to use for demo
+purpose.
 
-**darkfid.toml**
+## Usage
 
-```
-connect_url = "127.0.0.1:3333"
-subscriber_url = "127.0.0.1:4444"
-cashier_url = "127.0.0.1:7777"
-rpc_url = "127.0.0.1:8000"
-log_path = "/tmp/darkfid_service_daemon.log"
-password = "TEST_PASSWORD"
-```
+For demo purposes we have to run three daemons. It is best practice to
+run them in three different terminals, and use the fourth to interact
+with them using the provided `drk` command line tool.
 
-**drk.toml**
+1. Run `gatewayd`:
 
 ```
-rpc_url = "127.0.0.1:8000"
-log_path = "/tmp/drk_cli.log"
+$ ./target/release/gatewayd -v
 ```
 
-3. Configure the password field on all TOML files.
+2. Run `cashierd`:
 
-4. Compile the project:
-
-```console
-$ cargo build --release
 ```
-
-5. Run the gateway daemon:
-
-```console
-$ cargo run --bin gatewayd -- -v
+$ ./target/release/cashierd -v
 ```
 
-6. Run cashierd:
+3. Run `darkfid`:
 
-```console
-$ cargo run --bin cashierd -- -v
 ```
-
-7. Run darkfid:
-
-```console
-$ cargo run --bin darkfid -- -v
+$ ./target/release/darkfid -v
 ```
 
-8. Initialize drk wallet and generate a key pair:
+Now using the command line interface to the `darkfid` daemon, we can
+make use of the system:
 
-```console
-$ cargo run --bin drk -- -wk 
-```
-
-9. Play.
-
-```console
-$ cargo run --bin drk -- -help
-```
-
-## Every time running the demo:
 
-Run gateway daemon:
+1. Initialize the wallet and generate a keypair:
 
-```console
-$ cargo run --bin gatewayd -- -v
 ```
-
-Run cashierd:
-
-```console
-$ cargo run --bin cashierd -- -v
+$ ./target/release/drk -v wallet --create
+$ ./target/release/drk -v wallet --keygen
 ```
 
-Run darkfid:
+2. Play.
 
-```console
-$ cargo run --bin darkfid -- -v
 ```
-
-Show drk usage manual:
-
-```console
-$ cargo run --bin drk -- -help
+$ ./target/release/drk help
 ```
 
-## darkfid & drk configurations:
-
-Darkfid and drk can be configured using the TOML files in the .config/darkfid directory. Make sure to recompile darkfid and drk after customizing the TOML.
 
-## Go dark
+## Go Dark
 
-Let's liberate people from the claws of big tech and create the democratic paradigm of technology.
+Let's liberate people from the claws of big tech and create the
+democratic paradigm of technology.
 
 Self-defense is integral to any organism's survival and growth.
 

+ 11 - 0
example/config/darkfid.toml

@@ -1,17 +1,28 @@
 connect_url = "127.0.0.1:3333"
 subscriber_url = "127.0.0.1:4444"
+
+# The RPC endpoint for a selected cashier
 cashier_url = "127.0.0.1:9000"
+
 # The URL where darkfid will bind it's RPC socket
 rpc_url = "127.0.0.1:8000"
+
 # Whether to listen with TLS or plain TCP
 use_tls = false
+
 # Path to DER-formatted PKCS#12 archive.
 # This can be created using openssl:
 # openssl pkcs12 -export -out identity.pfx -inkey key.pem -in cert.pem -certfile chain_certs.pem
 tls_identity_path = "~/.config/darkfi/darkfid_identity.pfx"
+
 # Password for the created identity
 tls_identity_password = "FOOBAR"
+
 # Path to darkfid log file
 log_path = "/tmp/darkfid_service_daemon.log"
+
+# Path to the wallet database
+wallet_path = "~/.config/darkfi/walletdb.db"
+
 # Wallet password
 password = "TEST_PASSWORD"