Route
Represents a list of pools through which a swap can occur
#
Type parametersName | Type |
---|---|
TInput | Currency |
TOutput | Currency |
#
Constructors#
constructor+ new Route<TInput, TOutput>(pools
: Pool[], input
: TInput, output
: TOutput): Route<TInput, TOutput>
#
Type parametersName | Type |
---|---|
TInput | Currency |
TOutput | Currency |
#
ParametersName | Type |
---|---|
pools | Pool[] |
input | TInput |
output | TOutput |
Returns: Route<TInput, TOutput>
Defined in: entities/route.ts:15
#
Properties#
input• Readonly
input: TInput
Defined in: entities/route.ts:12
#
output• Readonly
output: TOutput
Defined in: entities/route.ts:13
#
pools• Readonly
pools: Pool[]
Defined in: entities/route.ts:10
#
tokenPath• Readonly
tokenPath: Token[]
Defined in: entities/route.ts:11
#
Accessors#
chainId• get chainId(): number
Returns: number
Defined in: entities/route.ts:46
#
inputToken• get inputToken(): Token
Returns the token representation of the input currency. If the input currency is Ether, returns the wrapped ether token.
Returns: Token
Defined in: entities/route.ts:53
#
midPrice• get midPrice(): Price<TInput, TOutput>
Returns the mid price of the route
Returns: Price<TInput, TOutput>
Defined in: entities/route.ts:67
#
outputToken• get outputToken(): Token
Returns the token representation of the output currency. If the output currency is Ether, returns the wrapped ether token.
Returns: Token
Defined in: entities/route.ts:60