Skip to main content
A unified balance groups an account’s spendable assets across supported chains. Rhinestone uses that portfolio to fund intents without requiring the user to choose a bridge or hold gas on the target chain.

How routing uses balances

When routing across a unified portfolio, the orchestrator generally prefers:
  1. The requested token on the target chain.
  2. The same token on another chain.
  3. An equivalent asset, such as ETH and WETH or USDC and USDT.
  4. Another target-chain asset that can be swapped.
  5. Other available assets, including balances split across tokens or chains.
The route accounts for gas, swap, and bridge costs. Multiple source assets may be used when no single balance covers the requested output or when the intent requests several target tokens.
A portfolio is a routing snapshot, not a reservation guarantee. Prepare a transaction to receive the executable quote and current costs.

Spendable balance

Portfolio results exclude balances already committed to outstanding intents. This prevents the same funds from being allocated twice while claims or settlement are pending. The spendable amount can still change between a portfolio read and quote preparation. Refresh the portfolio after completed or failed intents, deposits, withdrawals, and other balance changes.

Read and spend a unified balance

Use the initialized oneAuth client and authenticated accountAddress from Accounts.

Read assets

Use getAssets to read the portfolio:
Each balance includes its chain ID, token address, symbol, decimals, and a base-unit balance string. getAssets requires the application access-token configuration from Sponsorship setup, including for user-paid intents. The access token identifies the application; it does not grant fee sponsorship by itself.getAssets rejects on missing app credentials, access-token failures, or portfolio request failures. Handle it with try/catch. This differs from sendIntent, which returns a structured success or failure result.

Fund an intent

Reuse the target token, amount, and calls from Send a transaction. Include tokenRequests and omit source constraints to let the orchestrator select from available mainnet balances:
Add sourceAssets and sourceChainId when the user explicitly chooses an input token on a particular chain. sourceAssets accepts ERC-20 addresses, not token symbols. Restrictions can prevent a route even when the portfolio has enough value elsewhere.With neither tokenRequests nor sourceAssets, omitting sourceChainId defaults funding to the target chain. Do not treat that call shape as a request to search the full crosschain portfolio.Sponsorship is required by default. sendIntent() does not expose the custom signer SDK’s prepared quote object to your application. See Send a transaction for funding and review options, then use the result to track the intent.

Keep displayed and executable amounts distinct

  • Display portfolio balances as available assets, not guaranteed transaction outputs.
  • Use the prepared quote to show exact inputs, outputs, and fees when your client exposes one.
  • Keep pending intent IDs and refresh balances after their terminal result.
  • Do not add an account’s existing balance to auxiliaryFunds; doing so double-counts funds during quoting.
  • If source restrictions cause insufficient liquidity, relax only the restrictions the user has agreed to change and prepare a new quote.
Next, send a multichain transaction or make a swap using the available balance.