Integration Guide
Khalani is non-custodial: users sign and submit on-chain transactions from their own wallets. Your integration is responsible for (1) requesting routes, (2) executing the returned wallet actions, and (3) tracking the resulting order lifecycle.
Who this is for
This section is written for:
Wallets and consumer apps that want to offer cross-chain swaps without running solver infrastructure
Aggregators who want an additional route source with a consistent deposit + tracking surface
Backend services that coordinate UI, quoting, deposits, and order status updates
If you are implementing solver/market-maker infrastructure, see Market Makers and Solvers instead.
Choose your integration approach
Direct API (HyperStream)
Any language / any stack
Call the REST endpoints directly
Most universal; easiest to embed into existing backends
Advanced / bespoke execution
Custom wallet UX and routing
Build your own wallet action executor
You still use deposit/build for canonical action ordering
HyperStream
HyperStream is a hosted Publishing Service for Khalani's cross chain intent markets. HyperStream exposes a set of APIs for integrators to make cross-chain intent publishing easier and streamlined.
HyperStream API integration end-to-end flow (happy path)
Quote
POST /v1/quotes→ receivequoteId+routes[]Build deposit plan
POST /v1/deposit/buildwith{ from, quoteId, routeId }→ receiveapprovals[]Execute wallet actions Execute
approvals[]in order using the user’s wallet (EVM or Solana)Submit deposit
PUT /v1/deposit/submitwith{ txHash, quoteId, routeId }→ receiveorderIdTrack
GET /v1/orders/{address}?orderIds={orderId}until terminal status
You can see the complete API reference.
Environments
Production API:
https://api.hyperstream.devWe don't currently operate a testnet
Production expectations
Treat
validBeforeon quotes as authoritative; do not execute deposits for expired quotes.Always execute
approvals[]in order; do not reorder or parallelize unless you fully understand the dependency chain.Track orders until terminal state and provide clear UX for refunds/timeouts/expiry.
Implement retry/backoff policies by error type (see Handling Exceptions).
Last updated

