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

book: Move tutorial from doc, and add editing notes.

parazyd 4 лет назад
Родитель
Сommit
e41168ffda
3 измененных файлов с 22 добавлено и 19 удалено
  1. 3 0
      book/README.md
  2. 1 0
      book/src/SUMMARY.md
  3. 18 19
      book/src/tutorial.md

+ 3 - 0
book/README.md

@@ -3,3 +3,6 @@ The DarkFi book
 
 
 This directory contains the sources for the book that can be read on
 This directory contains the sources for the book that can be read on
 https://darkrenaissance.github.io/darkfi
 https://darkrenaissance.github.io/darkfi
+
+When adding or removing a section of the book, make sure to update the
+[SUMMARY.md](src/SUMMARY.md) file to actually list the contents.

+ 1 - 0
book/src/SUMMARY.md

@@ -2,6 +2,7 @@
 
 
 [DarkFi](README.md)
 [DarkFi](README.md)
 - [Development](development.md)
 - [Development](development.md)
+- [Tutorial](tutorial.md)
 - [zkas](zkas/zkas.md)
 - [zkas](zkas/zkas.md)
   - [Examples](zkas/examples.md)
   - [Examples](zkas/examples.md)
     - [Sapling payment scheme](zkas/examples/sapling.md)
     - [Sapling payment scheme](zkas/examples/sapling.md)

+ 18 - 19
doc/tutorial.md → book/src/tutorial.md

@@ -10,7 +10,7 @@ To run darkfi, we must first install the software. Do this by cloning
 the darkfi repo:
 the darkfi repo:
 
 
 ```
 ```
-$ git clone https://github.com/darkrenaissance/darkfi
+% git clone https://github.com/darkrenaissance/darkfi
 ```
 ```
 
 
 ## Build
 ## Build
@@ -20,7 +20,7 @@ the trusted setup params and compile the source code. This might take
 a while.
 a while.
 
 
 ```
 ```
-$ make
+% make
 ```
 ```
 
 
 ## Install
 ## Install
@@ -29,15 +29,15 @@ We will now install the project. This will install the binaries
 and configurations in the configured namespace (`/usr/local`
 and configurations in the configured namespace (`/usr/local`
 by default). The configurations are installed as TOML files in
 by default). The configurations are installed as TOML files in
 `/usr/local/share/doc/darkfi`. They have to be copied in your user's
 `/usr/local/share/doc/darkfi`. They have to be copied in your user's
-`$HOME/.config/darkfi` directory.
+`HOME/.config/darkfi` directory.
 
 
 Feel free to review the installed config files, but you don't need to
 Feel free to review the installed config files, but you don't need to
 change anything to run the testnet. The defaults will work fine.
 change anything to run the testnet. The defaults will work fine.
 
 
 ```
 ```
