Add info messages to each subcommand

`asb --help` :

(...)

SUBCOMMANDS:
    balance         Prints the Bitcoin and Monero balance. Requires the monero-wallet-rpc to be running.
    help            Prints this message or the help of the given subcommand(s)
    history         Prints swap-id and the state of each swap ever made.
    start           Main command to run the ASB.
    withdraw-btc    Allows withdrawing BTC from the internal Bitcoin wallet.
This commit is contained in:
Daniel Karzel 2021-04-28 17:29:25 +10:00
parent 0c616c7437
commit efcd39eeef
No known key found for this signature in database
GPG Key ID: 30C3FC2E438ADB6E

View File

@ -25,8 +25,9 @@ pub struct Arguments {
#[derive(structopt::StructOpt, Debug)] #[derive(structopt::StructOpt, Debug)]
#[structopt(name = "xmr_btc-swap", about = "XMR BTC atomic swap")] #[structopt(name = "xmr_btc-swap", about = "XMR BTC atomic swap")]
pub enum Command { pub enum Command {
#[structopt(about = "Main command to run the ASB.")]
Start { Start {
#[structopt(long = "max-buy-btc", help = "The maximum amount of BTC the ASB is willing to buy.", default_value="0.005", parse(try_from_str = parse_btc))] #[structopt(long = "max-buy-btc", help = "The maximum amount of BTC the ASB is willing to buy.", default_value = "0.005", parse(try_from_str = parse_btc))]
max_buy: Amount, max_buy: Amount,
#[structopt( #[structopt(
long = "ask-spread", long = "ask-spread",
@ -41,7 +42,9 @@ pub enum Command {
)] )]
resume_only: bool, resume_only: bool,
}, },
#[structopt(about = "Prints swap-id and the state of each swap ever made.")]
History, History,
#[structopt(about = "Allows withdrawing BTC from the internal Bitcoin wallet.")]
WithdrawBtc { WithdrawBtc {
#[structopt( #[structopt(
long = "amount", long = "amount",
@ -51,6 +54,9 @@ pub enum Command {
#[structopt(long = "address", help = "The address to receive the Bitcoin.")] #[structopt(long = "address", help = "The address to receive the Bitcoin.")]
address: Address, address: Address,
}, },
#[structopt(
about = "Prints the Bitcoin and Monero balance. Requires the monero-wallet-rpc to be running."
)]
Balance, Balance,
} }