Parameters that describe the nature of a swap on a Whirlpool.
The direction of the swap. True if swapping from A to B. False if swapping from B to A.
Specifies the token the parameter amountrepresents. If true, the amount represents the input token of the swap.
amount
The amount of input or output token to swap from (depending on amountSpecifiedIsInput).
The maximum/minimum of input/output token to swap into (depending on amountSpecifiedIsInput).
The maximum/minimum price the swap will swap to.
PublicKey of the tick-array where the Whirlpool's currentTickIndex resides in
The next tick-array in the swap direction. If the swap will not reach the next tick-aray, input the same array as tickArray0.
The next tick-array in the swap direction after tickArray2. If the swap will not reach the next tick-aray, input the same array as tickArray1.
(V2 only) Optional array of PublicKey for supplemental tick arrays. swap instruction will ignore this parameter.
Optional
Parameters that describe the nature of a swap on a Whirlpool.
Param: aToB
The direction of the swap. True if swapping from A to B. False if swapping from B to A.
Param: amountSpecifiedIsInput
Specifies the token the parameter
amount
represents. If true, the amount represents the input token of the swap.Param: amount
The amount of input or output token to swap from (depending on amountSpecifiedIsInput).
Param: otherAmountThreshold
The maximum/minimum of input/output token to swap into (depending on amountSpecifiedIsInput).
Param: sqrtPriceLimit
The maximum/minimum price the swap will swap to.
Param: tickArray0
PublicKey of the tick-array where the Whirlpool's currentTickIndex resides in
Param: tickArray1
The next tick-array in the swap direction. If the swap will not reach the next tick-aray, input the same array as tickArray0.
Param: tickArray2
The next tick-array in the swap direction after tickArray2. If the swap will not reach the next tick-aray, input the same array as tickArray1.
Param: supplementalTickArrays
(V2 only) Optional array of PublicKey for supplemental tick arrays. swap instruction will ignore this parameter.