Skip to content

Releases: lnbotdev/rust-sdk

v0.5.0

27 Feb 18:12

Choose a tag to compare

What's new

  • L402 paywall supportclient.l402().create_challenge(), client.l402().verify(), client.l402().pay()
  • Get/watch by payment hashget_by_hash() and watch_by_hash() on invoices and payments
  • Removed client.keys().list() — server endpoint removed (key listing is a local CLI operation)

Breaking changes

  • keys().list() removed
  • ApiKeyResponse type removed

v0.4.0

27 Feb 15:53

Choose a tag to compare

What's new

  • Wallet event stream: events().stream() — real-time SSE stream of all wallet activity
  • preimage field added to InvoiceResponse and PaymentResponse
  • service_fee field added to PaymentResponse
  • New type: WalletEvent

v0.3.0

27 Feb 14:57

Choose a tag to compare

What's new

  • Payment watch: payments().watch() SSE stream for real-time payment events (settled/failed)
  • Unauthenticated invoice creation: invoices().create_for_wallet() and invoices().create_for_address() — no API key required
  • New types: PaymentEvent, PaymentEventType, CreateInvoiceForWalletRequest, CreateInvoiceForAddressRequest, AddressInvoiceResponse

v.0.2.0

26 Feb 14:25

Choose a tag to compare

lnbot 0.2.0

Official Rust SDK for LnBot — Bitcoin for AI Agents.

Highlights

  • Async-first — built on reqwest with native async/await
  • Strongly typedInvoiceStatus, PaymentStatus, and TransactionType are real Rust enums, not strings
  • SSE streamingwait_for_settlement returns a Stream of typed invoice events
  • Forward-compatible#[non_exhaustive] on all response types and #[serde(other)] on enums for safe API evolution
  • Builder patternCreateInvoiceRequest::new(1000).memo("Coffee") with #[must_use] enforcement
  • Typed errorsLnBotError enum with BadRequest, NotFound, Conflict variants

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(())
}

Links