drk: wallet command use subcommand structure instead of flags

This commit is contained in:
skoupidi
2025-06-19 16:57:51 +03:00
parent 590eec6f9c
commit 5236c4516d
12 changed files with 531 additions and 582 deletions

View File

@@ -14,7 +14,7 @@ with. Note that the coin overview might look very different depending
on your activity:
```shell
$ ./drk wallet --coins
$ ./drk wallet coins
Coin | Spent | Token ID | Aliases | Value | Spend Hook | User Data | Spent TX
-----------------+-------+-----------------+---------+--------------------------+------------+-----------+-----------------
@@ -88,7 +88,7 @@ also be in the mempool, so you should wait again until it's confirmed.
After a while you should see the change in balances in your wallet:
```shell
$ ./drk wallet --balance
$ ./drk wallet balance
Token ID | Aliases | Balance
----------------------------------------------+---------+-------------
@@ -102,7 +102,7 @@ unchanged. We can confirm it actually happened successfully by checking
our coins:
```shell
$ ./drk wallet --coins
$ ./drk wallet coins
Coin | Spent | Token ID | Aliases | Value | Spend Hook | User Data | Spent TX
-----------------+-------+-----------------+---------+--------------------------+------------+-----------+-----------------

View File

@@ -264,7 +264,7 @@ Now that the DAO has something in its treasury, we can generate a
transfer proposal to send it somewhere, that will be up to vote
for 1 block period, if we hold the DAO proposer key. Let's propose
to send 5 of the 10 tokens to our address (we can find that with
`drk wallet --address`):
`drk wallet address`):
```shell
$ ./drk dao propose-transfer AnonDAO 1 5 DAWN {YOUR_ADDRESS}
@@ -511,7 +511,7 @@ $ ./drk dao balance AnonDAO
```
```shell
$ ./drk wallet --balance
$ ./drk wallet balance
Token ID | Aliases | Balance
----------------------------------------------+---------+-------------

View File

@@ -108,7 +108,7 @@ Config file created in "~/.config/darkfi/darkfid_config.toml". Please review it
```
```shell
$ ./drk wallet --address
$ ./drk wallet address
Config file created in "~/.config/darkfi/drk_config.toml". Please review it and try again.
```
@@ -150,7 +150,7 @@ initialize a wallet, and create a keypair. The wallet address shown in
the outputs is examplatory and will different from the one you get.
```shell
$ ./drk wallet --initialize
$ ./drk wallet initialize
Initializing Money Merkle tree
Successfully initialized Merkle tree for the Money contract
@@ -160,7 +160,7 @@ Successfully initialized Merkle trees for the DAO contract
```
```shell
$ ./drk wallet --keygen
$ ./drk wallet keygen
Generating a new keypair
New address:
@@ -168,7 +168,7 @@ CbaqFqGTgn86Zh9AjUeMw3DJyVCshaPSPFtmj6Cyd5yU
```
```shell
$ ./drk wallet --default-address 1
$ ./drk wallet default-address 1
```
The second command will print out your new DarkFi address where you
@@ -176,7 +176,7 @@ can receive payments. Take note of it. Alternatively, you can always
retrieve your default address using:
```shell
$ ./drk wallet --address
$ ./drk wallet address
CbaqFqGTgn86Zh9AjUeMw3DJyVCshaPSPFtmj6Cyd5yU
```
@@ -252,7 +252,7 @@ like this:
```toml
# Put your `minerd` endpoint here (default for testnet is in this example)
minerd_endpoint = "tcp://127.0.0.1:28467"
# Put the address from `drk wallet --address` here
# Put the address from `drk wallet address` here
recipient = "YOUR_WALLET_ADDRESS_HERE"
```
@@ -263,7 +263,7 @@ is `~/.config/darkfi/minerd_config.toml`). Finally, replace the
you can retrieve as follows:
```shell
$ ./drk wallet --address
$ ./drk wallet address
CbaqFqGTgn86Zh9AjUeMw3DJyVCshaPSPFtmj6Cyd5yU
```

View File

@@ -32,7 +32,7 @@ will receive the tokens you've sent.
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
-----------------+-------+-----------------+---------+--------------------------+------------+-----------+-----------------
@@ -47,7 +47,7 @@ We have to wait until the next block to see our change balance reappear
in our wallet.
```shell
$ ./drk wallet --balance
$ ./drk wallet balance
Token ID | Aliases | Balance
----------------------------------------------+---------+-------------

View File

@@ -20,7 +20,7 @@ then after some time your new balance should be in your wallet.
You can check your wallet balance using `drk`:
```shell
$ ./drk wallet --balance
$ ./drk wallet balance
Token ID | Aliases | Balance
----------------------------------------------+---------+---------
@@ -130,7 +130,7 @@ Now let's mint some tokens for ourselves. First grab your wallet address,
and then create the token mint transaction, and finally - broadcast it:
```shell
$ ./drk wallet --address
$ ./drk wallet address
{YOUR_ADDRESS}
```
@@ -171,7 +171,7 @@ then when the transaction is confirmed, your wallet should have your
new tokens listed when you run:
```shell
$ ./drk wallet --balance
$ ./drk wallet balance
Token ID | Aliases | Balance
----------------------------------------------+---------+-------------