You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wow-btc-swap/swap/src/bin/simple_swap.rs

31 lines
843 B

use anyhow::Result;
use structopt::StructOpt;
use swap::{
bob_simple::{simple_swap, BobState},
cli::Options,
storage::Database,
};
#[tokio::main]
async fn main() -> Result<()> {
let opt = Options::from_args();
let db = Database::open(std::path::Path::new("./.swap-db/")).unwrap();
let swarm = unimplemented!();
let bitcoin_wallet = unimplemented!();
let monero_wallet = unimplemented!();
let mut rng = unimplemented!();
let bob_state = unimplemented!();
match opt {
Options::Alice { .. } => {
simple_swap(bob_state, swarm, db, bitcoin_wallet, monero_wallet, rng).await?;
}
Options::Recover { .. } => {
let _stored_state: BobState = unimplemented!("io.get_state(uuid)?");
// abort(_stored_state, _io);
}
_ => {}
};
}