Files
zeekay 5259787cb2 init: Lux openapi v1.0.0
Canonical OpenAPI v3.1 specification for the Lux core protocol APIs.
Pinned to node v1.28.5 (git commit 6ca9b391e9f907a523f8718e4e555bdd25afe4cd).

10 yaml files covering: P-Chain, X-Chain, C-Chain (primary EVM),
info, admin, health, metrics, keystore, warp, zap.

P-Chain spec documents the v1 atomic primitive platform.createSovereignL1
- registers a new sovereign L1 (network ID + genesis validator set
+ chain manifest + on-chain validator-manager address) in a single tx
that either lands wholly or reverts wholly.

Every method description cites the canonical implementation file:line.
Fixtures captured live from api.lux.network on 2026-05-31.

v1 is the lock. No deprecation surface. No v2.
2026-06-01 12:23:05 -07:00

2.0 KiB

AGENTS.md

Operator surface contract for ~/work/lux/openapi/.

What is stable

Every method, schema, error envelope, and example in every yaml file is Final. No method documented in v1.0.0 will change shape, change semantics, or be removed without a wholly new version (v2.0.0). There will be no v2.0.0; the contract is a permanent lock.

What is not stable

Nothing. v1 is the lock.

Rules for agents touching this directory

  1. Never edit a method in place to change shape. If a method needs a different shape, add a new method with a new name; never break the v1 surface.
  2. Never add deprecated: true. Methods are either Final (in v1) or wholly absent (in v2 — which does not exist).
  3. Never $ref across yaml files. Each file is fully self-contained.
  4. Never mention other brands. This spec describes the core protocol only.
  5. Every new fixture must be live. Capture from a real node; never fabricate.
  6. Every description cites file:line of the canonical implementation in ~/work/lux/node/.

Where the canonical implementation lives

Surface Path
P-Chain ~/work/lux/node/vms/platformvm/service.go
X-Chain ~/work/lux/node/vms/xvm/service.go
C-Chain ~/work/lux/evm/ (Coreth-derived)
info ~/work/lux/node/service/info/service.go
admin ~/work/lux/node/service/admin/service.go
health ~/work/lux/node/service/health/service.go
warp ~/work/lux/node/service/warp/service.go
keystore ~/work/lux/node/service/keystore/service.go
zap ~/work/lux/zap/

How to validate

make openapi-lint

make openapi-lint runs python3 scripts/validate_openapi.py which loads each yaml, asserts OpenAPI v3.1 shape, and asserts every fixture matches its declared schema.

How to refresh fixtures

make openapi-fixtures HOST=https://api.lux.network

This re-runs each fixture's recorded RPC against HOST and rewrites fixtures/*.json with the new response body. Diff before committing.