@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
29 lines • 1.61 kB
TypeScript
import { Address, Rpc, SolanaRpcApi } from '@solana/kit';
import Decimal from 'decimal.js';
import { WhirlpoolStrategy } from '../@codegen/kliquidity/accounts';
import { GenericPoolInfo, LiquidityDistribution } from '../utils';
import { LbPair, PositionV2 } from '../@codegen/meteora/accounts';
import { WhirlpoolAprApy } from './WhirlpoolAprApy';
import { MeteoraPoolAPI } from './MeteoraPoolsResponse';
export interface MeteoraPool {
key: Address;
pool: LbPair;
}
export declare class MeteoraService {
private readonly _rpc;
private readonly _meteoraProgramId;
private readonly _meteoraApiUrl;
constructor(rpc: Rpc<SolanaRpcApi>, meteoraProgramId?: Address);
getMeteoraProgramId(): Address;
getPool(poolAddress: Address): Promise<LbPair | null>;
getPosition(position: Address): Promise<PositionV2 | null>;
getMeteoraPools(): Promise<MeteoraPool[]>;
getMeteoraPoolsFromAPI(tokens?: Address[], maxPages?: number, maxPageSize?: number): Promise<MeteoraPoolAPI[]>;
getStrategyMeteoraPoolAprApy(strategy: WhirlpoolStrategy): Promise<WhirlpoolAprApy>;
getMeteoraLiquidityDistribution(poolKey: Address, keepOrder?: boolean, lowestTick?: number, highestTick?: number): Promise<LiquidityDistribution>;
getMeteoraPositionAprApy(poolPubkey: Address, priceLower: Decimal, priceUpper: Decimal): Promise<WhirlpoolAprApy>;
getGenericPoolInfo(poolPubkey: Address): Promise<GenericPoolInfo>;
getPositionsCountByPool(pool: Address): Promise<number>;
}
export declare function computeMeteoraFee(pool: LbPair): Decimal;
//# sourceMappingURL=MeteoraService.d.ts.map