Parameters

PropertyDescriptionRequired
originChainIdThe chain id to deposit funds on
destinationChainIdThe chain id to execute the txs on
userThe address of the user
currencyThe id of the currency - eth, usdc, degen, xai

Example

import { getClient } from '@reservoir0x/relay-sdk'

const { solver, enabled, user, supportsExternalLiquidity } = await getClient()?.actions.getSolverCapacity({
  destinationChainId,
  originChainId,
})

The solver capacity gives you some key info:

solver.capacityPerRequest - This is the maximum per request we allow the user to bridge. Anything higher than this amount will throw an error when getting the quote. You should use this in your ui to limit the input.

user.maxBridgeAmount - This is the maximum amount that the user can bridge after fees (it doesn’t take into account their balance, that’s something you’ll need to double check on the client).

enabled - whether the solver supports the executing transactions between the configured chains.

supportsExternalLiquidity - whether canonical bridging is supported between the configured chains.