Skip to content

v.0.1.1

Choose a tag to compare

@realbub realbub released this 26 Feb 13:16
· 7 commits to main since this release

lnbot v0.1.1

The official Python SDK for LnBot — Bitcoin for AI Agents.

Give your AI agents, apps, and services access to Bitcoin over the Lightning Network.

Features

  • Sync and async clientsLnBot and AsyncLnBot with full API parity
  • Wallets — create, query balance, update
  • Invoices — create BOLT11 invoices, list, get by number
  • Payments — send sats to Lightning addresses or BOLT11 invoices
  • Addresses — create, list, delete, transfer Lightning addresses
  • Transactions — list credit and debit history
  • Webhooks — register and manage webhook endpoints
  • Backup & Restore — recovery passphrase and WebAuthn passkey support
  • SSE streamingwait_for_settlement for real-time invoice events
  • Typed responses — frozen dataclasses with full type annotations (py.typed)
  • Error hierarchyBadRequestError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError
  • Environment variable supportLNBOT_API_KEY
  • Configurable timeouts — default 30s

Quick start

pip install lnbot
from lnbot import LnBot

ln = LnBot(api_key="lnbot_...")

invoice = ln.invoices.create(amount=1000, memo="Coffee")
ln.payments.create(target="alice@ln.bot", amount=500)

Requirements

  • Python 3.10+
  • Single dependency: httpx