mirror of
https://github.com/luxfi/openapi.git
synced 2026-10-30 15:23:31 +00:00
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.
2.0 KiB
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
- 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.
- Never add
deprecated: true. Methods are either Final (in v1) or wholly absent (in v2 — which does not exist). - Never
$refacross yaml files. Each file is fully self-contained. - Never mention other brands. This spec describes the core protocol only.
- Every new fixture must be live. Capture from a real node; never fabricate.
- Every
descriptioncites 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.