Stellar Integration
Integrate cross-chain swaps from Stellar to EVM chains using Squid. Stellar support is powered by Squid Intents — Squid's intent-based execution protocol for fast, solver-driven cross-chain settlement.
Squid Intents must be enabled on your integrator ID. Reach out to the Squid team to request Squid Intents access before integrating with Stellar.
Stellar Parameters
Chain ID
stellar-mainnet
Supported Tokens
The following tokens are currently supported on Stellar via Squid Intents:
USDC
USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
Token addresses on Stellar follow the format
CODE-ISSUER(e.g.,USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN).
Prerequisites
Stellar SDK — Install
@stellar/stellar-sdkto build and sign Stellar transactions.Stellar Wallet — A funded Stellar account with a secret key. The account must have a trustline for any non-native asset being sent (e.g., USDC).
Horizon Server — The examples connect to the public Horizon API at
https://horizon.stellar.org.Integrator ID — A valid Squid integrator ID with Squid Intents enabled.
API Integration
Stellar → EVM Swap
The following example demonstrates a full Stellar-to-EVM swap using the Squid API directly. It sends USDC on Stellar to USDC on Base.
API Code Examples
Stellar → EVM
SDK Integration
The Squid SDK provides the same Stellar routing capabilities. After initializing the SDK, use squid.getRoute() with the same parameters, then execute the transaction natively on the Stellar network.
Note: Because
squid.executeRoute()expects EVM-compatible signers by default, Stellar transactions must be dispatched natively using the Stellar SDK after obtaining the route.
SDK Code Examples
Stellar → EVM
Transaction Handling
XDR vs JSON Transaction Formats
The Squid route response for Stellar returns a transactionRequest whose data field can be in one of two formats. Your integration must handle both:
Format
typeof transactionRequest.data
Description
XDR Envelope
string
A pre-built, XDR-encoded Stellar transaction envelope. Deserialize it with TransactionBuilder.fromXDR(), sign, and submit.
JSON Payment Object
object
A structured payment descriptor containing target, asset, amount, and optional memo fields. Build a Stellar payment transaction manually from these fields.
Detecting the format:
Memo Handling
When the transaction data includes a memo, you must attach it to your Stellar transaction. Squid uses memos for intent tracking. The supported memo types are:
memoType value
Stellar Memo Method
"hash" or "MEMO_HASH"
StellarSdk.Memo.hash(memo)
"id" or "MEMO_ID"
StellarSdk.Memo.id(memo)
(default / text)
StellarSdk.Memo.text(memo)
Important: If the route response includes a memo, you must include it in the submitted transaction. Omitting the memo may cause the swap to fail.
Status Tracking
Stellar routes are powered by Squid Intents, which requires the quoteId for status polling. The quoteId is returned in the route response.
Important: A Squid Intents transaction will not be tracked correctly unless status is polled with the
quoteId. See the Integrating Squid Intents guide for full status polling details.
Extracting the quoteId
The quoteId may appear in several locations within the route response. Use a fallback chain to extract it reliably:
Important Notes
Stellar transactions are dispatched natively — Unlike EVM chains, you cannot use
squid.executeRoute()with a standard signer. Build and submit the Stellar transaction using the Stellar SDK.Handle both transaction formats — Check
typeof transactionRequest.datato determine whether you received an XDR envelope or a JSON payment object.Include memos when provided — Squid may include memo data for intent tracking. Always attach the memo to your Stellar transaction if one is present.
quoteId is required for status polling — Squid Intents transactions require the
quoteIdparameter when calling the/v2/statusendpoint.No depositTxVerificationSignature needed — Stellar native deposits do not require a deposit transaction verification signature.
USDC uses 7 decimals on Stellar — When specifying
fromAmount, use 7-decimal precision (e.g.,1000000= 0.1 USDC).Trustlines required — Your Stellar account must have an active trustline for any non-native asset (e.g., USDC) before initiating a swap.
Last updated