mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 15:44:50 +01:00
@@ -2,6 +2,7 @@ use anyhow::Result;
|
||||
use cdk::url::UncheckedUrl;
|
||||
use cdk::HttpClient;
|
||||
use clap::Args;
|
||||
use url::Url;
|
||||
|
||||
#[derive(Args)]
|
||||
pub struct MintInfoSubcommand {
|
||||
@@ -9,8 +10,11 @@ pub struct MintInfoSubcommand {
|
||||
mint_url: UncheckedUrl,
|
||||
}
|
||||
|
||||
pub async fn mint_info(sub_command_args: &MintInfoSubcommand) -> Result<()> {
|
||||
let client = HttpClient::default();
|
||||
pub async fn mint_info(proxy: Option<Url>, sub_command_args: &MintInfoSubcommand) -> Result<()> {
|
||||
let client = match proxy {
|
||||
Some(proxy) => HttpClient::with_proxy(proxy, None, true)?,
|
||||
None => HttpClient::new(),
|
||||
};
|
||||
|
||||
let info = client
|
||||
.get_mint_info(sub_command_args.mint_url.clone().try_into()?)
|
||||
|
||||
Reference in New Issue
Block a user