mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-21 03:15:28 -05:00
feat(swap-controller): Add monero-seed RPC command (#511)
This commit is contained in:
parent
dac835f925
commit
6861f38f16
5 changed files with 37 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ mod repl;
|
|||
|
||||
use clap::Parser;
|
||||
use cli::{Cli, Cmd};
|
||||
use swap_controller_api::AsbApiClient;
|
||||
use swap_controller_api::{AsbApiClient, MoneroSeedResponse};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
|
|
@ -43,6 +43,19 @@ async fn dispatch(cmd: Cmd, client: impl AsbApiClient) -> anyhow::Result<()> {
|
|||
let response = client.monero_address().await?;
|
||||
println!("The primary Monero address is {}", response.address);
|
||||
}
|
||||
Cmd::MoneroSeed => {
|
||||
let MoneroSeedResponse {
|
||||
seed,
|
||||
restore_height,
|
||||
} = client.monero_seed().await?;
|
||||
|
||||
println!("The seed of the internal Monero wallet is: \n{}", seed);
|
||||
println!();
|
||||
println!(
|
||||
"The restore height of the internal Monero wallet is {}",
|
||||
restore_height
|
||||
);
|
||||
}
|
||||
Cmd::Multiaddresses => {
|
||||
let response = client.multiaddresses().await?;
|
||||
if response.multiaddresses.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue