mirror of
https://github.com/luxfi/dex.git
synced 2026-09-24 00:26:31 +00:00
The clean-room posture is worth keeping; the surface it described had moved. Settlement is 0x9999, which carries the V4 PoolManager ABI this path already encodes. The LXPool precompile at 0x9010 it pointed to is deprecated — eth_getCode returns empty for it on mainnet, so the calls it built went to an address with no code behind it. FIX is FIXT.1.1 at the session layer and FIX.5.0SP2 (EP307) at the application layer. pkg/fix asserts Parse errors on 8=FIX.4.4 and 8=FIX.4.2, so the 4.4 profile advertised here could not open a session. The ws subpath now says nothing serves it: pkg/api compiles and is tested, but NewWebSocketServer and NewVenueWS have no caller outside those tests and no binary in cmd/ imports the package. A client for a listener nobody started is worth shipping only if it says so. zap and the precompile path were checked the same way and both reach something live. Co-authored-by: Hanzo Dev <[email protected]>
@luxfi/dex-sdk
Clean-room BSD-3-Clause TypeScript client for the Lux DEX. One client vocabulary over the four DEX paths:
| Subpath | Path | Engine source | Use |
|---|---|---|---|
@luxfi/dex-sdk/precompile |
V4 on-chain | Settlement precompile 0x9999 (LP-9999) |
On-chain settlement via the MIT @luxfi/exchange ABIs + viem |
@luxfi/dex-sdk/zap |
Binary OrderBook wire | pkg/zapwire |
Lowest-latency take/place |
@luxfi/dex-sdk/fix |
FIXT.1.1 / FIX.5.0SP2 | pkg/fix |
Institutional order entry |
@luxfi/dex-sdk/ws |
JSON WebSocket | pkg/api |
No server runs this today — see Status |
License & provenance
BSD-3-Clause (Copyright (C) 2019-2026, Lux Industries Inc.). Written
clean-room: no Uniswap/GPL-derived code. Runtime dependencies are MIT
(@luxfi/exchange, viem). This package is the non-GPL client surface the apps
import; the GPL-3.0 Uniswap-interface forks live in the luxexchange org and
are never a dependency of this SDK.
Status
Scaffold: types + path-uniform client interfaces + frozen wire constants (grounded in the engine). Codec/transport bodies land in the implementation pass. Typechecks under TypeScript 5.9 strict.
What each path can reach today, checked against the tree and the chain rather than assumed:
- precompile — live.
eth_getCodeat0x9999returns code on Lux mainnet, and the address dispatches the V4PoolManagerselectors this path encodes. - zap — live.
pkg/zapwireis the frozendex_*wiredexdserves in standalone mode, andcmd/dexbenchdrives it. - fix — live.
pkg/fixspeaks FIXT.1.1 at the session layer and FIX.5.0SP2 (Extension Pack 307) at the application layer. - ws — no server.
pkg/apicompiles and is tested, but nothing constructsNewWebSocketServerorNewVenueWSoutside its own tests, and no binary incmd/imports the package. Treat this subpath as a client for a listener that has not been stood up.