xmr-btc-swap/swap/src/cli.rs

49 lines
1.3 KiB
Rust
Raw Normal View History

use libp2p::core::Multiaddr;
use url::Url;
2020-11-05 19:10:22 -05:00
use uuid::Uuid;
#[derive(structopt::StructOpt, Debug)]
2020-11-02 22:54:36 -05:00
#[structopt(name = "xmr-btc-swap", about = "Trustless XMR BTC swaps")]
pub enum Options {
Alice {
#[structopt(default_value = "http://127.0.0.1:8332", long = "bitcoind")]
bitcoind_url: Url,
#[structopt(default_value = "http://127.0.0.1:18083/json_rpc", long = "monerod")]
monerod_url: Url,
#[structopt(default_value = "/ip4/127.0.0.1/tcp/9876", long = "listen-addr")]
listen_addr: Multiaddr,
#[structopt(long = "tor-port")]
tor_port: Option<u16>,
},
Bob {
#[structopt(long = "sats")]
satoshis: u64,
2020-10-26 01:55:53 -04:00
#[structopt(long = "alice-addr")]
alice_addr: Multiaddr,
#[structopt(default_value = "http://127.0.0.1:8332", long = "bitcoind")]
bitcoind_url: Url,
2020-11-02 22:54:36 -05:00
#[structopt(default_value = "http://127.0.0.1:18083/json_rpc", long = "monerod")]
monerod_url: Url,
2020-11-02 22:54:36 -05:00
#[structopt(long = "tor")]
tor: bool,
},
2020-11-05 00:55:30 -05:00
History,
2020-11-05 19:10:22 -05:00
Recover {
#[structopt(required = true)]
swap_id: Uuid,
#[structopt(default_value = "http://127.0.0.1:8332", long = "bitcoind")]
bitcoind_url: Url,
#[structopt(default_value = "http://127.0.0.1:18083/json_rpc", long = "monerod")]
monerod_url: Url,
2020-11-05 19:10:22 -05:00
},
}