Skip to main content

XChainBuildResponse

Full build response for cross-chain swap (account provided).

currencyIn objectrequired

Input currency info (source chain)

property name*any

Input currency info (source chain)

currencyOut objectrequired

Output currency info (destination chain)

property name*any

Output currency info (destination chain)

quotes object[]required
  • Array [
  • bridgestring
    tradeInputnumber
    tradeOutputnumber
    estimatedDurationnumber

    Estimated bridging duration in seconds

    approvalTargetstring

    This bridge's deposit contract — the ERC-20 approve spender

    approvalRequiredboolean

    False when the existing on-chain allowance already covers the input amount

    tx object
    tostringrequired

    Target contract address

    Example: 0x1234...abcd
    datastringrequired

    Encoded calldata

    Example: 0xabcdef...
    valuestringrequired

    ETH value to send with the transaction

    Example: 0
    descriptionstring

    Human-readable label. For alternatives, this is the aggregator name (e.g. "Paraswap"). For transactions, describes the setup action (e.g. "Switch e-mode to 1").

  • ]
  • permissionTxns object[]required

    ERC-20 approves per bridge deposit contract; each is labeled with the bridge name — execute only the one matching the chosen quote

  • Array [
  • tostringrequired

    Target contract address

    datastringrequired

    Encoded calldata

    valuestringrequired

    ETH value

    Example: 0
    descriptionstring

    Human-readable description of the approval (e.g. "Approve borrow for AAVE_V3", "Approve ERC20")

    spenderstring

    ERC-20 approve spender (x-chain permissions). Match it against the selected quote's approvalTarget — several bridges can share one spender, so do not match by description.

  • ]
  • XChainBuildResponse
    {
    "currencyIn": {},
    "currencyOut": {},
    "quotes": [
    {
    "bridge": "string",
    "tradeInput": 0,
    "tradeOutput": 0,
    "estimatedDuration": 0,
    "approvalTarget": "string",
    "approvalRequired": true,
    "tx": {
    "to": "0x1234...abcd",
    "data": "0xabcdef...",
    "value": "0",
    "description": "string"
    }
    }
    ],
    "permissionTxns": [
    {
    "to": "string",
    "data": "string",
    "value": "0",
    "description": "string",
    "spender": "string"
    }
    ]
    }