# ln.bot — Complete Reference > Bitcoin Lightning wallet for AI agents. CLI, MCP Server, and REST API to send and receive sats. L402 paywall support for monetizing APIs. All pages are available as raw Markdown by adding .md to the URL (e.g. https://ln.bot/docs/quickstart.md). For a concise index with links, see https://ln.bot/llms.txt --- # ln.bot ln.bot gives any application — or any AI agent — a Bitcoin Lightning wallet. No node to run, no channels to manage, no protocol internals. You make API calls; ln.bot handles the infrastructure. ## What you get **A wallet with a Lightning address.** Every wallet gets an address like `agent01@ln.bot` that can receive sats from any Lightning wallet in the world. **Instant payments.** Send and receive sats in milliseconds. Internal transfers between ln.bot wallets are free. **Multiple interfaces.** CLI for humans, REST API for code, MCP server for AI agents, SDKs for TypeScript, Python, Go, Rust, and C#. **L402 support.** Built-in support for the L402 protocol — create challenges, verify tokens, and pay paywalls. Turn any API into a paid service without signup flows or billing. ## How agents use it An AI agent with an ln.bot wallet can: - **Receive payments** by sharing its Lightning address or generating invoices - **Send payments** to any Lightning address, LNURL, or BOLT11 invoice - **Pay for APIs** automatically when encountering L402 paywalls - **Monetize its own services** by gating endpoints behind L402 The [MCP server](/docs/mcp) connects AI agents (Claude, Cursor, etc.) directly to Lightning — the agent discovers available tools and calls them natively. ## Get started The fastest way to get going: ``` curl -fsSL https://ln.bot/install.sh | bash && lnbot init ``` This installs the CLI and creates your first wallet. From there: - [Quick Start](/docs/quickstart) — four steps to a working wallet - [CLI Reference](/docs/cli) — every command, with examples - [MCP Server](/docs/mcp) — connect an AI agent - [REST API](/docs/api) — programmatic access - [SDKs](/docs/sdks) — native libraries for five languages --- # Quick Start Four steps to a working Lightning wallet. ## 1. Install & Create Wallet One command installs the CLI and creates your first wallet. ```bash curl -fsSL https://ln.bot/install.sh | bash && lnbot init ``` ``` ✓ lnbot installed to /usr/local/bin ✓ wallet created: k9x2mwp ✓ lightning address: k9x2mwp@ln.bot ``` Your agent now has a Lightning identity. ## 2. Create an Invoice Generate a Lightning invoice to receive sats. ```bash lnbot invoice create --amount 1000 --memo "first invoice" ``` ``` ✓ invoice created amount: 1,000 sats bolt11: lnbc10u1pn... ``` Share the bolt11 string or Lightning address to get paid. ## 3. Make a Payment Pay another agent or any Lightning address. ```bash lnbot pay r7vq3np@ln.bot --amount 500 ``` ``` ✓ payment sent amount: 500 sats fee: 0 sats (ln.bot-to-ln.bot) ``` ln.bot-to-ln.bot transfers are instant and free. ## 4. Check Balance Verify your wallet state. ```bash lnbot balance ``` ``` wallet: k9x2mwp balance: 500 sats status: active ``` Your agent is live on Lightning. ## What's next - [CLI Reference](/docs/cli) — every command, with examples - [MCP Server](/docs/mcp) — connect an AI agent - [REST API](/docs/api) — programmatic access - [SDKs](/docs/sdks) — native libraries for five languages --- ### CLI Reference for the lnbot CLI covering setup, wallet management, payments, invoices, addresses, webhooks, keys, and MCP. Full reference: https://ln.bot/docs/cli.md --- ### MCP Server Model Context Protocol server for ln.bot — your AI agent discovers and calls Lightning wallet tools natively. Full reference: https://ln.bot/docs/mcp.md --- ### REST API REST API reference for ln.bot covering accounts, wallets, invoices, payments, addresses, webhooks, events, and L402. Full reference: https://ln.bot/docs/api.md --- ### SDKs Native SDK libraries for ln.bot — TypeScript, Python, Go, Rust, and C#. Plus L402 paywall middleware for Express.js and ASP.NET Core. Full reference: https://ln.bot/docs/sdks.md --- ## Learn - [The Agent-to-Agent Economy: How AI Agents Trade Services](https://ln.bot/learn/agent-economy.md): AI agents are learning to specialize, discover each other's capabilities, and settle payments in real time. The protocols, economic patterns, and open questions behind the emerging machine economy. - [x402 vs L402: Stablecoins vs Lightning for APIs](https://ln.bot/learn/x402-vs-l402.md): Compare x402 and L402 for API payments: USDC on EVM chains vs Bitcoin on Lightning, with different tradeoffs in speed, trust, and pricing. - [L402: Let Software Pay for Software](https://ln.bot/learn/l402-protocol.md): How L402 connects HTTP 402 to Lightning payments using invoices, macaroons, and stateless verification for paid APIs. - [Lightning Wallet as a Service for Apps and Agents](https://ln.bot/learn/wallet-as-a-service.md): What wallet as a service means for Lightning apps, AI agents, and platforms that need programmable Bitcoin wallets. - [Lightning Address: What It Is and How to Get One](https://ln.bot/learn/lightning-address.md): What a Lightning address is, how it works, where to get one, and how to set up your own on any domain. - [Lightning Network: How Bitcoin Payments Scale](https://ln.bot/learn/lightning-network-explained.md): How the Lightning Network makes Bitcoin payments instant and cheap, from channels and routing to wallets, invoices, and AI agents. ## Guides - [How to Build an AI Agent That Earns Bitcoin](https://ln.bot/guides/ai-agent-earns-money.md): Sell AI agent skills for Bitcoin micropayments with L402. Gate endpoints, charge per request, and let agents earn sats. - [AI Agent Bitcoin Wallets: MCP, SDK, and L402](https://ln.bot/guides/ai-agent-payments.md): Give an AI agent a Bitcoin wallet with ln.bot. Connect via MCP or SDK, send and receive sats, and pay L402 APIs automatically. - [Pay-Per-API-Call with Bitcoin Micropayments](https://ln.bot/guides/pay-per-api-call.md): Monetize any API with L402 and Lightning micropayments. Charge per request with no signup flow, API keys, or Stripe fees. ## Compare - [Alby Alternative for Developers and AI Agents](https://ln.bot/compare/alby.md): Looking for an Alby alternative? Compare Alby Hub and ln.bot for Lightning wallets, APIs, pricing, and AI agent support. - [OpenNode vs ln.bot for Lightning APIs](https://ln.bot/compare/opennode.md): Compare OpenNode and ln.bot for Lightning payments, wallet APIs, L402 support, and AI agent use cases. - [Strike API vs ln.bot for Lightning APIs](https://ln.bot/compare/strike-api.md): Compare Strike API and ln.bot for Lightning payments, KYC requirements, fiat rails, wallet APIs, and AI agents. - [ZBD vs ln.bot: Lightning Developer API Comparison](https://ln.bot/compare/zbd.md): Compare ZBD and ln.bot for Lightning wallets, gaming payouts, L402 support, and AI agent use cases. ## Legal - [Privacy Policy](https://ln.bot/legal/privacy.md): What ln.bot collects, what it doesn't, and how data moves through the system. - [Terms of Service](https://ln.bot/legal/terms.md): The rules of engagement for using ln.bot infrastructure, APIs, and wallets.