v.0.1.1
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 clients —
LnBotandAsyncLnBotwith 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 streaming —
wait_for_settlementfor real-time invoice events - Typed responses — frozen dataclasses with full type annotations (
py.typed) - Error hierarchy —
BadRequestError,UnauthorizedError,ForbiddenError,NotFoundError,ConflictError - Environment variable support —
LNBOT_API_KEY - Configurable timeouts — default 30s
Quick start
pip install lnbotfrom 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