For the complete documentation index, see llms.txt. This page is also available as Markdown.

SDK Overview

Routing Engine SDK is a TypeScript/JavaScript client for Zert's routing API. Use it in front-end or back-end apps to discover chains/tokens/pairs, request quotes, run the swap signing flow, manage limit orders, and check transaction/system status.

The SDK talks only to Zert's backend at a fixed URL (DEFAULT_API_BASE_URL from the package; no runtime baseURL override). Pass api.apiKey so every request includes the x-api-key header. You can also set timeout, baseHeaders, and onError. It exposes a layer-based API (sdk.swap.build()) and flat methods (sdk.buildSwap()).

Documentation

Routing Engine SDK features include

  • Discovery endpoints - Fetch supported tokens, chains, and tradeable pairs.

  • Quote and swap flow - POST /quote, then build/sign/submit via 3 swap endpoints.

  • Limit orders - Create, get, cancel, replace, and list limit orders.

  • Status and health - Check transaction status and service health.

  • Optional configuration - timeout, baseHeaders, and global onError (fixed backend host; exports include DEFAULT_API_BASE_URL and API_KEY_HEADER).

  • Two API styles - Layer-based methods (sdk.swap.build()) or flat methods (sdk.buildSwap()).

  • Typed and promise-based — Full TypeScript types and consistent Promise-based async API.

Last updated