Let the quote choose source balances, or restrict which chains and tokens it may use.
Every intent draws funds from one or more source balances. By default the Nexus middleware chooses them from the wallet's balances. Pass sources to limit its choice.
Exact output: optional sources
For swapWithExactOut and exact-output swapAndExecute, sources is optional. Each entry needs a chainId and can add a tokenAddress.TypeScript
All sources must share one provider with the destination. In a picker, pass the sources already selected to getAvailableSourceTokens(destination, selected) so it only offers compatible tokens.
Changing sources during review
The onIntent hook's refresh(sources) returns a new quote for a different selection, so users can change sources without restarting the operation. Render the quote it returns. For exact input, every replacement source still needs tokenAddress and amountRaw.quote.sourceVerdicts explains each candidate: selected, unused, or unroutable with a reason such as BELOW_DEPOSIT_FEE or INSUFFICIENT_APPROVAL_GAS. Use it to show why a balance was skipped.