destinationChainId tells the Route API, or a bundle bridge action, which chain the output should land on. Omit it when the route should stay on the source chain.
Definition
Cross-chain routing needs two chain identifiers: the source chain, where the user signs, and the destination chain, where the output should arrive. destinationChainId is the destination identifier.
How it works
The source
chainIdselects the network for the signed transaction.destinationChainIdselects the network fortokenOutand the receiver.The service returns a source-chain transaction. Delivery on the destination chain is a later stage, tracked with bridge status.
The destination token address and receiver must belong to that destination chain. A Solana receiver, for example, is not an EVM address.
How Enso does this
On POST https://api.enso.build/api/v1/shortcuts/route, set chainId to the source chain and destinationChainId to the destination. In a Bundle, set destinationChainId on the bridge action. Solana’s current Enso identifier is 1861167595 and is used only as a destination, not as chainId. See Crosschain Routing and Solana routing. Confirm live chain coverage with Supported Networks.
FAQ
Do I need destinationChainId for a same-chain swap?
No. Leave it unset when tokenIn and tokenOut are on the same chain as chainId.
Can I use Solana as chainId?
No. Use 1861167595 only as destinationChainId. Enso does not originate Route requests on Solana.
Related articles
What is destination-chain delivery?
How do I add cross-chain swaps to my app?
Can I route assets to Solana with Enso?
What is cross-chain routing?
How do I see which chains and protocols Enso supports?
