Build on Lotus
Developers12.5.9+

Build on Lotus

Where to start when you write a wallet, an explorer, a bot, an indexer or mining software for Lotus: which interface to use, public nodes, and every developer page.

This section is for people who write software that talks to Lotus: wallets, explorers, bots, indexers, payment tools, mining software, browser pages. Everything here is served by lotusd itself. There is no separate indexer to install: a full node answers the REST API, the JSON-RPC, the push interfaces, the Chronik API of the older Lotus apps and the P2P protocol.

Pick an interface #

You are writingUsePage
A web page, a bot, a script, an explorerThe REST API under /api/v1 (JSON)REST API
Something that must react at once to payments and blocksThe WebSocket /api/v1/wsPush interfaces
An app built on chronik-client 0.x (Sendlotus, Lotus Vase, lotus-bot, the RANK extension)The Chronik API at /chronik/Chronik and the old explorer API
A light wallet that checks what it is toldP2P, with the address query and its merkle proofsP2P integration
A web page that follows the chain itselfThe browser node library lotus-node.jsBrowser node library
Node administration, mining, the node walletJSON-RPC (credentials)JSON-RPC
Votes, entities, tokens, files on chainThe protocol documents, then the module routesOn-chain protocols for developers

Public nodes #

You can start without running a node. These answer from mainnet; send nothing you would not send to any public server.

WhatURL
REST APIhttps://givelotus.org/api/v1
OpenAPI documenthttps://givelotus.org/api/v1/openapi.json
Push WebSocketwss://givelotus.org/api/v1/ws
Chronik (for chronik-client 0.x)https://chronik.givelotus.org/xpi (also https://givelotus.org/chronik)
P2P over WebSocket (browser node)wss://nng-116.givelotus.org:10605/p2p and the other fleet nodes (GET /api/v1/network/wsnodes)
P2P over TCPseed.givelotus.org:10605

Public nodes sit behind a reverse proxy that may answer 429 or 403 on its own. The proxy of givelotus.org refuses the default User-Agent of Python's urllib (Python-urllib/3.x): set one of your own. For anything that matters, run your own node (Docker is the quickest way) and point your software at it.

What is new for developers in this release #

ChangePage
The Chronik API and the old explorer API (/api/get..., /ext/...) are served again, for the older Lotus appsChronik and the old explorer API
Light clients can ask full nodes for the transactions of their addresses over P2P, with a merkle proof for eachP2P integration
GET /api/v1/upgrades says which release operators must run before the next upgradeNode state and upgrades
Blocks are kept in SQLite; new blockstore fields, the backupblockstore RPCOperators and tooling
The network map has names, countries, phones and direct links between appsNetwork map API
RANK data version 4: platform 0 is lotusia, entities (ENTY), social/decode, movers, windowsRANK and entities API
lotus-node.js 0.3.0: kept identity, direct links on by default, vouched transaction relayBrowser node library
VOIX messaging is in the node but off by default, and sending is refused on mainnetVOIX (testnet only)

The developer pages #

  1. Quick start: read the chain and send a transaction, on a public node and on your own regtest node.
  2. REST API: base URL, errors, pagination, caching, and the reference built from the OpenAPI document.
  3. Node state and upgrades: health, the warming-up answers, the block store, network upgrades and the required release.
  4. RANK and entities API and Network map API.
  5. Chronik and the old explorer API: what works with which chronik-client, and the known gaps.
  6. On-chain protocols for developers: RANK, ENTY, eMPP, SLP, ALP, BLOB and the POOL record, byte by byte.
  7. Browser node library: lotus-node.js options, events and types.
  8. P2P integration: protocol version, user agents, the messages a P2P client must tolerate, the address query with proofs, thin clients.
  9. Napoleon for integrators: what the chain accepts from 21 December 2026 and what that means for exchanges and wallets.
  10. Operators and tooling: the block store, backups, upgrade notices, Docker.
  11. JSON-RPC and Push interfaces.

Conventions on these pages #

  • Amounts are integers in satoshis unless a field says otherwise; 1 XPI is 1,000,000 satoshis.
  • Hashes and txids are written as hex in display order (as explorers show them), except where a byte layout says "internal byte order".
  • Examples use $API for a REST base URL, for example API=https://givelotus.org/api/v1 or API=http://127.0.0.1:12604/api/v1 for a regtest node.
  • New releases add fields to answers: ignore the ones you do not know. The /api/v1 routes and fields Lotus's own apps use are kept by a test of the release.
Source share/www/docs/developers.md in the lotusd repository
Checked against share/www/docs/sections.json src/api/api_server.cpp src/api/openapi_handler.cpp src/api/chronik_handler.cpp src/protocol.h share/www/lib/lotus-node.d.ts