Intent relay API + WebSocket feed for Vortex Protocol.
TypeScript / NestJS service that brokers swap intents
between users and the solver network and streams the live intent feed. Part
of the multi-repo Vortex stack — see also
vortex-contract and
vortex-frontend.
The relay currently uses an in-memory store and mock data. Read-only Soroban RPC access is live (
/api/v1/chain/*); writing intent state on-chain is still on the roadmap.
Rebuild complete: the service has been ported from Express to NestJS. All endpoints below are live.
GET /api/v1/intents — list intents (filter by state, user, chain)
GET /api/v1/intents/open — all open intents (solver view)
GET /api/v1/intents/:id — single intent
GET /api/v1/intents/user/:addr — intents for a user
POST /api/v1/intents — create intent
POST /api/v1/intents/:id/accept — solver accepts
POST /api/v1/intents/:id/fill — solver fills
POST /api/v1/intents/:id/cancel — user cancels
POST /api/v1/intents/quote — get best quote from solvers
GET /api/v1/solvers — solver leaderboard
GET /api/v1/solvers/:addr/stats — solver performance stats
GET /api/v1/tokens — supported tokens (filter by chain)
GET /api/v1/stats — protocol stats
GET /health — service health
WS /ws — real-time intent feed
GET /docs — Swagger / OpenAPI docs
GET /api/v1/chain/health — Soroban RPC health (read-only)
GET /api/v1/chain/ledger — latest Soroban ledger
GET /api/v1/chain/network — Soroban network info
GET /api/v1/chain/account/:key — Stellar account lookup
- Node.js 20+
npm install
cp .env.example .env
npm run dev # http://localhost:4000| Script | Description |
|---|---|
npm run dev |
Watch-mode Nest server (nest start --watch) |
npm run build |
Build the Nest app (dist/) |
npm run start |
Run compiled server (dist/main.js) |
npm run lint |
ESLint over src |
npm run typecheck |
tsc --noEmit |
npm run test |
Run the unit test suite |
npm run test:e2e |
Run the e2e test suite (supertest against a real booted app) |
npm run solver:demo |
Run the reference solver bot (scripts/README.md) |
docker build -t vortex-backend .
docker run -p 4000:4000 vortex-backendNo .env is required to boot — ConfigModule's validation schema supplies
defaults for every variable. Pass real values with --env-file .env or -e
flags to override them.
- Soroban RPC reads — health/ledger/network/account lookups via
/api/v1/chain/* - On-chain writes — replace the in-memory intent store with real Soroban transactions
- Solver WS client — reference implementation for a solver bot (
npm run solver:demo, seescripts/README.md)
See the org-wide CONTRIBUTING.md.
MIT © 2025 Vortex Protocol Contributors