-$ sudo make install
-$ mkdir -p ~/.config/darkfi
-$ cp -f /usr/local/share/doc/darkfi/*.toml ~/.config/darkfi
+% sudo make install
+% mkdir -p ~/.config/darkfi
+% cp -f /usr/local/share/doc/darkfi/*.toml ~/.config/darkfi
 ```
 ```
 
 
 ## Run
 ## Run
@@ -58,14 +58,14 @@ We're now ready to use the testnet.
 Open two terminal windows. In one terminal, start `darkfid`:
 Open two terminal windows. In one terminal, start `darkfid`:
 
 
 ```
 ```
-$ darkfid -v
+% darkfid -v
 ```
 ```
 
 
 And another terminal, run `drk`. This is the command-line interface to
 And another terminal, run `drk`. This is the command-line interface to
 interact with `darkfid`.
 interact with `darkfid`.
 
 
 ```
 ```
-$ drk -h
+% drk -h
 drk
 drk
 
 
 USAGE:
 USAGE:
@@ -124,19 +124,19 @@ or darkened SOL.
 To deposit testnet BTC:
 To deposit testnet BTC:
 
 
 ```
 ```
-$ drk deposit btc --network bitcoin
+% drk deposit btc --network bitcoin
 ```
 ```
 
 
 To deposit testnet SOL:
 To deposit testnet SOL:
 
 
 ```
 ```
-$ drk deposit sol --network solana
+% drk deposit sol --network solana
 ```
 ```
 
 
 To deposit any other asset:
 To deposit any other asset:
 
 
 ```
 ```
-$ drk deposit [ASSET] --network solana
+% drk deposit [ASSET] --network solana
 ```
 ```
 
 
 This command will send a deposit request to the cashier. After running
 This command will send a deposit request to the cashier. After running
@@ -152,7 +152,7 @@ deposit. You can follow the progress on the terminal window where you ran
 `darkfid`. Then check your updated balance, like so:
 `darkfid`. Then check your updated balance, like so:
 
 
 ```
 ```
-$ drk wallet --balances
+% drk wallet --balances
 
 
 +-------+--------+---------+
 +-------+--------+---------+
 | token | amount | network |
 | token | amount | network |
@@ -171,7 +171,7 @@ Find a friend with an account on darkfi and ask them for their darkfi
 address. Then run the transfer command:
 address. Then run the transfer command:
 
 
 ```
 ```
-$ drk transfer <TOKEN> <ADDRESS> <AMOUNT>
+% drk transfer <TOKEN> <ADDRESS> <AMOUNT>
 ```
 ```
 
 
 For example, to transfer 1 SOL to a user at
 For example, to transfer 1 SOL to a user at
@@ -179,7 +179,7 @@ For example, to transfer 1 SOL to a user at
 following command:
 following command:
 
 
 ```
 ```
-$ drk transfer sol 9GmLk7kkbxhsbLTYFMeg6FyuQJV9Na2GcJYFNrs3VLkv 1
+% drk transfer sol 9GmLk7kkbxhsbLTYFMeg6FyuQJV9Na2GcJYFNrs3VLkv 1
 ```
 ```
 
 
 ## Receive
 ## Receive
@@ -188,8 +188,7 @@ To receive anonymous tokens your darkfid account, you must retrieve your
 darkfi address. Send this address to others so they can send you tokens.
 darkfi address. Send this address to others so they can send you tokens.
 
 
 ```
 ```
-$ drk wallet --address
-    
+% drk wallet --address
 Wallet address: "9GmLk7kkbxhsbLTYFMeg6FyuQJV9Na2GcJYFNrs3VLkv"
 Wallet address: "9GmLk7kkbxhsbLTYFMeg6FyuQJV9Na2GcJYFNrs3VLkv"
 ```
 ```
 
 
@@ -202,20 +201,20 @@ you have 1 dBTC you will receive 1 BTC.
 To do so, simply send the following request to the cashier:
 To do so, simply send the following request to the cashier:
 
 
 ```
 ```
-$ drk withdraw <TOKENSYM> <ADDRESS> <AMOUNT> --network <network>
+% drk withdraw <TOKENSYM> <ADDRESS> <AMOUNT> --network <network>
 ```
 ```
 
 
 For example, if you want to withdraw 0.5 SOL to the Solana address
 For example, if you want to withdraw 0.5 SOL to the Solana address
 4q7rkNvH5BVs6VLz6nyhKLvqXmwDyjGnUsE5sZzRNgp4, you would write:
 4q7rkNvH5BVs6VLz6nyhKLvqXmwDyjGnUsE5sZzRNgp4, you would write:
 
 
 ```
 ```
-$ drk withdraw sol 4q7rkNvH5BVs6VLz6nyhKLvqXmwDyjGnUsE5sZzRNgp4 0.5 --network solana
+% drk withdraw sol 4q7rkNvH5BVs6VLz6nyhKLvqXmwDyjGnUsE5sZzRNgp4 0.5 --network solana
 ```
 ```
 
 
 For Bitcoin, the command would look like this:
 For Bitcoin, the command would look like this:
 
 
 ```
 ```
-$ drk withdraw btc bc1qw7nt2yca0zykh8a5sc6nmy3r3clx4ha206wepn 0.5 --network bitcoin
+% drk withdraw btc bc1qw7nt2yca0zykh8a5sc6nmy3r3clx4ha206wepn 0.5 --network bitcoin
 ```
 ```
 
 
 ## Configure
 ## Configure