findRoute
@totemsdk/omnia-router / findRoute
Function: findRoute()
findRoute(
graph,from,to,amount,tokenId,opts?):Route|null
Find the cheapest route (lowest total fee, then fewest hops) from from to
to carrying amount of tokenId. Edges are filtered by tokenId and
availableBalance.
Returns null if no path exists within maxHops.
Parameters
graph
from
string
to
string
amount
bigint
tokenId
string
opts?
Returns
Route | null