Lightning made easy

Easy to use Bitcoin Lightning client backed by Fedimint. No node infrastructure required.

Installation

Add Blitzi to your Cargo.toml:

Cargo.toml
[dependencies]
blitzi = "0.3"

Quick Example

Rust
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?;

Features

Simple API

Straightforward async Rust API. Create invoices and send payments with just a few method calls.

No Node Required

No need to run Bitcoin or Lightning nodes. Fedimint handles the infrastructure complexity.

Federated Security

Built on Fedimint's federated ecash. Funds secured by multiple guardians instead of a single party.

Millisatoshi Precision

Support for amounts down to 1 millisatoshi (1/1000th of a satoshi) for micropayments.

Idempotent Payments

Safe retry logic built-in. Paying the same invoice twice returns the original payment result.

Balance Monitoring

Subscribe to real-time balance changes via async streams.

How It Works

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.

Resources

Documentation

Complete API documentation and guides at docs.rs/blitzi

Source Code

MIT licensed on GitHub

Package

Published on crates.io