UNPKG

@orca-so/whirlpools-sdk

Version:

Typescript SDK to interact with Orca's Whirlpool program.

15 lines (14 loc) 657 B
import BN from "bn.js"; import type { WhirlpoolData } from "../../types/public"; import type { TickArraySequence } from "./tick-array-sequence"; import type { AdaptiveFeeInfo } from "../public"; export type SwapResult = { amountA: BN; amountB: BN; nextTickIndex: number; nextSqrtPrice: BN; totalFeeAmount: BN; appliedFeeRateMin: number; appliedFeeRateMax: number; }; export declare function computeSwap(whirlpoolData: WhirlpoolData, tickSequence: TickArraySequence, tokenAmount: BN, sqrtPriceLimit: BN, amountSpecifiedIsInput: boolean, aToB: boolean, timestampInSeconds: BN, adaptiveFeeInfo: AdaptiveFeeInfo | null): SwapResult;