st = route.transactionRequest;
// Canton routes return a deposit address and order hash
// The order hash is used as a transfer memo when sending funds
const depositAddress = transactionRequest.target;
const orderHash = transactionRequest.data;
console.log("\n=== Canton Deposit Details ===");
console.log(`Deposit Address: ${depositAddress}`);
console.log(`Order Hash (Memo): ${orderHash}`);
console.log(`Amount: ${fromAmount} (in smallest unit)`);
console.log("\nSend the specified amount to the deposit address above");
console.log("using your Canton wallet. Include the order hash as the");
console.log("transfer memo (reason field).");
console.log("==============================\n");
// Track transaction status
console.log("Waiting for deposit and tracking swap status...");
await updateTransactionStatus(requestId as string, quoteId);
console.log(`Track on Squid Scanner: https://scan.squidrouter.com`);
})();
```
### API Code Examples
| Route | Example |
| ------------ | --------------------------------------------------------------------------------------- |
| Canton → EVM | [cantonToEVMSwap](https://github.com/0xsquid/examples/tree/main/V2/api/cantonToEVMSwap) |
***
## SDK Integration
The Squid SDK provides the same Canton routing capabilities. After initializing the SDK, use `squid.getRoute()` with the same parameters, then execute the transaction natively on the Canton network.
> **Note:** Because Canton is not EVM-compatible, `squid.executeRoute()` cannot be used directly. Canton transactions must be executed natively — either through a connected Canton wallet or by sending funds to the deposit address.
```typescript
// Canton to EVM Swap Using Squid SDK (Squid Intents)
import { Squid } from "@0xsquid/sdk";
import * as dotenv from "dotenv";
dotenv.config();
// Load environment variables
const cantonAddress: string = process.env.CANTON_ADDRESS!;
const integratorId: string = process.env.INTEGRATOR_ID!;
// Define swap parameters
const fromChainId = "canton";
const fromToken =
"DSO::1220b1431ef217342db44d516bb9befde802be7d8899637d290895fa58880f19accc"; // Canton Coin (CC)
const fromAmount = "10000000000"; // 1 CC (Canton Coin uses 10 decimals)
const toChainId = "8453"; // Base
const toToken = "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"; // USDC on Base
// Initialize the Squid SDK
const getSDK = (): Squid => {
const squid = new Squid({
baseUrl: "https://v2.api.squidrouter.com",
integratorId: integratorId,
});
return squid;
};
(async () => {
const squid = getSDK();
await squid.init();
console.log("Initialized Squid SDK");
console.log(`Canton address: ${cantonAddress}`);
const params = {
fromAddress: cantonAddress,
fromChain: fromChainId,
fromToken: fromToken,
fromAmount: fromAmount,
toChain: toChainId,
toToken: toToken,
toAddress: "0xYourEVMAddress", // Replace with your destination EVM wallet
quoteOnly: false,
};
console.log("Parameters:", params);
// Get the swap route
const { route, requestId } = await squid.getRoute(params);
// Extract quoteId for Squid Intents transactions
const quoteId =
(route as any).estimate?.actions?.[0]?.coralV2Order?.quoteId ||
(route as any).estimate?.quoteId ||
(route as any).quoteId;
console.log("Calculated route. Target output:", route.estimate.toAmount);
console.log("requestId:", requestId);
console.log("quoteId:", quoteId);
const transactionRequest = route.transactionRequest as any;
// Canton routes return a deposit address and order hash
const depositAddress = transactionRequest.target;
const orderHash = transactionRequest.data;
console.log("\n=== Canton Deposit Details ===");
console.log(`Deposit Address: ${depositAddress}`);
console.log(`Order Hash (Memo): ${orderHash}`);
console.log(`Amount: ${fromAmount} (in smallest unit)`);
console.log("\nSend the specified amount to the deposit address above");
console.log("using your Canton wallet. Include the order hash as the");
console.log("transfer memo (reason field).");
console.log("==============================\n");
// Track status using the SDK
const getStatusParams: any = {
requestId: requestId,
integratorId: integratorId,
fromChainId: fromChainId,
toChainId: toChainId,
quoteId: quoteId,
};
const completedStatuses = ["success", "partial_success", "needs_gas", "not_found"];
const maxRetries = 30;
let retryCount = 0;
console.log("Waiting for deposit and tracking swap status...");
let status;
do {
try {
await new Promise((resolve) => setTimeout(resolve, 5000));
status = await squid.getStatus(getStatusParams);
console.log(`Route status: ${status.squidTransactionStatus}`);
} catch (error: unknown) {
if (error instanceof Error && (error as any).response?.status === 404) {
retryCount++;
if (retryCount >= maxRetries) {
console.error("Max retries reached.");
break;
}
continue;
} else {
throw error;
}
}
} while (
status &&
!completedStatuses.includes(status.squidTransactionStatus as string)
);
console.log("Swap fully confirmed!");
console.log(`Track on Squid Scanner: https://scan.squidrouter.com`);
})();
```
### SDK Code Examples
| Route | Example |
| ------------ | --------------------------------------------------------------------------------------- |
| Canton → EVM | [cantonToEVMSwap](https://github.com/0xsquid/examples/tree/main/V2/sdk/cantonToEVMSwap) |
***
## Transaction Handling
### Deposit Address Flow
The Squid route response for Canton returns a `transactionRequest` with:
| Field | Description |
| -------- | -------------------------------------------------- |
| `target` | The deposit address — send funds here |
| `data` | The order hash — include this as the transfer memo |
| `type` | `DEPOSIT_ADDRESS_DIRECT_TRANSFER` |
```typescript
const depositAddress = transactionRequest.target;
const orderHash = transactionRequest.data; // Use as transfer memo
```
### Connected Wallet Flow (Widget)
For browser-based integrations using the Squid Widget, Canton swaps are executed through the connected Canton wallet:
1. The route's order hash is used as the transfer memo
2. A Splice token-standard transfer is built via the `TransferFactory`
3. The transfer is submitted through the wallet's `prepareExecuteAndWait` method
4. The memo field key is `splice.lfdecentralizedtrust.org/reason`
> For widget integration, Canton wallet connection and transaction execution are handled automatically. See the [Widget Integration](/widget-integration/add-a-widget/widget) guide.
***
## Status Tracking
Canton routes are powered by Squid Intents, which **requires** the `quoteId` for status polling.
```typescript
const statusParams = {
fromChainId: "canton",
toChainId: "8453",
transactionId: transactionId,
quoteId: quoteId, // Required for Squid Intents
};
const result = await axios.get("https://v2.api.squidrouter.com/v2/status", {
params: statusParams,
headers: {
"x-integrator-id": "<your-integrator-id>",
},
});
```
### Extracting the quoteId
The `quoteId` may appear in several locations within the route response. Use a fallback chain to extract it reliably:
```typescript
const quoteId = route?.estimate?.actions?.[0]?.coralV2Order?.quoteId
|| route?.estimate?.quoteId
|| route?.quoteId;
```
> **Important:** A Squid Intents transaction will not be tracked correctly unless status is polled with the `quoteId`. See the [Integrating Squid Intents](/api-and-sdk-integration/coral-intent-swaps/integrating-squid-intents) guide for full status polling details.
***
## Important Notes
1. **Canton is not EVM-compatible** — Canton uses Daml smart contracts, not Solidity. Standard EVM tooling (`ethers.js`, MetaMask) does not work with Canton. Use a CIP-103-compatible Canton wallet for browser interactions.
2. **Deposit address with memo** — Canton routes return a deposit address and order hash. The order hash must be included as the transfer memo when sending funds. Omitting the memo will cause the swap to fail.
3. **Balances are private** — Canton balances can only be read through a connected wallet's ledger API. Address-only balance lookups are not supported.
4. **Canton wallet required** — Compatible browser wallets include Cantor8 (C8), Send Wallet, and Nightly. Wallets connect via the CIP-103 discovery protocol.
5. **`quoteId` is required for status polling** — All Squid Intents transactions require the `quoteId` parameter when calling the `/v2/status` endpoint.
For a full reference of all transaction types across all chains, see the [Transaction Types](/api-and-sdk-integration/key-concepts/transaction-types) page.
# Supported Chains and Tokens
{% hint style="info" %}
See all our supported chains and tokens at [https://app.squidrouter.com](https://v2.app.squidrouter.com)
{% endhint %}
{% tabs %}
{% tab title="SDK" %}
```typescript
// access using squid.tokens
const fromToken = squid.tokens.find(
(t) =>
t.symbol.toLocaleLowerCase() === "USDC" && t.chainId === "1"
);
// access using squid.chains
const fromChain = squid.chains.find(
(c) =>
c.chainId === "1"
);
```
{% endtab %}
{% tab title="API" %}
```typescript
const getChains = async () => {
const result = await axios.get('https://v2.api.squidrouter.com/v2/chains', {
headers: {
'x-integrator-id': integratorId,
},
});
return result.data;
};
const getTokens = async () => {
const result = await axios.get('https://v2.api.squidrouter.com/v2/tokens', {
headers: {
'x-integrator-id': integratorId,
},
});
return result.data;
};
```
{% endtab %}
{% tab title="Widgets" %}
Every widget will automatically pull down all Squid's supported tokens and chains.
You can limit the available tokens and chains using this guide:[Default Chains and Tokens](/old-v2-documentation-deprecated/add-a-widget/widget/customization-guide/default-chains-and-tokens)
{% endtab %}
{% endtabs %}
***
## POST Endpoints: Dynamic Field Selection
The API also exposes POST versions of `/v2/tokens`, `/v2/chains`, and `/v2/sdk-info` that let you request only the fields you need, reducing payload size and improving bandwidth efficiency. The existing GET endpoints remain unchanged.
{% hint style="info" %}
**PR**: [#1876 - Update sdk-info, tokens, and chains controllers](https://github.com/0xsquid/squid-api/pull/1876)
{% endhint %}
### How It Works
* Send a `fields` array in the POST body to specify which fields to return.
* Fields containing dots (e.g. `chain.internalRpc`) are **rejected** with a `400` error to prevent nested property access.
* If the requested fields don't exist on an object, the empty object is excluded from the response.
### POST `/v2/tokens`
```json
// Request
{ "fields": ["symbol", "address", "chainId", "decimals", "usdPrice"] }
// Response
{
"tokens": [
{ "symbol": "ETH", "address": "0xeee...eee", "chainId": "1", "decimals": 18, "usdPrice": 3200.50 }
]
}
```
Optional query parameters (e.g. `?chainId=1`) work the same as the GET endpoint.
### POST `/v2/chains`
```json
// Request
{ "fields": ["chainId", "chainName", "networkName", "chainIconURI"] }
// Response (single chain via ?chainId=1)
{
"chain": { "chainId": "1", "chainName": "Ethereum", "networkName": "ethereum", "chainIconURI": "https://..." }
}
// Response (all chains)
{
"chains": [
{ "chainId": "1", "chainName": "Ethereum", "networkName": "ethereum" }
]
}
```
### POST `/v2/sdk-info`
Requires **both** `tokenFields` and `chainFields`:
```json
// Request
{
"tokenFields": ["symbol", "address", "chainId", "decimals"],
"chainFields": ["chainId", "chainName", "chainIconURI"]
}
// Response
{
"chains": [{ "chainId": "1", "chainName": "Ethereum", "chainIconURI": "https://..." }],
"tokens": [{ "symbol": "ETH", "address": "0xeee...", "chainId": "1", "decimals": 18 }],
"axelarscanURL": "https://axelarscan.io/",
"isInMaintenanceMode": false
}
```
### Error Responses
All POST endpoints return `400 BAD_REQUEST` for validation failures:
| Scenario | Error Message |
| ----------------------------------------------- | ------------------------------------------------------------------------------ |
| Missing or empty `fields` array | Fields array is required and must contain at least one field |
| All fields are blocked | All requested fields are blocked. Please provide at least one valid field. |
| Nested field paths (dots) | Nested field paths are not allowed. Please provide only top-level field names. |
| sdk-info missing `tokenFields` or `chainFields` | Both tokenFields and chainFields must be provided with at least one field each |
### Behavior Notes
* **Sorting preserved** — field filtering applies after sorting, so ordering is correct regardless of selected fields.
* **Feature flags enforced** — chain/token access restrictions are applied before field filtering.
* **Future-proof** — new fields on data models are automatically available via POST (unless blocked).
***
### Supported Chains
| networkIdentifier | chainId | type |
| ----------------- | ------------------- | ------- |
| ethereum | 1 | evm |
| arbitrum | 42161 | evm |
| avalanche | 43114 | evm |
| optimism | 10 | evm |
| polygon | 137 | evm |
| base | 8453 | evm |
| linea | 59144 | evm |
| binance | 56 | evm |
| mantle | 5000 | evm |
| fantom | 250 | evm |
| moonbeam | 1284 | evm |
| celo | 42220 | evm |
| scroll | 534352 | evm |
| kava | 2222 | evm |
| filecoin | 314 | evm |
| blast | 81457 | evm |
| fraxtal | 252 | evm |
| immutable | 13371 | evm |
| osmosis | osmosis-1 | cosmos |
| crescent | crescent-1 | cosmos |
| kujira | kaiyo-1 | cosmos |
| terra-2 | phoenix-1 | cosmos |
| juno | juno-1 | cosmos |
| umee | umee-1 | cosmos |
| comdex | comdex-1 | cosmos |
| evmos | evmos\_9001-2 | cosmos |
| regen | regen-1 | cosmos |
| stargaze | stargaze-1 | cosmos |
| assetmantle | mantle-1 | cosmos |
| axelarnet | axelar-dojo-1 | cosmos |
| cosmoshub | cosmoshub-4 | cosmos |
| injective | injective-1 | cosmos |
| agoric | agoric-3 | cosmos |
| fetch | fetchhub-4 | cosmos |
| ki | kichain-2 | cosmos |
| noble | noble-1 | cosmos |
| dydx | dydx-mainnet-1 | cosmos |
| neutron | neutron-1 | cosmos |
| carbon | carbon-1 | cosmos |
| sei | pacific-1 | cosmos |
| secret-snip | secret-4 | cosmos |
| stride | stride-1 | cosmos |
| acre | acre\_9052-1 | cosmos |
| archway | archway-1 | cosmos |
| bitcanna | bitcanna-1 | cosmos |
| bitsong | bitsong-2b | cosmos |
| cheqd | cheqd-mainnet-1 | cosmos |
| celestia | celestia | cosmos |
| coreum | coreum-mainnet-1 | cosmos |
| decentr | mainnet-3 | cosmos |
| desmos | desmos-mainnet | cosmos |
| dymension | dymension\_1100-1 | cosmos |
| irisnet | irishub-1 | cosmos |
| impacthub | ixo-5 | cosmos |
| jackal | jackal-1 | cosmos |
| lumnetwork | lum-network-1 | cosmos |
| likecoin | likecoin-mainnet-2 | cosmos |
| kava-ibc | kava\_2222-10 | cosmos |
| nolus | pirin-1 | cosmos |
| akash | akashnet-2 | cosmos |
| chihuahua | chihuahua-1 | cosmos |
| cronos | cronosmainnet\_25-1 | cosmos |
| gravitybridge | gravity-bridge-3 | cosmos |
| mars | mars-1 | cosmos |
| migaloo | migaloo-1 | cosmos |
| persistence | core-1 | cosmos |
| omniflixhub | omniflixhub-1 | cosmos |
| quicksilver | quicksilver-2 | cosmos |
| sommelier | sommelier-3 | cosmos |
| terra | columbus-5 | cosmos |
| teritori | teritori-1 | cosmos |
| sentinel | sentinelhub-2 | cosmos |
| humans | humans\_1089-1 | cosmos |
| c4e | perun-1 | cosmos |
| saga | ssc-1 | cosmos |
| nibiru | cataclysm-1 | cosmos |
| bitcoin | bitcoin | bitcoin |
| lava | lava-mainnet-1 | cosmos |
| kyve | kyve-1 | cosmos |
| solana | solana-mainnet-beta | solana |
| xion | xion-mainnet-1 | cosmos |
| berachain | 80094 | evm |
| saga\_evm | 5464 | cosmos |
| elys | elys-1 | cosmos |
| allora | allora-mainnet-1 | cosmos |
| flippandomainnet | 2.73727E+15 | cosmos |
| soundmoney | 2.73593E+15 | cosmos |
| ngmi | 2.71277E+15 | cosmos |
| babylon | bbn-1 | cosmos |
| sui | sui-mainnet | sui |
| gnosis | 100 | evm |
| sonic | 146 | evm |
| soneium | 1868 | evm |
| peaq | 3338 | evm |
| hyper-evm | 999 | evm |
| xrpl-evm | 1440000 | evm |
| xrpl | xrpl-mainnet | xrpl |
| stellar | stellar-mainnet | stellar |
| hedera | 295 | evm |
| canton | canton | canton |
***
### Supported Token Types
Squid supports tokens across multiple chain ecosystems. Each token returned by the API includes a `type` field indicating its ecosystem:
| Token Type | Description |
| ---------- | ------------------------------------------------- |
| `evm` | ERC-20 and native tokens on EVM-compatible chains |
| `cosmos` | Native and IBC tokens on Cosmos SDK chains |
| `bitcoin` | Native BTC |
| `solana` | SPL tokens and native SOL |
| `stellar` | Stellar assets and native XLM |
| `sui` | Sui native and fungible tokens |
| `xrpl` | XRP Ledger native and issued tokens |
### Native Token Address
For EVM chains, the native token (ETH, BNB, MATIC, etc.) is represented using the following standard address:
```
0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
```
Use this address as the `fromToken` or `toToken` value in route requests when swapping to or from a chain's native asset.
{% hint style="info" %}
You can retrieve the full list of supported tokens with their types using the `GET /v2/tokens` or `POST /v2/sdk-info` endpoints. Each token object includes a `type` field matching the values above.
{% endhint %}
# Supported Chains by Bridge Type
### Supported Chains by Bridge Type
{% hint style="info" %}
This table shows which chains are currently supported by each bridge type. Reach out to the Squid team for the latest availability.
{% endhint %}
| Chain | Squid Intents | Chainflip | Axelar |
| ----------------------------- | ------------- | --------- | ------ |
| Arbitrum | ✅ | ✅ | ✅ |
| Avalanche | ✅ | ✅ | ✅ |
| Base | ✅ | ✅ | ✅ |
| Berachain | ✅ | ✅ | ✅ |
| Binance | ✅ | ✅ | ✅ |
| Bitcoin | ☑️ | ✅ | ❌ |
| Blast | ✅ | ✅ | ✅ |
| Canton | ☑️ | ❌ | ❌ |
| Celo | ✅ | ✅ | ✅ |
| Citrea | ✅ | ❌ | ✅ |
| Cosmos | ☑️ | ❌ | ✅ |
| Cosmos - other chains | ☑️ | ❌ | ✅ |
| Ethereum | ✅ | ✅ | ✅ |
| Fantom (deprecated for Sonic) | ☑️ | ❌ | ✅ |
| Filecoin | ☑️ | ❌ | ✅ |
| Fraxtal | ☑️ | ❌ | ✅ |
| Gnosis | ✅ | ✅ | ✅ |
| Hedera | ✅ | ❌ | ✅ |
| HyperEVM | ✅ | ✅ | ✅ |
| Immutable zkEVM | ☑️ | ❌ | ✅ |
| Kava | ☑️ | ❌ | ✅ |
| Linea | ✅ | ✅ | ✅ |
| Mantle | ✅ | ❌ | ✅ |
| Mantra | ✅ | ❌ | ✅ |
| Monad | ☑️ | ❌ | ✅ |
| Moonbeam | ☑️ | ❌ | ✅ |
| Noble | ☑️ | ❌ | ❌ |
| Optimism | ✅ | ✅ | ✅ |
| Peaq | ✅ | ✅ | ✅ |
| Polygon | ✅ | ✅ | ✅ |
| Saga EVM | ✅ | ❌ | ✅ |
| Scroll | ☑️ | ❌ | ✅ |
| Soneium | ✅ | ✅ | ✅ |
| Solana | ☑️ | ❌ | ❌ |
| Sonic | ✅ | ✅ | ✅ |
| Stellar | ✅ | ❌ | ✅ |
| Sui | ❌ | ❌ | ✅ |
| XRPL | ✅ | ❌ | ✅ |
| XRPL EVM | ✅ | ✅ | ✅ |
{% hint style="warning" %}
Please contact the Squid team to confirm current availability and to enable Squid Intents on your integrator ID.
{% endhint %}
# Circle's EURC Integration Guide
This guide will help you integrate EURC cross-chain transfers into your application using Squid's widget, API, or SDK in as little as 20 minutes. You'll learn how to enable seamless cross-chain transfers to EURC on Base, Ethereum, and Avalanche. While this guide focuses on EURC, it extends to all tokens listed on Squid.
### Supported EURC Contract Addresses
Base: `0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42`
Ethereum: `0x1abaea1f7c830bd89acc67ec4af516284b1bc33c`
Avalanche: `0xc891eb4cbdeff6e073e859e987815ed1505c2acd`
### Integration Options
Squid makes it easy to integrate EURC into your app using the Squid widget. Out of the box, you can allow users to bridge any asset from over 80+ supported chains into EURC on the chain of your choice. There are three ways you can integrate Squid:
1. Widget
1. This is as simple as an iframe or your can natively integrate it into your app using React, NextJS or Vite.
2. API (language-agnostic)
1. RESTful endpoints for any programming language
2. Supporting cross-chain swaps into custom application flows.
3. SDK (for JavaScript/TypeScript applications)
1. Supporting cross-chain swaps into custom application flows.
2. Full programmatic control for custom integra프로젝트로 돌아가기