OpenAPI 3.1 specification and Swagger UI for the Wanchain XFlows cross-chain swap & bridge API, hosted on Cloudflare Workers.
🔗 Live: https://xflows-open-api.wanscan.org 📄 Spec: https://xflows-open-api.wanscan.org/openapi.json
XFlows is Wanchain's decentralized cross-chain solution. It uses decentralized liquidity pools to perform native-to-native cross-chain asset transfers, aggregating WanBridge, XPort, QUiX, and other underlying protocols.
It supports 6 work modes:
| Mode | Flow |
|---|---|
| 1 | Direct bridge via WanBridge |
| 2 | Direct bridge via QUiX |
| 3 | Bridge → swap on destination chain |
| 4 | Bridge → Wanchain → swap → bridge out |
| 5 | Swap only (on Wanchain, or other chains via Rubic) |
| 6 | Swap on Wanchain → bridge out |
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v3/supported/chains |
List supported chains |
| GET | /api/v3/supported/tokens |
List supported tokens |
| GET | /api/v3/supported/pairs |
List direct-bridge token pairs |
| GET | /api/v3/supported/bridges |
List supported bridges (wanbridge, quix) |
| GET | /api/v3/supported/dexes |
List supported DEXes (wanchain, rubic) |
| POST | /api/v3/quote |
Get the best cross-chain swap quote |
| POST | /api/v3/buildTx |
Build wallet-ready transaction data |
| POST | /api/v3/status |
Query cross-chain transaction status |
The spec includes complete request/response examples for all 6 work modes and for buildTx payloads across EVM, Bitcoin, Cardano, Solana, SUI, and Tron source chains.
.
├── public/
│ ├── index.html # Swagger UI (loads /openapi.json from CDN)
│ └── openapi.json # OpenAPI 3.1 spec — single source of truth
├── wrangler.jsonc # Cloudflare Workers static-assets config
├── package.json # Scripts: dev / deploy / validate
└── .gitignore
The Cloudflare Worker is assets-only — no Worker script is required; public/ is served directly by Workers Static Assets.
bun install
bun run dev # http://localhost:8787Edit public/openapi.json — Swagger UI auto-reloads on refresh.
bun run validate # quick JSON parse check
bunx @redocly/cli lint public/openapi.json # full OpenAPI lintbun run deploy # wrangler deployThe production site is served at https://xflows-open-api.wanscan.org via a Cloudflare Workers custom domain. The *.workers.dev URL also works as a fallback. To bind another custom domain, add a routes block to wrangler.jsonc:
public/openapi.json is the only source of truth. The flow is:
- Edit
public/openapi.json. - Run
bunx @redocly/cli lint public/openapi.jsonto verify. - Run
bun run deploy.
- XFlows demo: https://github.com/wandevs/xflows-api-demo
- Wanchain docs: https://docs.wanchain.org
- OpenAPI 3.1 spec: https://spec.openapis.org/oas/v3.1.0
Documentation is proprietary to Wanchain. The repository scaffolding (Worker config, Swagger UI loader) is MIT-style — use freely.