Route
@uniswap/v4-sdk / Route
Defined in: entities/route.ts:12
Represents a list of pools through which a swap can occur
Type Parameters
| Type Parameter | Description |
|---|---|
TInput extends Currency | The input currency |
TOutput extends Currency | The output currency |
Constructors
new Route()
new Route<
TInput,TOutput>(pools,input,output):Route<TInput,TOutput>
Defined in: entities/route.ts:28
Creates an instance of route.
Parameters
| Parameter | Type | Description |
|---|---|---|
pools | Pool[] | An array of Pool objects, ordered by the route the swap will take |
input | TInput | The input currency |
output | TOutput | The output currency |
Returns
Route<TInput, TOutput>
Properties
currencyPath
readonlycurrencyPath:Currency[]
Defined in: entities/route.ts:14
input
readonlyinput:TInput
Defined in: entities/route.ts:15
output
readonlyoutput:TOutput
Defined in: entities/route.ts:16
pathInput
readonlypathInput:Currency
Defined in: entities/route.ts:17
pathOutput
readonlypathOutput:Currency
Defined in: entities/route.ts:18
pools
readonlypools:Pool[]
Defined in: entities/route.ts:13
Accessors
chainId
Get Signature
get chainId():
number
Defined in: entities/route.ts:58
Returns
number
midPrice
Get Signature
get midPrice():
Price<TInput,TOutput>
Defined in: entities/route.ts:65
Returns the mid price of the route
Returns
Price<TInput, TOutput>