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

doc/testnet/payment: simplyfied outputs visualization

skoupidi 1 год назад
Родитель
Сommit
5d49f0a415
3 измененных файлов с 34 добавлено и 22 удалено
  1. 0 0
      doc/src/testnet/img/pablo1.jpg
  2. 32 20
      doc/src/testnet/payment.md
  3. 2 2
      doc/src/testnet/token.md

+ 0 - 0
doc/src/testnet/pablo1.jpg → doc/src/testnet/img/pablo1.jpg


+ 32 - 20
doc/src/testnet/payment.md

@@ -1,45 +1,57 @@
 # Payments
 # Payments
 
 
 Using the tokens we minted, we can make payments to other addresses.
 Using the tokens we minted, we can make payments to other addresses.
-Let's try to send some `MLDY`
-tokens to `8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj`:
+We will use a dummy recepient, but you can also test this with friends.
+Let's try to send some `ANON` tokens to
+`8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj`:
 
 
+```shell
+$ ./drk transfer 2.69 ANON 8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj > payment.tx
 ```
 ```
-$ ./drk transfer 2.69 MLDY \
-    8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj > payment_tx
-```
-
-![transfer](img/transfer.png)
 
 
 The above command will create a transfer transaction and place it into
 The above command will create a transfer transaction and place it into
-the file called `payment_tx`. Then we can broadcast this transaction
-to the network:
+the file called `payment.tx`. Then we can broadcast this transaction to
+the network:
 
 
-```
-$ ./drk broadcast < payment_tx
-```
+```shell
+$ ./drk broadcast < payment.tx
 
 
-![transfer](img/broadcast-transfer.png)
+[mark_tx_spend] Processing transaction: 47b4818caec22470427922f506d72788233001a79113907fd1a93b7756b07395
+[mark_tx_spend] Found Money contract in call 0
+[mark_tx_spend] Found Money contract in call 1
+Broadcasting transaction...
+Transaction ID: 47b4818caec22470427922f506d72788233001a79113907fd1a93b7756b07395
+```
 
 
 On success we'll see a transaction ID. Now again the same confirmation
 On success we'll see a transaction ID. Now again the same confirmation
 process has to occur and `8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj`
 process has to occur and `8sRwB7AwBTKEkyTW6oMyRoJWZhJwtqGTf7nyHwuJ74pj`
 will receive the tokens you've sent.
 will receive the tokens you've sent.
 
 
-![pablo-waiting1](pablo1.jpg)
+![pablo-waiting1](img/pablo1.jpg)
 
 
 We can see the spent coin in our wallet.
 We can see the spent coin in our wallet.
 
 
-```
+```shell
 $ ./drk wallet --coins
 $ ./drk wallet --coins
+
+ Coin            | Spent | Token ID        | Aliases | Value                    | Spend Hook | User Data | Spent TX
+-----------------+-------+-----------------+---------+--------------------------+------------+-----------+-----------------
+ EGV6rS...pmmm6H | true  | 241vAN...KcLssb | DRK     | 2000000000 (20)          | -          | -         | fbbd7a...5f2b19
+...
+ 47QnyR...1T7igm | true  | {TOKEN1}        | ANON    | 4269000000 (42.69)       | -          | -         | 47b481...b07395
+ 5UUJbH...trdQHY | false | {TOKEN1}        | ANON    | 4000000000 (40)          | -          | -         | -
+ EEneNB...m6mxTC | false | 241vAN...KcLssb | DRK     | 1999442971 (19.97253683) | -          | -         | -
 ```
 ```
-![coins](img/spent-coins.png)
 
 
 We have to wait until the next block to see our change balance reappear
 We have to wait until the next block to see our change balance reappear
 in our wallet.
 in our wallet.
 
 
-```
+```shell
 $ ./drk wallet --balance
 $ ./drk wallet --balance
-```
-
-![all-balances](img/all-balances.png)
 
 
+ Token ID                                     | Aliases | Balance
+----------------------------------------------+---------+-------------
+ 241vANigf1Cy3ytjM1KHXiVECxgxdK4yApddL8KcLssb | DRK     | 19.97253683
+ {TOKEN1}                                     | ANON    | 40
+ {TOKEN2}                                     | DAWN    | 20
+```

+ 2 - 2
doc/src/testnet/token.md

@@ -116,7 +116,7 @@ Generating alias ANON for Token: {TOKEN2}
 $ ./drk alias show
 $ ./drk alias show
 
 
  Alias | Token ID
  Alias | Token ID
--------+----------------------------------------------
+-------+---------------------------------------------
  ANON  | {TOKEN1}
  ANON  | {TOKEN1}
  DAWN  | {TOKEN2}
  DAWN  | {TOKEN2}
  DRK   | 241vANigf1Cy3ytjM1KHXiVECxgxdK4yApddL8KcLss
  DRK   | 241vANigf1Cy3ytjM1KHXiVECxgxdK4yApddL8KcLss
@@ -172,7 +172,7 @@ new tokens listed when you run:
 $ ./drk wallet --balance
 $ ./drk wallet --balance
 
 
  Token ID                                     | Aliases | Balance
  Token ID                                     | Aliases | Balance
-----------------------------------------------+---------+----------------
+----------------------------------------------+---------+-------------
  241vANigf1Cy3ytjM1KHXiVECxgxdK4yApddL8KcLssb | DRK     | 19.98451279
  241vANigf1Cy3ytjM1KHXiVECxgxdK4yApddL8KcLssb | DRK     | 19.98451279
  {TOKEN1}                                     | ANON    | 42.69
  {TOKEN1}                                     | ANON    | 42.69
  {TOKEN2}                                     | DAWN    | 20
  {TOKEN2}                                     | DAWN    | 20