Home / Docs

Build with Lumen.

A typed SDK for wallets, swaps, and onchain payments across nine networks. Ship a self-custodial flow in an afternoon.

// Quickstart

Three steps to onchain

Install the SDK, create a self-custodial wallet, and make your first swap — without ever touching a private key on your servers.

1 · Install

Add the Lumen SDK to your app with one command.

2 · Authenticate

Create a project key in the dashboard and initialise.

3 · Transact

Create a wallet and route a best-price swap.

terminal
# install the SDK
npm install @lumen/sdk
wallet.ts
import { Lumen } from '@lumen/sdk';

const lumen = new Lumen({ apiKey: process.env.LUMEN_KEY });

// keys are generated on-device; we never see them
const wallet = await lumen.wallets.create({ network: 'base' });

const quote = await lumen.swaps.quote({
  from: 'ETH', to: 'USDC', amount: 1.0,
});
await wallet.send(quote.bestRoute());
// REST reference

Core endpoints

POST/v1/walletsCreate a self-custodial wallet
GET/v1/wallets/:id/balancesFetch multi-chain balances
POST/v1/swaps/quoteBest-price route across DEXs
POST/v1/paymentsAccept a stablecoin payment
GET/v1/networksList supported networks

Ready to ship?

Grab a project key and make your first onchain call in minutes.

Get an API key