import { PublicKey, TransactionInstruction, TransactionMessage } from '@solana/web3.js'; import { WhirlpoolStrategy } from '../kamino-client/accounts'; import { Dex } from './utils'; import Decimal from 'decimal.js'; import { RebalanceTypeKind } from '../kamino-client/types'; export declare const RAYDIUM_DEVNET_PROGRAM_ID: PublicKey; export type StrategyType = 'NON_PEGGED' | 'PEGGED' | 'STABLE'; export type StrategyCreationStatus = 'IGNORED' | 'SHADOW' | 'LIVE' | 'DEPRECATED' | 'STAGING'; export type StrategiesFilters = { strategyType?: StrategyType; strategyCreationStatus?: StrategyCreationStatus; isCommunity?: boolean; }; export declare function strategyTypeToBase58(strategyType: StrategyType): string; export declare function strategyTypeToNumber(strategyType: StrategyType): number; export declare function getStrategyTypeFromStrategy(strategy: WhirlpoolStrategy): StrategyType; export declare function strategyCreationStatusToBase58(strategyCreationStatus: StrategyCreationStatus): string; export declare function strategyCreationStatusToNumber(strategyCreationStatus: StrategyCreationStatus): number; export declare function getStrategyCreationStatusFromStrategy(strategy: WhirlpoolStrategy): StrategyCreationStatus; export interface GenericPoolInfo { dex: Dex; address: PublicKey; tokenMintA: PublicKey; tokenMintB: PublicKey; price: Decimal; feeRate: Decimal; volumeOnLast7d: Decimal | undefined; tvl: Decimal | undefined; tickSpacing: Decimal; positions: Decimal; } export interface GenericPositionRangeInfo { estimatedApy: Decimal; estimatedVolume: Decimal | undefined; } export interface VaultParameters { tokenMintA: PublicKey; tokenMintB: PublicKey; dex: Dex; feeTier: Decimal; rebalancingParameters: RebalanceFieldInfo[]; } export interface LiquidityDistribution { currentPrice: Decimal; currentTickIndex: number; distribution: LiquidityForPrice[]; } export interface LiquidityForPrice { price: Decimal; liquidity: Decimal; tickIndex: number; } export interface DepositAmountsForSwap { requiredAAmountToDeposit: Decimal; requiredBAmountToDeposit: Decimal; tokenAToSwapAmount: Decimal; tokenBToSwapAmount: Decimal; } export declare function depositAmountsForSwapToLamports(depositAmounts: DepositAmountsForSwap, tokenADecimals: number, tokenBDecimals: number): DepositAmountsForSwap; export interface RebalanceParams { rebalanceType: RebalanceTypeKind; lowerRangeBps?: Decimal; upperRangeBps?: Decimal; resetRangeLowerBps?: Decimal; resetRangeUpperBps?: Decimal; startMidTick?: Decimal; ticksBelowMid?: Decimal; ticksAboveMid?: Decimal; secondsPerTick?: Decimal; driftDirection?: Decimal; period?: Decimal; lowerRangePrice?: Decimal; upperRangePrice?: Decimal; destinationToken?: Decimal; } export interface RebalanceParamsAsPrices { rebalanceType: RebalanceTypeKind; rangePriceLower: Decimal; rangePriceUpper: Decimal; resetPriceLower?: Decimal; resetPriceUpper?: Decimal; } export interface PositionRange { lowerPrice: Decimal; upperPrice: Decimal; } export interface MaybeTokensBalances { a?: Decimal; b?: Decimal; } export interface TokensBalances { a: Decimal; b: Decimal; } export interface SwapperIxBuilder { (input: DepositAmountsForSwap, tokenAMint: PublicKey, tokenBMint: PublicKey, owner: PublicKey, slippage: Decimal, allKeys: PublicKey[]): Promise<[TransactionInstruction[], PublicKey[]]>; } export interface ProfiledFunctionExecution { (promise: Promise, transactionName: string, tags: [string, string][]): Promise; } export declare function noopProfiledFunctionExecution(promise: Promise, transactionName: string): Promise; export interface CreateAta { ata: PublicKey; createIxns: TransactionInstruction[]; closeIxns: TransactionInstruction[]; } export interface DeserializedVersionedTransaction { txMessage: TransactionMessage[]; lookupTablesAddresses: PublicKey[]; } export interface InstructionsWithLookupTables { instructions: TransactionInstruction[]; lookupTablesAddresses: PublicKey[]; } export interface PerformanceFees { feesFeeBPS: Decimal; reward0FeeBPS: Decimal; reward1FeeBPS: Decimal; reward2FeeBPS: Decimal; } export interface RebalanceFieldInfo { label: string; type: string; value: Decimal | string; enabled: boolean; } export type RebalanceFieldsDict = { [key: string]: Decimal; }; export interface PriceReferenceType { name: string; descriptionShort?: string; description?: string; } export interface InputRebalanceFieldInfo { label: string; value: Decimal; } export interface WithdrawAllAndCloseIxns { withdrawIxns: TransactionInstruction[]; closeIxn: TransactionInstruction; }