Skip to main content

How do I set the receiver of a route?

Set query-level receiver to the address that should receive the final output. It can differ from fromAddress. Keep intermediate outputs with the executor when later actions consume them.

J
Written by Javier Diaz

Set the query-level receiver to the address that should receive the final output. It can differ from fromAddress. Keep intermediate outputs with the executor when later actions will consume them.

Definition

receiver is the recipient of the route or bundle’s final output. Some actions also accept an action-level receiver, which overrides recipient behavior only for actions that support it.

How it works

  • Set request-level receiver when the output should go to an address other than the signer.

  • Do not send every intermediate output to the user if a later action needs those assets.

  • spender is the account supplying inputs when the strategy supports it, and is not interchangeable with receiver.

  • refundReceiver is a different field, used for dust or applicable bridge refunds.

How Enso does this

Routing Strategies and the Bundle API document query-level receiver, action-level overrides, and the separate refund-receiver fields. For a cross-chain output to another wallet, see How do I send a cross-chain output to a different receiver? On Solana destinations, follow the Solana receiver and refundReceiver rules in those articles.

FAQ

Is receiver the same as refundReceiver?

No. receiver is for the intended output. refundReceiver is for a refund path when one applies.

What if I omit receiver?

The request still needs a sensible default for final output, often the signer. Set receiver explicitly when it should be a different address.

Related articles

  • What is the difference between receiver and refundReceiver?

  • What is fromAddress in a routing API?

  • How do I send a cross-chain output to a different receiver?

  • How do I set refundReceiver on a cross-chain route?

  • What is residual dust after a route?

Sources

Did this answer your question?