Skip to main content
POST
/
rpc
/
Trails
/
QuoteIntentEdge
cURL
curl --request POST \
  --url https://trails-api.sequence.app/rpc/Trails/QuoteIntentEdge \
  --header 'Content-Type: application/json' \
  --data '
{
  "intent": {
    "ownerAddress": "<string>",
    "originChainId": 123,
    "originTokenAddress": "<string>",
    "destinationChainId": 123,
    "destinationTokenAddress": "<string>",
    "destinationToAddress": "<string>",
    "destinationApproveAddress": "<string>",
    "destinationCallData": "<string>",
    "destinationCallValue": 123,
    "originTokenAmount": 123,
    "destinationTokenAmount": 123,
    "onlyNativeGasFee": true,
    "options": {
      "swapProviderFallback": true,
      "bridgeProviderFallback": true,
      "slippageTolerance": 123,
      "trailsAddressOverrides": {
        "sequenceWalletFactoryAddress": "<string>",
        "sequenceWalletMainModuleAddress": "<string>",
        "sequenceWalletMainModuleUpgradableAddress": "<string>",
        "sequenceWalletGuestModuleAddress": "<string>",
        "sequenceWalletUtilsAddress": "<string>"
      }
    }
  },
  "edge": {
    "originChainId": 123,
    "originAddress": "<string>",
    "originTokenAddress": "<string>",
    "originTokenAmount": 123,
    "refundAddress": "<string>",
    "destinationChainId": 123,
    "destinationAddress": "<string>",
    "destinationTokenAddress": "<string>"
  }
}
'
{
  "edgeId": "<string>",
  "edge": {
    "requestId": "<string>",
    "providerQuote": {},
    "executionPlan": [
      "<string>"
    ],
    "originTokenAmount": 123,
    "handoff": {
      "chainId": 123,
      "tokenAddress": "<string>",
      "amount": 123,
      "recipientAddress": "<string>"
    }
  },
  "intent": {
    "id": 123,
    "projectId": 123,
    "intentId": "<string>",
    "quoteRequest": {
      "ownerAddress": "<string>",
      "originChainId": 123,
      "originTokenAddress": "<string>",
      "destinationChainId": 123,
      "destinationTokenAddress": "<string>",
      "destinationToAddress": "<string>",
      "destinationApproveAddress": "<string>",
      "destinationCallData": "<string>",
      "destinationCallValue": 123,
      "originTokenAmount": 123,
      "destinationTokenAmount": 123,
      "onlyNativeGasFee": true,
      "options": {
        "swapProviderFallback": true,
        "bridgeProviderFallback": true,
        "slippageTolerance": 123,
        "trailsAddressOverrides": {
          "sequenceWalletFactoryAddress": "<string>",
          "sequenceWalletMainModuleAddress": "<string>",
          "sequenceWalletMainModuleUpgradableAddress": "<string>",
          "sequenceWalletGuestModuleAddress": "<string>",
          "sequenceWalletUtilsAddress": "<string>"
        }
      }
    },
    "ownerAddress": "<string>",
    "originChainId": 123,
    "destinationChainId": 123,
    "originTokenAddress": "<string>",
    "destinationTokenAddress": "<string>",
    "originIntentAddress": "<string>",
    "salt": 123,
    "depositTransaction": {
      "toAddress": "<string>",
      "tokenAddress": "<string>",
      "amount": 123,
      "chainId": 123,
      "to": "<string>",
      "data": "<string>",
      "value": 123,
      "decimals": 123
    },
    "originCalls": {
      "chainId": 123,
      "calls": [
        {
          "to": "<string>",
          "value": 123,
          "data": "<string>",
          "gasLimit": 123,
          "delegateCall": true,
          "onlyFallback": true,
          "behaviorOnError": 123
        }
      ],
      "space": 123,
      "nonce": 123
    },
    "originPrecondition": {
      "type": "<string>",
      "chainId": 123,
      "ownerAddress": "<string>",
      "tokenAddress": "<string>",
      "minAmount": 123
    },
    "originMetaTxn": {
      "id": "<string>",
      "chainId": 123,
      "walletAddress": "<string>",
      "contract": "<string>",
      "input": "<string>",
      "bridgeGas": 123
    },
    "quote": {
      "routeProviders": [],
      "routeProvidersRequestIds": [
        "<string>"
      ],
      "routeProvidersFeeUsd": [
        123
      ],
      "fromAmount": 123,
      "fromAmountMin": 123,
      "fromAmountUsd": 123,
      "fromAmountMinUsd": 123,
      "toAmount": 123,
      "toAmountMin": 123,
      "toAmountUsd": 123,
      "toAmountMinUsd": 123,
      "maxSlippage": 123,
      "priceImpact": 123,
      "priceImpactUsd": 123,
      "priceImpactDetails": {
        "executionPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "marketPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "providerFeesPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "trailsFeesPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "netPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        }
      },
      "estimatedDuration": 123
    },
    "fees": {
      "originGas": {
        "chainId": 123,
        "totalGasLimit": 123,
        "gasPrice": 123,
        "nativeTokenSymbol": "<string>",
        "totalFeeAmount": 123,
        "totalFeeUsd": 123,
        "metaTxnFeeDetails": {
          "metaTxnId": "<string>",
          "estimatedGasLimit": 123,
          "feeNative": 123
        },
        "metaTxnGasQuote": "<string>",
        "nativeTokenPriceUsd": 123
      },
      "provider": {
        "quoteProvider": "<string>",
        "quoteProviderFee": 123,
        "quoteProviderFeeUsd": 123,
        "trailsFee": 123,
        "trailsFeeUsd": 123,
        "quoteProviderWithTrailsFee": 123,
        "providerWithTrailsFeeUsd": 123,
        "totalFeeAmount": 123,
        "totalFeeUsd": 123
      },
      "feeTokenAddress": "<string>",
      "feeTokenAmount": 123,
      "feeTokenUsd": 123,
      "feeTokenTotal": 123,
      "gasFeeTotal": 123,
      "gasFeeUsd": 123,
      "trailsFeeTotal": 123,
      "trailsFeeUsd": 123,
      "collectorFeeTotal": 123,
      "collectorFeeUsd": 123,
      "providerFeeTotal": 123,
      "providerFeeUsd": 123,
      "totalFeeAmount": 123,
      "totalFeeUsd": 123,
      "destinationGas": {
        "chainId": 123,
        "totalGasLimit": 123,
        "gasPrice": 123,
        "nativeTokenSymbol": "<string>",
        "totalFeeAmount": 123,
        "totalFeeUsd": 123,
        "metaTxnFeeDetails": {
          "metaTxnId": "<string>",
          "estimatedGasLimit": 123,
          "feeNative": 123
        },
        "metaTxnGasQuote": "<string>",
        "nativeTokenPriceUsd": 123
      }
    },
    "trailsVersion": "<string>",
    "trailsContracts": {
      "trailsIntentEntrypointAddress": "<string>",
      "trailsRouterAddress": "<string>",
      "trailsRouterShimAddress": "<string>",
      "trailsUtilsAddress": "<string>"
    },
    "expiresAt": "<string>",
    "isTestnet": true,
    "destinationIntentAddress": "<string>",
    "edge": {
      "edgeId": "<string>",
      "originChainId": 123,
      "relayRequestId": "<string>",
      "edgeTokenAmount": 123,
      "edgeTokenAddress": "<string>",
      "edgeUserAddress": "<string>",
      "initTransactionHash": "<string>",
      "fillTransactionHash": "<string>",
      "refundTransactionHash": "<string>",
      "edgeTokenMetadata": {
        "chainId": 123,
        "tokenAddress": "<string>",
        "name": "<string>",
        "symbol": "<string>",
        "decimals": 123,
        "logoUri": "<string>"
      },
      "createdAt": "<string>"
    },
    "passthrough": true,
    "destinationCalls": {
      "chainId": 123,
      "calls": [
        {
          "to": "<string>",
          "value": 123,
          "data": "<string>",
          "gasLimit": 123,
          "delegateCall": true,
          "onlyFallback": true,
          "behaviorOnError": 123
        }
      ],
      "space": 123,
      "nonce": 123
    },
    "destinationPrecondition": {
      "type": "<string>",
      "chainId": 123,
      "ownerAddress": "<string>",
      "tokenAddress": "<string>",
      "minAmount": 123
    },
    "destinationMetaTxn": {
      "id": "<string>",
      "chainId": 123,
      "walletAddress": "<string>",
      "contract": "<string>",
      "input": "<string>",
      "bridgeGas": 123
    },
    "gasFeeOptions": {
      "gasEstimate": {
        "totalGas": 123,
        "gasPrice": "<string>",
        "nativeCost": "<string>",
        "nativeCostUsd": 123
      },
      "feeOptions": [
        {
          "tokenAddress": "<string>",
          "tokenSymbol": "<string>",
          "tokenDecimals": 123,
          "amount": 123,
          "amountUsd": 123,
          "feeCollectorAddress": "<string>",
          "is2612": true,
          "isPassthroughEligible": true
        }
      ],
      "expiresAt": "<string>",
      "feeCollectorAddress": "<string>"
    },
    "timedRefundUnlockTimestamp": 123,
    "updatedAt": "<string>",
    "createdAt": "<string>"
  },
  "gasFeeOptions": {
    "gasEstimate": {
      "totalGas": 123,
      "gasPrice": "<string>",
      "nativeCost": "<string>",
      "nativeCostUsd": 123
    },
    "feeOptions": [
      {
        "tokenAddress": "<string>",
        "tokenSymbol": "<string>",
        "tokenDecimals": 123,
        "amount": 123,
        "amountUsd": 123,
        "feeCollectorAddress": "<string>",
        "is2612": true,
        "isPassthroughEligible": true
      }
    ],
    "expiresAt": "<string>",
    "feeCollectorAddress": "<string>"
  },
  "transactionStates": [
    {
      "id": "<string>",
      "label": "<string>",
      "chainId": 123,
      "transactionHash": "<string>"
    }
  ],
  "passthrough": {
    "eligible": true,
    "passthroughTransaction": {
      "toAddress": "<string>",
      "tokenAddress": "<string>",
      "amount": 123,
      "chainId": 123,
      "to": "<string>",
      "data": "<string>",
      "value": 123,
      "decimals": 123
    },
    "transactionStates": [
      {
        "id": "<string>",
        "label": "<string>",
        "chainId": 123,
        "transactionHash": "<string>"
      }
    ],
    "quote": {
      "routeProviders": [],
      "routeProvidersRequestIds": [
        "<string>"
      ],
      "routeProvidersFeeUsd": [
        123
      ],
      "fromAmount": 123,
      "fromAmountMin": 123,
      "fromAmountUsd": 123,
      "fromAmountMinUsd": 123,
      "toAmount": 123,
      "toAmountMin": 123,
      "toAmountUsd": 123,
      "toAmountMinUsd": 123,
      "maxSlippage": 123,
      "priceImpact": 123,
      "priceImpactUsd": 123,
      "priceImpactDetails": {
        "executionPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "marketPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "providerFeesPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "trailsFeesPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        },
        "netPriceImpact": {
          "priceImpact": 123,
          "priceImpactUsd": 123
        }
      },
      "estimatedDuration": 123
    },
    "fees": {
      "originGas": {
        "chainId": 123,
        "totalGasLimit": 123,
        "gasPrice": 123,
        "nativeTokenSymbol": "<string>",
        "totalFeeAmount": 123,
        "totalFeeUsd": 123,
        "metaTxnFeeDetails": {
          "metaTxnId": "<string>",
          "estimatedGasLimit": 123,
          "feeNative": 123
        },
        "metaTxnGasQuote": "<string>",
        "nativeTokenPriceUsd": 123
      },
      "provider": {
        "quoteProvider": "<string>",
        "quoteProviderFee": 123,
        "quoteProviderFeeUsd": 123,
        "trailsFee": 123,
        "trailsFeeUsd": 123,
        "quoteProviderWithTrailsFee": 123,
        "providerWithTrailsFeeUsd": 123,
        "totalFeeAmount": 123,
        "totalFeeUsd": 123
      },
      "feeTokenAddress": "<string>",
      "feeTokenAmount": 123,
      "feeTokenUsd": 123,
      "feeTokenTotal": 123,
      "gasFeeTotal": 123,
      "gasFeeUsd": 123,
      "trailsFeeTotal": 123,
      "trailsFeeUsd": 123,
      "collectorFeeTotal": 123,
      "collectorFeeUsd": 123,
      "providerFeeTotal": 123,
      "providerFeeUsd": 123,
      "totalFeeAmount": 123,
      "totalFeeUsd": 123,
      "destinationGas": {
        "chainId": 123,
        "totalGasLimit": 123,
        "gasPrice": 123,
        "nativeTokenSymbol": "<string>",
        "totalFeeAmount": 123,
        "totalFeeUsd": 123,
        "metaTxnFeeDetails": {
          "metaTxnId": "<string>",
          "estimatedGasLimit": 123,
          "feeNative": 123
        },
        "metaTxnGasQuote": "<string>",
        "nativeTokenPriceUsd": 123
      }
    }
  }
}

