mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 15:44:50 +01:00
feat: pending mints
This commit is contained in:
@@ -44,6 +44,8 @@ enum Commands {
|
||||
Balance,
|
||||
/// Pay bolt11 invoice
|
||||
Melt(sub_commands::melt::MeltSubCommand),
|
||||
/// Claim pending mints
|
||||
PendingMint,
|
||||
/// Receive token
|
||||
Receive(sub_commands::receive::ReceiveSubCommand),
|
||||
/// Send
|
||||
@@ -115,6 +117,7 @@ async fn main() -> Result<()> {
|
||||
Commands::Mint(sub_command_args) => {
|
||||
sub_commands::mint::mint(wallet, sub_command_args).await
|
||||
}
|
||||
Commands::PendingMint => sub_commands::pending_mints::pending_mints(wallet).await,
|
||||
Commands::Burn(sub_command_args) => {
|
||||
sub_commands::burn::burn(wallet, sub_command_args).await
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ pub mod decode_token;
|
||||
pub mod melt;
|
||||
pub mod mint;
|
||||
pub mod mint_info;
|
||||
pub mod pending_mints;
|
||||
pub mod receive;
|
||||
pub mod restore;
|
||||
pub mod send;
|
||||
|
||||
9
crates/cdk-cli/src/sub_commands/pending_mints.rs
Normal file
9
crates/cdk-cli/src/sub_commands/pending_mints.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use anyhow::Result;
|
||||
use cdk::wallet::Wallet;
|
||||
|
||||
pub async fn pending_mints(wallet: Wallet) -> Result<()> {
|
||||
let amount_claimed = wallet.check_all_mint_quotes().await?;
|
||||
|
||||
println!("Amount minted: {amount_claimed}");
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user