Skip to main content

What is useIntentAddress?

useIntentAddress controls whether a cross-chain Route can use an intent route. Omit it to allow an intent when the keeper supports both chains. Set it to false for a callback route.

J
Written by Javier Diaz

useIntentAddress controls whether a cross-chain Route request can use an intent route. Omit it to allow an intent when the keeper supports both chains. Set it to false to get a bridge callback route instead.

Definition

An intent route bridges an ERC-20 to a one-time intent address so a keeper can execute the destination steps. A callback route encodes destination actions in a bridge callback instead. useIntentAddress is how you choose, or allow, that behavior.

How it works

  • Same-chain routes ignore useIntentAddress.

  • When it is omitted and the keeper supports both chains, Enso can select an intent route. A candidate that already delivers tokenOut directly stays a plain bridge transfer.

  • Set useIntentAddress to false to force a callback route.

  • The API also returns a callback route when the request uses options an intent cannot encode, including slippage=0, ignoreStandards, allowAsync=true, or certain ignoreAggregators values, and when it finds no intent route.

  • Setting useIntentAddress to true together with any of those incompatible options returns HTTP 400.

How Enso does this

Send useIntentAddress on POST https://api.enso.build/api/v1/shortcuts/route when you need to force a callback route. See Crosschain Routing. Track either result with GET /api/v1/bridge/route.

FAQ

Should I always set useIntentAddress to true?

No. The default (omitted) already allows an intent when it is available. Forcing true with incompatible options fails with 400.

Does this flag apply to the Bundle API?

The documented flag is on the Route request. For a Bundle, you specify a bridge action and optional callback yourself.

Related articles

  • What is an intent route in Enso?

  • How do I force a bridge callback route instead of an intent route?

  • Why did useIntentAddress return 400?

  • Intent route vs bridge callback: which should I use?

  • What is a bridge callback?

Sources

Did this answer your question?