Overview

The QuoteIntentEdge endpoint requests a quote for a cross-chain intent that uses a non-EVM edge rail (Solana or Tron) on either the origin or destination side. Edge rails extend the standard intent flow with an external bridge hop that hands funds off to (or receives funds from) the EVM intent wallet. Use QuoteIntent for EVM-only routes. Use QuoteIntentEdge whenever Solana or Tron is involved.

Request Parameters

Required Fields

  • intent (QuoteIntentRequest): The outer intent shape. The origin must be left unset — intent.originChainId must be 0 (or omitted) when edge.mode = ORIGIN. The edge request determines the actual origin chain/token at quote time.
  • edge (EdgeQuoteRequest):
    • rail (EdgeRail): SOLANA or TRON.
    • mode (EdgeMode): ORIGIN (edge funds the intent from a non-EVM chain) or DESTINATION (intent funds an address on a non-EVM chain).
    • provider (RouteProvider, optional): External bridge provider (defaults to AUTO selection).
    • tradeType (TradeType, optional): Controls the external funding rail. Defaults to EXACT_OUTPUT (funds the fixed handoff amount required by the quoted intent). EXACT_INPUT spends originTokenAmount on the origin rail and derives the intent from the rail’s quoted minimum output.

ORIGIN Mode Fields

