Skip to content

Releases: lnbotdev/rust-sdk

v1.0.0

05 Mar 18:26

Choose a tag to compare

v1.0.0 — Wallet-scoped API

Breaking changes

  • All wallet operations now go through client.wallet(wallet_id) instead of top-level methods
  • CreateWalletRequest removed — wallets().create() takes no parameters
  • wallets().current() removed — use client.wallet(id).get()
  • wallets().update() moved to client.wallet(id).update()
  • CreateWalletResponse no longer includes keys — only wallet_id, name, address
  • Invoice/payment/address/webhook/transaction/L402 resources moved under wallet scope

New features

  • Wallet-scoped APIclient.wallet(id) returns a Wallet handle with sub-resources: key(), invoices(), payments(), addresses(), transactions(), webhooks(), events(), l402()
  • Account registrationclient.register()
  • Identity checkclient.me()
  • Wallet key managementwallet.key().create(), .get(), .delete(), .rotate()
  • Public invoicesclient.invoices().create_for_wallet(), .create_for_address()
  • Payment target resolutionwallet.payments().resolve(target)

Testing

  • 117 unit tests
  • 20 integration tests (real API, real sats)

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