UNPKG

@kamino-finance/kliquidity-sdk

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

22 lines 1.51 kB
import { Address } from '@solana/kit'; import Decimal from 'decimal.js'; import { BinArray } from '../@codegen/meteora/accounts'; import { Bin } from '../@codegen/meteora/types'; import { BN } from '@coral-xyz/anchor'; import { ProgramDerivedAddress } from '@solana/addresses/dist/types/program-derived-address'; export declare function getPriceOfBinByBinId(binId: number, tickSpacing: number): Decimal; export declare function getBinIdFromPrice(price: Decimal, tickSpacing: number, min: boolean): number; export declare function getPriceOfBinByBinIdWithDecimals(binId: number, tickSpacing: number, decimalsA: number, decimalsB: number): Decimal; export declare function getBinIdFromPriceWithDecimals(price: Decimal, tickSpacing: number, min: boolean, decimalsA: number, decimalsB: number): number; export declare function getPriceFromQ64Price(price: Decimal, decimalsA: number, decimalsB: number): Decimal; export declare function getBinArrayLowerUpperBinId(binArrayIndex: number): [number, number]; export declare function getBinFromBinArray(binIndex: number, binArray: BinArray): Bin | null; export declare function getBinFromBinArrays(binIndex: number, binArrays: BinArray[]): Bin | null; export declare function binIdToBinArrayIndex(binId: BN): BN; export declare function deriveBinArray(lbPair: Address, index: BN, programId: Address): Promise<ProgramDerivedAddress>; export type MeteoraPosition = { Address: Address; amountX: Decimal; amountY: Decimal; }; //# sourceMappingURL=meteora.d.ts.map