Required when edge.mode = ORIGIN:
  • originChainId (number): Non-EVM origin chain ID (Solana or Tron).
  • originAddress (string): User’s address on the non-EVM chain.
  • originTokenAddress (string): Token address on the non-EVM chain.
Optional for ORIGIN:
  • originTokenAmount (bigint): Required when tradeType = EXACT_INPUT.
  • refundAddress (string): Refund destination on the non-EVM chain.

DESTINATION Mode Fields

Required when edge.mode = DESTINATION:
  • destinationChainId (number): Non-EVM destination chain ID.
  • destinationAddress (string): Recipient address on the non-EVM chain.
  • destinationTokenAddress (string): Token address on the non-EVM chain.

Response

  • edgeId (string): The Trails edge quote ID. Pass this to GetEdgeStatus to track the external rail leg.
  • edge (EdgeQuoteResponse): Quote details for the external rail, including the handoff describing the chain, token, amount, and recipient address used to hand funds off between the rail and the intent wallet, plus the provider-specific providerQuote and executionPlan.
  • intent (Intent, optional): The committed intent shape — same structure as QuoteIntent returns.
  • gasFeeOptions (GasFeeOptions, optional)
  • transactionStates (array, optional)
  • passthrough (PassthroughInfo, optional)

Discovery

