Skip to content

Lexe SDK

Lexe runs self-custodial Lightning nodes in secure hardware: always online, hosted for free, and only the owner holds the keys. The Lexe SDK puts Lexe nodes in application code, so an app can create invoices, receive and send payments, and run a wallet for every user or agent, without running a node itself. The Showcase lists projects built on the SDK.

SDKs

Lexe CLI

Create and control always-online Lightning wallets from the command line. One command sets up a mainnet wallet. Every command outputs JSON, which suits scripts and agents.

Rust SDK

The most advanced SDK, for secure, reliable, high-performance applications. The Lexe app itself is built on the Rust SDK.

Python SDK

A simple interface for any Python application, or a wallet at a Python REPL.

Sidecar SDK

A local webserver that proxies REST requests to a Lexe node, so any language can integrate Lightning payments with HTTP calls alone.

Environments

Deployment recommendations for each runtime environment:

  • Servers: the Rust or Python SDK in the backend, or the sidecar or CLI from any other language.
  • Static sites: payments to a Lightning Address with no server, via the tip widget, LNURL-verify, or a serverless function.
  • Mobile and desktop: the Rust SDK through a Rust layer, or the sidecar bundled on desktop.
  • Browser extensions: a hosted sidecar, with Nostr Wallet Connect and a WASM SDK planned.

Authentication

The SDKs accept two kinds of credentials:

  • Root seed: the wallet's master secret, with full and irrevocable control. The right choice for a wallet the app owns, such as an embedded wallet or an agent's wallet.
  • Client credentials: scoped to what the app needs, revocable from the Lexe app, and soon limited by a spending budget. The right choice for a wallet someone else owns.

Protocols

  • LexeConnect: users connect their Lexe wallet to an app in one tap, granting exactly the scopes the app requests.
  • Pay with Lexe links: open a payment code directly in the Lexe app, from a site or app.