mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-18 10:02:45 -05:00
feat: Orchestration & Controller (#492)
* fix: formatting in stress_test.rs * refactor: move asb binary into swap-asb * refactor(swap-asb): remove unused disable_timestamp argument * fix(monero-sys): Include search path for aarch64-linux-gnu * fix(swap): notpick formatting in swap.rs * feat(swap-env): Split up config wizard, add default rendezvous points * feat(swap-controller, swap-controller-api): Minimal maker shell with just a check-connection command * fix(monero-rpc-pool): Use new axum route path syntax to prevent runtime panic * feat(ci): Specify crate when building binaries; build asb-controller * fix: Add swap-controller, swap-controller-api crates and their dependencies to Cargo.toml * feat(Dockerfile): Build asb-controller; default to 1.87 rust toolchain * feat(swap-orchestrator): Compose spec generator * formatting: nitpicks * fix: add swap-orchestrator auto generated files to gitginore * refactoring(swap-orchestrator: Use Into<_> to derive asb::Network and electrs::Network from Bitcoin/Monero network, use defaults * feat(swap-env): Change default bitcoin_confirmation_target to 1 * feat: Dockerfile for asb-controller, bitcoin-balance and monero-balance controller commands * formatting: nitpicks * changelog: default bitcoin finality confirmations change * feat(ci): Build swap-orchestrator binary * disable rpc server by default, split rpc-bind into rpc-bind-port and rpc-bind-host * feat(swap-controller): Add monero-address command to print primary address of internal wallet * chore: upgrade rustyline to 17.0.0 * changelog: Document CONTROLLER, ORCHESTRATOR and JSON-RPC server * refactor: Change swap-orchestrator binary to just "orchestrator" * refactor: let RpcServer::start(...) take port and host seperately * default electrum servers in config wizard * formatting * feat(swap-orchestrator): README * feat(swap-controller): Add Multiaddresses and ActiveConnections command Signed-off-by: Binarybaron <binarybaron@protonmail.com> * refactor(asb/event_loop.rs): Move quote logic and tower service into their own modules * fix(swap): some unit tests * feat(swap-controller): redumentary repl command auto complete * formatting * feat(swap-orchestrator): Burn Git commit hash into orchestrator binary * feat(swap-orchestrator): burn git commit hash into binary when building from source * feat(Dockerfiles): Build with --locked * feat: derive ports for images from network combination add some doc into the docker compose file * small refactorings * feat(swap-controller): Add get-swaps command * feat: add more default electrum mainnet nodes * feat: build asb-controller docker image in ci, move asb Dockerfile into swap-asb * fix: do not allow pre-built docker images for now * amend changelog * remove default monero_daemon_url, default to None (Monero RPC pool) * unify asb and orchestrator wizard for monero daemon url setup --------- Signed-off-by: Binarybaron <binarybaron@protonmail.com>
This commit is contained in:
parent
7c82853050
commit
97a4a31af9
49 changed files with 2979 additions and 704 deletions
32
swap-controller/src/cli.rs
Normal file
32
swap-controller/src/cli.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
use clap::{Parser, Subcommand};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "asb-controller")]
|
||||
#[command(about = "Control tool for ASB daemon")]
|
||||
pub struct Cli {
|
||||
/// RPC server URL
|
||||
#[arg(long, default_value = "http://127.0.0.1:9944")]
|
||||
pub url: String,
|
||||
|
||||
/// Command to execute (defaults to interactive shell if omitted)
|
||||
#[command(subcommand)]
|
||||
pub cmd: Option<Cmd>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Clone)]
|
||||
pub enum Cmd {
|
||||
/// Check connection to ASB server
|
||||
CheckConnection,
|
||||
/// Get Bitcoin balance
|
||||
BitcoinBalance,
|
||||
/// Get Monero balance
|
||||
MoneroBalance,
|
||||
/// Get Monero wallet address
|
||||
MoneroAddress,
|
||||
/// Get external multiaddresses
|
||||
Multiaddresses,
|
||||
/// Get active connection count
|
||||
ActiveConnections,
|
||||
/// Get list of swaps
|
||||
GetSwaps,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue