Easy to use Bitcoin Lightning client backed by Fedimint. No node infrastructure required.
Add Blitzi to your Cargo.toml:
[dependencies]
blitzi = "0.3"
use blitzi::{Amount, Blitzi};
use blitzi::lightning_invoice::Bolt11Invoice;
use std::str::FromStr;
// Create client with default settings
let blitzi = Blitzi::new().await?;
// Generate a Lightning invoice
let invoice = blitzi
.lightning_invoice(Amount::from_msats(1000), "Payment")
.await?;
// Wait for payment
blitzi.await_incoming_payment(&invoice).await?;
// Pay an invoice
let invoice = Bolt11Invoice::from_str("lnbc...")?;
let preimage = blitzi.pay(&invoice).await?;
Straightforward async Rust API. Create invoices and send payments with just a few method calls.
No need to run Bitcoin or Lightning nodes. Fedimint handles the infrastructure complexity.
Built on Fedimint's federated ecash. Funds secured by multiple guardians instead of a single party.
Support for amounts down to 1 millisatoshi (1/1000th of a satoshi) for micropayments.
Safe retry logic built-in. Paying the same invoice twice returns the original payment result.
Subscribe to real-time balance changes via async streams.
Blitzi uses Fedimint, an open source federated ecash mint on Bitcoin. Each federation is run by multiple guardians who jointly secure funds. No single guardian can steal funds - only a majority coalition could compromise security.
The default federation is E-Cash Club, suitable for testing and small amounts. For production use, choose your own federation based on your trust requirements. Find available federations at Fedimint Observer.
Complete API documentation and guides at docs.rs/blitzi
MIT licensed on GitHub
Published on crates.io