feat: cdk-cli

This commit is contained in:
thesimplekid
2024-06-08 23:59:48 +01:00
parent 1cc3fa794a
commit 5ebdd4f506
15 changed files with 654 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
use anyhow::Result;
use cdk::url::UncheckedUrl;
use cdk::HttpClient;
use clap::Args;
#[derive(Args)]
pub struct MintInfoSubcommand {
/// Cashu Token
#[arg(short, long)]
mint_url: UncheckedUrl,
}
pub async fn mint_info(sub_command_args: &MintInfoSubcommand) -> Result<()> {
let client = HttpClient::default();
let info = client
.get_mint_info(sub_command_args.mint_url.clone().try_into()?)
.await?;
println!("{:#?}", info);
Ok(())
}