cdk-cli 0.16.0-rc.0

Cashu cli wallet built on CDK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::Result;
use cdk::wallet::WalletRepository;
use cdk::Amount;

pub async fn mint_pending(wallet_repository: &WalletRepository) -> Result<()> {
    let wallets = wallet_repository.get_wallets().await;
    let mut total_amount = Amount::ZERO;

    for wallet in wallets {
        let amount = wallet.check_all_pending_proofs().await?;
        total_amount += amount;
    }

    println!("Amount: {total_amount}");

    Ok(())
}