Releases: lnbotdev/rust-sdk
Releases · lnbotdev/rust-sdk
v0.5.0
What's new
- L402 paywall support —
client.l402().create_challenge(),client.l402().verify(),client.l402().pay() - Get/watch by payment hash —
get_by_hash()andwatch_by_hash()on invoices and payments - Removed
client.keys().list()— server endpoint removed (key listing is a local CLI operation)
Breaking changes
keys().list()removedApiKeyResponsetype removed
v0.4.0
v0.3.0
What's new
- Payment watch:
payments().watch()SSE stream for real-time payment events (settled/failed) - Unauthenticated invoice creation:
invoices().create_for_wallet()andinvoices().create_for_address()— no API key required - New types:
PaymentEvent,PaymentEventType,CreateInvoiceForWalletRequest,CreateInvoiceForAddressRequest,AddressInvoiceResponse
v.0.2.0
lnbot 0.2.0
Official Rust SDK for LnBot — Bitcoin for AI Agents.
Highlights
- Async-first — built on
reqwestwith nativeasync/await - Strongly typed —
InvoiceStatus,PaymentStatus, andTransactionTypeare real Rust enums, not strings - SSE streaming —
wait_for_settlementreturns aStreamof typed invoice events - Forward-compatible —
#[non_exhaustive]on all response types and#[serde(other)]on enums for safe API evolution - Builder pattern —
CreateInvoiceRequest::new(1000).memo("Coffee")with#[must_use]enforcement - Typed errors —
LnBotErrorenum withBadRequest,NotFound,Conflictvariants
Quick start
[dependencies]
lnbot = "0.2"
tokio = { version = "1", features = ["full"] }use lnbot::{LnBot, CreateInvoiceRequest};
#[tokio::main]
async fn main() -> Result<(), lnbot::LnBotError> {
let client = LnBot::new("key_...");
let invoice = client.invoices().create(
&CreateInvoiceRequest::new(1000).memo("Coffee"),
).await?;
println!("{}", invoice.bolt11);
Ok(())
}