UNPKG

@renec-foundation/redex-sdk

Version:

Typescript SDK to interact with Orca's Whirlpool program.

9 lines (8 loc) 665 B
/// <reference types="bn.js" /> import { Percentage } from "@orca-so/common-sdk"; import { BN } from "@project-serum/anchor"; import { u64 } from "@solana/spl-token"; export declare function getAmountDeltaA(currSqrtPrice: BN, targetSqrtPrice: BN, currLiquidity: BN, roundUp: boolean): BN; export declare function getAmountDeltaB(currSqrtPrice: BN, targetSqrtPrice: BN, currLiquidity: BN, roundUp: boolean): BN; export declare function getNextSqrtPrice(sqrtPrice: BN, currLiquidity: BN, amount: u64, amountSpecifiedIsInput: boolean, aToB: boolean): BN; export declare function adjustForSlippage(n: BN, { numerator, denominator }: Percentage, adjustUp: boolean): BN;