Node HTTP API
Endpoints, parameters and results of a statement-v4 node, plus the restricted public gateway.
Node endpoints#
The node serves a v4 state directory. Every list is paged. Every response carries the header X-Lathen-Height.
| Route | Parameters | Result |
|---|---|---|
GET /state | Height, tip, roots, counts, frontier and the rule in force. On a one-validator chain it also carries a notice that one key orders everything. | |
GET /protocol | Constants for wallets: domain, root window, oldest accepted root height, envelope size, market settings | |
GET /blocks | from, limit | Signed blocks with proofs; at most 16 and 64 MiB per page |
GET /headers | from, limit | Signed headers; at most 512 |
GET /effects | from, limit | Per block, without proofs; at most 64 |
GET /tape | after, limit | Public trade tape entries with seq > after; at most 512. /trades is the same. |
GET /transactions/<id> | Height, index, time, block commitment, first leaf position, leaf count | |
GET /assets | after, limit | Issued plain assets |
GET /launches | after, limit | Launch records |
GET /pools, GET /pools/<id> | Pool list and one pool | |
GET /market | The whole market state in one response (a wallet caps it at 4 MiB) | |
POST /transactions | body below | On the block producer. Returns { height, commitment, replicated, id, index, time }. |
POST /blocks | A freshly proposed signed block |
Submissions that arrive together go into one block; a rejected one does not affect the others. A follower catches up in pages that overlap its tip by one block and treats any mismatch as a conflict.
Submitting#
{ "proofs": ["<receipt>"], "journals": ["<1336 hex>"], "envelopes": ["<base64>"], "launch": {} }- One proof for
SPEND,ISSUANCE,POOL_BUY,POOL_SELLorLAUNCH; two proofs, role 0 first, for both halves of one exchange. journals[k]is the journal claimed forproofs[k]; the verified journal must equal it exactly.envelopes: two per proof, plus one more for a pool intent. Each starts withLNR1and the chain id.launch: required for a launch, refused otherwise; at most 4,096 bytes of canonical JSON.- Transaction id: a tagged hash of the one or two journals.
A 400 answer carries one of a fixed set of strings, for example Nullifier already spent or repeated, Exchange half requires its counterpart and Proof verification failed. A follower answers a submission with Submit transactions to the proposer.
Public gateway#
A separate gateway lets a node serve other people's wallets. It is code only; the launcher does not start it, and it speaks plain HTTP.
| Private mode | Public mode | |
|---|---|---|
| Bind | Loopback only, no override | Loopback by default; another address needs an explicit flag |
| Reads | Everything the node offers | An allow-list: /state, /protocol, /upgrades, /blocks, /headers, /effects, /tape, /trades, /transactions/<id>, /assets, /launches, /market, /pools, /pools/<id> |
| Writes | POST /transactions, POST /blocks | POST /transactions only |
| Admin, block push, peers | As the node allows locally | Do not exist (404) |
| Limits | The node's own | Per address: 20 reads per second (burst 40), 6 submissions per minute, 8 concurrent; 2 MiB submission body; 512-byte URL; 256 connections |
| Forwarded client headers | None | None: no X-Forwarded-For, no User-Agent, no cookies |
| Browser origins | Refused | Refused; no CORS header is ever sent |
| Logging | None | None, as a property of this code. The operator can still record addresses outside it. |
Wallet gateway#
Each wallet runs a gateway for its own page. It is loopback only, with a host allow-list, a local-origin check, a session token in the X-Wallet-Token header, JSON bodies only and bounded sizes. It is a local interface, not a service to build on.