Skip to main content

lnbot/
lib.rs

1//! # lnbot
2//!
3//! Official Rust SDK for [LnBot](https://ln.bot) — Bitcoin for AI Agents.
4//!
5//! Give your AI agents, apps, and services access to Bitcoin over the Lightning
6//! Network. Create wallets, send and receive sats, and get real-time payment
7//! notifications.
8//!
9//! # Quick start
10//!
11//! ```no_run
12//! # async fn example() -> Result<(), lnbot::LnBotError> {
13//! use lnbot::{LnBot, CreateInvoiceRequest};
14//!
15//! let client = LnBot::new("uk_...");
16//! let w = client.wallet("wal_...");
17//! let invoice = w.invoices().create(&CreateInvoiceRequest::new(1000)).await?;
18//! println!("{}", invoice.bolt11);
19//! # Ok(())
20//! # }
21//! ```
22
23pub mod client;
24pub mod errors;
25pub mod resources;
26pub mod types;
27
28pub use client::{LnBot, Wallet};
29pub use errors::LnBotError;
30pub use types::*;