@renec-foundation/redex-sdk
Version:
Typescript SDK to interact with Orca's Whirlpool program.
11 lines (10 loc) • 425 B
TypeScript
/// <reference types="bn.js" />
import { u64 } from "@solana/spl-token";
import { BN } from "@project-serum/anchor";
export declare type SwapStep = {
amountIn: BN;
amountOut: BN;
nextPrice: BN;
feeAmount: BN;
};
export declare function computeSwapStep(amountRemaining: u64, feeRate: number, currLiquidity: BN, currSqrtPrice: BN, targetSqrtPrice: BN, amountSpecifiedIsInput: boolean, aToB: boolean): SwapStep;