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.
# install the SDK npm install @lumen/sdk
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());
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