Call GetEdges to find out which edge rails and modes are enabled on this deployment before quoting.

Example

const response = await fetch('https://trails-api.sequence.app/rpc/Trails/QuoteIntentEdge', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY'
  },
  body: JSON.stringify({
    intent: {
      ownerAddress: '0x0709CF2d5D4f3D38f5948d697fE64d7FB3639Eb1',
      originChainId: 0, // must be 0 in ORIGIN mode — set by edge
      destinationChainId: 8453,
      destinationTokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC on Base
      destinationToAddress: '0x0709CF2d5D4f3D38f5948d697fE64d7FB3639Eb1',
      destinationTokenAmount: 100000000
    },
    edge: {
      rail: 'SOLANA',
      mode: 'ORIGIN',
      tradeType: 'EXACT_OUTPUT',
      originChainId: 1399811149, // Solana
      originAddress: 'AbC...',
      originTokenAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' // USDC mint
    }
  })
});

const { edgeId, edge, intent } = await response.json();

Next Steps

GetEdgeStatus

Track the external rail leg’s status

GetEdges

List enabled edge rails and modes

Body

application/json
intent
object
required
edge
object
required

Response

OK

edgeId
string
required
edge
object
required
intent
object
gasFeeOptions
object
transactionStates
object[]

[]TransactionStateInfo

passthrough
object