Expand description
§CDK Wallet
The CDK Wallet is a high level Cashu wallet. The Wallet is for a single mint and single unit. Multiple Wallets can be created to support multi mints and multi units.
§Example
§Create Wallet
use std::sync::Arc;
use cdk::nuts::CurrencyUnit;
use cdk::wallet::Wallet;
use cdk_sqlite::wallet::memory;
use rand::random;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let seed = random::<[u8; 64]>();
let mint_url = "https://fake.thesimplekid.dev";
let unit = CurrencyUnit::Sat;
let localstore = memory::empty().await?;
let wallet = Wallet::new(mint_url, unit, Arc::new(localstore), seed, None);
Ok(())
}Re-exports§
pub use multi_mint_wallet::MultiMintReceiveOptions;pub use multi_mint_wallet::MultiMintSendOptions;pub use multi_mint_wallet::MultiMintWallet;
Modules§
- multi_
mint_ wallet - MultiMint Wallet
- payment_
request - Utilities for paying NUT-18 Payment Requests.
- subscription
- Client for subscriptions
- types
- Wallet Types
- util
- Wallet Utility Functions
Structs§
- Auth
Wallet - CDK Auth Wallet
- Base
Auth Http Client - Http Client
- Base
Http Client - Http Client
- Melt
Quote - Melt Quote Info
- Mint
Quote - Mint Quote Info
- Prepared
Send - Prepared send
- Receive
Options - Receive options
- Send
Memo - Send memo
- Send
Options - Send options
- Wallet
- CDK Wallet
- Wallet
Builder - Builder for creating a new
Wallet
Enums§
- Send
Kind - Send Kind
- Wallet
Subscription - Wallet Subscription filter
Traits§
- Auth
Mint Connector - Interface that connects a wallet to a mint. Typically represents an HttpClient.
- Http
Transport - Expected HTTP Transport
- Mint
Connector - Interface that connects a wallet to a mint. Typically represents an HttpClient.
Type Aliases§
- Auth
Http Client - Auth HTTP Client with async transport
- Http
Client - Http Client with async transport