kamino-sdk-beta
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
36 lines • 2.01 kB
TypeScript
import { Connection, PublicKey } from '@solana/web3.js';
import Decimal from 'decimal.js';
import { PoolData } from '@orca-so/whirlpool-sdk';
import { OrcaWhirlpoolsResponse, Whirlpool } from './OrcaWhirlpoolsResponse';
import { SolanaCluster } from '@hubbleprotocol/hubble-config';
import { WhirlpoolStrategy } from '../kamino-client/accounts';
import { WhirlpoolAprApy } from './WhirlpoolAprApy';
import { GenericPoolInfo, LiquidityDistribution } from '../utils';
import { CollateralInfo } from '../kamino-client/types';
import { KaminoPrices } from '../models';
export declare class OrcaService {
private readonly _connection;
private readonly _whirilpoolProgramId;
private readonly _orcaNetwork;
private readonly _orcaApiUrl;
constructor(connection: Connection, cluster: SolanaCluster, whirlpoolProgramId?: PublicKey);
getWhirlpoolProgramId(): PublicKey;
getOrcaWhirlpools(): Promise<OrcaWhirlpoolsResponse>;
/**
* Get token prices for a strategy - for use with orca sdk
* @param strategy
* @param prices
* @param collateralInfos
* @returns {Record<string, Decimal>} - token prices by mint string
* @private
*/
private getTokenPrices;
private getPoolTokensPrices;
getPool(poolAddress: PublicKey): Promise<PoolData | null>;
getStrategyWhirlpoolPoolAprApy(strategy: WhirlpoolStrategy, collateralInfos: CollateralInfo[], prices: KaminoPrices, whirlpools?: Whirlpool[]): Promise<WhirlpoolAprApy>;
getWhirlpoolLiquidityDistribution(pool: PublicKey, keepOrder?: boolean, lowestTick?: number, highestTick?: number): Promise<LiquidityDistribution>;
getWhirlpoolPositionAprApy(poolPubkey: PublicKey, priceLower: Decimal, priceUpper: Decimal, prices: KaminoPrices, whirlpools?: Whirlpool[]): Promise<WhirlpoolAprApy>;
getGenericPoolInfo(poolPubkey: PublicKey, whirlpools?: Whirlpool[]): Promise<GenericPoolInfo>;
getPositionsCountByPool(pool: PublicKey): Promise<number>;
}
//# sourceMappingURL=OrcaService.d.ts.map