Skip to main content
POST
cURL

Overview

The GetIntent endpoint retrieves the complete intent object for a specific intent ID. This provides all the details about the intent including quote information, fee breakdown, transaction calls, and metadata.

Use Cases

  • Retrieve full intent details after creation
  • Review quote and fee information
  • Inspect transaction calls and preconditions
  • Verify intent parameters
  • Debug issues with intent execution
  • Display intent details in UI

Request Parameters

Required Fields

  • intentId (string): The unique identifier of the intent

Response

The response includes:
  • intent (Intent): Complete intent object with all details

Intent Object Structure

The intent object contains comprehensive information:

Core Fields

  • id (number): Internal database ID
  • intentId (string): Unique intent identifier
  • status (IntentStatus): Current status
  • ownerAddress (string): Wallet address of the intent owner
  • originIntentAddress (string): Intent contract address on origin chain
  • destinationIntentAddress (string): Intent contract address on destination chain
  • destinationSalt (number): Salt for deterministic intent address generation
  • trailsVersion (string): Version of Trails protocol used
  • expiresAt (string): Intent expiration timestamp
  • createdAt (string): Creation timestamp
  • updatedAt (string): Last update timestamp

Quote Request

  • quoteRequest (QuoteIntentRequest): Original quote parameters
    • Origin and destination chain/token details
    • Amounts and trade type
    • Options (provider, slippage, etc.)

Transaction Details

  • depositTransaction (DepositTransaction): Deposit details
    • Token address and amount
    • Recipient address
    • Token decimals
  • calls (IntentCalls[]): Cross-chain calls to execute
    • Chain ID for each call set
    • Transaction calls with calldata
    • Nonce and space information
  • preconditions (TransactionPrecondition[]): Pre-execution checks
    • Token balance requirements
    • Minimum amount validations
  • metaTxns (MetaTxn[]): Meta-transaction information
    • Meta-transaction IDs
    • Wallet addresses
    • Contract targets

Quote Information

  • quote (IntentProviderQuote): Quote provider details
    • Provider name and request ID
    • Input/output amounts and minimums
    • Slippage and price impact
    • Provider fees in USD

Fee Breakdown

  • fees (IntentFees): Comprehensive fee information
    • originGas: Origin chain gas fees
    • destinationGas: Destination chain gas fees
    • provider: Provider fees (quote provider + Trails)
    • feeTokenAddress: Token used for fees
    • feeTokenTotal: Total fee in fee token
    • totalFeeAmount: Total fee amount
    • totalFeeUsd: Total fee in USD

Example

Detailed Fee Inspection

Inspecting Transaction Calls

Use Cases

1. Display Intent Summary in UI

2. Verify Intent Before Signing

Use this endpoint to retrieve intent details at any time. The intent object remains accessible even after execution completes.

Next Steps

  • Use GetIntentReceipt to check execution status and get transaction hashes
  • Use SearchIntents to find all intents for a specific address
  • Modify and recommit expired intents with fresh quotes

Body

application/json
intentId
string
required

Response

OK

intent
object
required