@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
321 lines • 11.1 kB
TypeScript
import { Address, GetAccountInfoApi, GetMultipleAccountsApi, Rpc } from "@solana/kit";
import BN from "bn.js";
import * as types from "../types";
export interface WhirlpoolStrategyFields {
adminAuthority: Address;
globalConfig: Address;
baseVaultAuthority: Address;
baseVaultAuthorityBump: BN;
pool: Address;
poolTokenVaultA: Address;
poolTokenVaultB: Address;
tickArrayLower: Address;
tickArrayUpper: Address;
position: Address;
positionMint: Address;
positionMetadata: Address;
positionTokenAccount: Address;
tokenAVault: Address;
tokenBVault: Address;
deprecated0: Array<Address>;
deprecated1: Array<BN>;
tokenAMint: Address;
tokenBMint: Address;
tokenAMintDecimals: BN;
tokenBMintDecimals: BN;
tokenAAmounts: BN;
tokenBAmounts: BN;
tokenACollateralId: BN;
tokenBCollateralId: BN;
scopePrices: Address;
deprecated2: Address;
sharesMint: Address;
sharesMintDecimals: BN;
sharesMintAuthority: Address;
sharesMintAuthorityBump: BN;
sharesIssued: BN;
status: BN;
reward0Amount: BN;
reward0Vault: Address;
reward0CollateralId: BN;
reward0Decimals: BN;
reward1Amount: BN;
reward1Vault: Address;
reward1CollateralId: BN;
reward1Decimals: BN;
reward2Amount: BN;
reward2Vault: Address;
reward2CollateralId: BN;
reward2Decimals: BN;
depositCapUsd: BN;
feesACumulative: BN;
feesBCumulative: BN;
reward0AmountCumulative: BN;
reward1AmountCumulative: BN;
reward2AmountCumulative: BN;
depositCapUsdPerIxn: BN;
withdrawalCapA: types.WithdrawalCapsFields;
withdrawalCapB: types.WithdrawalCapsFields;
maxPriceDeviationBps: BN;
swapVaultMaxSlippageBps: number;
swapVaultMaxSlippageFromReferenceBps: number;
strategyType: BN;
padding0: BN;
withdrawFee: BN;
feesFee: BN;
reward0Fee: BN;
reward1Fee: BN;
reward2Fee: BN;
positionTimestamp: BN;
kaminoRewards: Array<types.KaminoRewardInfoFields>;
strategyDex: BN;
raydiumProtocolPositionOrBaseVaultAuthority: Address;
allowDepositWithoutInvest: BN;
raydiumPoolConfigOrBaseVaultAuthority: Address;
depositBlocked: number;
creationStatus: number;
investBlocked: number;
/** share_calculation_method can be either DOLAR_BASED=0 or PROPORTION_BASED=1 */
shareCalculationMethod: number;
withdrawBlocked: number;
reservedFlag2: number;
localAdminBlocked: number;
flashVaultSwapAllowed: number;
referenceSwapPriceA: types.PriceFields;
referenceSwapPriceB: types.PriceFields;
isCommunity: number;
rebalanceType: number;
padding1: Array<number>;
rebalanceRaw: types.RebalanceRawFields;
padding2: Array<number>;
tokenAFeesFromRewardsCumulative: BN;
tokenBFeesFromRewardsCumulative: BN;
strategyLookupTable: Address;
lastSwapUnevenStepTimestamp: BN;
farm: Address;
rebalancesCap: types.WithdrawalCapsFields;
swapUnevenAuthority: Address;
tokenATokenProgram: Address;
tokenBTokenProgram: Address;
pendingAdmin: Address;
padding3: BN;
padding4: Array<BN>;
padding5: Array<BN>;
padding6: Array<BN>;
padding7: Array<BN>;
}
export interface WhirlpoolStrategyJSON {
adminAuthority: string;
globalConfig: string;
baseVaultAuthority: string;
baseVaultAuthorityBump: string;
pool: string;
poolTokenVaultA: string;
poolTokenVaultB: string;
tickArrayLower: string;
tickArrayUpper: string;
position: string;
positionMint: string;
positionMetadata: string;
positionTokenAccount: string;
tokenAVault: string;
tokenBVault: string;
deprecated0: Array<string>;
deprecated1: Array<string>;
tokenAMint: string;
tokenBMint: string;
tokenAMintDecimals: string;
tokenBMintDecimals: string;
tokenAAmounts: string;
tokenBAmounts: string;
tokenACollateralId: string;
tokenBCollateralId: string;
scopePrices: string;
deprecated2: string;
sharesMint: string;
sharesMintDecimals: string;
sharesMintAuthority: string;
sharesMintAuthorityBump: string;
sharesIssued: string;
status: string;
reward0Amount: string;
reward0Vault: string;
reward0CollateralId: string;
reward0Decimals: string;
reward1Amount: string;
reward1Vault: string;
reward1CollateralId: string;
reward1Decimals: string;
reward2Amount: string;
reward2Vault: string;
reward2CollateralId: string;
reward2Decimals: string;
depositCapUsd: string;
feesACumulative: string;
feesBCumulative: string;
reward0AmountCumulative: string;
reward1AmountCumulative: string;
reward2AmountCumulative: string;
depositCapUsdPerIxn: string;
withdrawalCapA: types.WithdrawalCapsJSON;
withdrawalCapB: types.WithdrawalCapsJSON;
maxPriceDeviationBps: string;
swapVaultMaxSlippageBps: number;
swapVaultMaxSlippageFromReferenceBps: number;
strategyType: string;
padding0: string;
withdrawFee: string;
feesFee: string;
reward0Fee: string;
reward1Fee: string;
reward2Fee: string;
positionTimestamp: string;
kaminoRewards: Array<types.KaminoRewardInfoJSON>;
strategyDex: string;
raydiumProtocolPositionOrBaseVaultAuthority: string;
allowDepositWithoutInvest: string;
raydiumPoolConfigOrBaseVaultAuthority: string;
depositBlocked: number;
creationStatus: number;
investBlocked: number;
/** share_calculation_method can be either DOLAR_BASED=0 or PROPORTION_BASED=1 */
shareCalculationMethod: number;
withdrawBlocked: number;
reservedFlag2: number;
localAdminBlocked: number;
flashVaultSwapAllowed: number;
referenceSwapPriceA: types.PriceJSON;
referenceSwapPriceB: types.PriceJSON;
isCommunity: number;
rebalanceType: number;
padding1: Array<number>;
rebalanceRaw: types.RebalanceRawJSON;
padding2: Array<number>;
tokenAFeesFromRewardsCumulative: string;
tokenBFeesFromRewardsCumulative: string;
strategyLookupTable: string;
lastSwapUnevenStepTimestamp: string;
farm: string;
rebalancesCap: types.WithdrawalCapsJSON;
swapUnevenAuthority: string;
tokenATokenProgram: string;
tokenBTokenProgram: string;
pendingAdmin: string;
padding3: string;
padding4: Array<string>;
padding5: Array<string>;
padding6: Array<string>;
padding7: Array<string>;
}
export declare class WhirlpoolStrategy {
readonly adminAuthority: Address;
readonly globalConfig: Address;
readonly baseVaultAuthority: Address;
readonly baseVaultAuthorityBump: BN;
readonly pool: Address;
readonly poolTokenVaultA: Address;
readonly poolTokenVaultB: Address;
readonly tickArrayLower: Address;
readonly tickArrayUpper: Address;
readonly position: Address;
readonly positionMint: Address;
readonly positionMetadata: Address;
readonly positionTokenAccount: Address;
readonly tokenAVault: Address;
readonly tokenBVault: Address;
readonly deprecated0: Array<Address>;
readonly deprecated1: Array<BN>;
readonly tokenAMint: Address;
readonly tokenBMint: Address;
readonly tokenAMintDecimals: BN;
readonly tokenBMintDecimals: BN;
readonly tokenAAmounts: BN;
readonly tokenBAmounts: BN;
readonly tokenACollateralId: BN;
readonly tokenBCollateralId: BN;
readonly scopePrices: Address;
readonly deprecated2: Address;
readonly sharesMint: Address;
readonly sharesMintDecimals: BN;
readonly sharesMintAuthority: Address;
readonly sharesMintAuthorityBump: BN;
readonly sharesIssued: BN;
readonly status: BN;
readonly reward0Amount: BN;
readonly reward0Vault: Address;
readonly reward0CollateralId: BN;
readonly reward0Decimals: BN;
readonly reward1Amount: BN;
readonly reward1Vault: Address;
readonly reward1CollateralId: BN;
readonly reward1Decimals: BN;
readonly reward2Amount: BN;
readonly reward2Vault: Address;
readonly reward2CollateralId: BN;
readonly reward2Decimals: BN;
readonly depositCapUsd: BN;
readonly feesACumulative: BN;
readonly feesBCumulative: BN;
readonly reward0AmountCumulative: BN;
readonly reward1AmountCumulative: BN;
readonly reward2AmountCumulative: BN;
readonly depositCapUsdPerIxn: BN;
readonly withdrawalCapA: types.WithdrawalCaps;
readonly withdrawalCapB: types.WithdrawalCaps;
readonly maxPriceDeviationBps: BN;
readonly swapVaultMaxSlippageBps: number;
readonly swapVaultMaxSlippageFromReferenceBps: number;
readonly strategyType: BN;
readonly padding0: BN;
readonly withdrawFee: BN;
readonly feesFee: BN;
readonly reward0Fee: BN;
readonly reward1Fee: BN;
readonly reward2Fee: BN;
readonly positionTimestamp: BN;
readonly kaminoRewards: Array<types.KaminoRewardInfo>;
readonly strategyDex: BN;
readonly raydiumProtocolPositionOrBaseVaultAuthority: Address;
readonly allowDepositWithoutInvest: BN;
readonly raydiumPoolConfigOrBaseVaultAuthority: Address;
readonly depositBlocked: number;
readonly creationStatus: number;
readonly investBlocked: number;
/** share_calculation_method can be either DOLAR_BASED=0 or PROPORTION_BASED=1 */
readonly shareCalculationMethod: number;
readonly withdrawBlocked: number;
readonly reservedFlag2: number;
readonly localAdminBlocked: number;
readonly flashVaultSwapAllowed: number;
readonly referenceSwapPriceA: types.Price;
readonly referenceSwapPriceB: types.Price;
readonly isCommunity: number;
readonly rebalanceType: number;
readonly padding1: Array<number>;
readonly rebalanceRaw: types.RebalanceRaw;
readonly padding2: Array<number>;
readonly tokenAFeesFromRewardsCumulative: BN;
readonly tokenBFeesFromRewardsCumulative: BN;
readonly strategyLookupTable: Address;
readonly lastSwapUnevenStepTimestamp: BN;
readonly farm: Address;
readonly rebalancesCap: types.WithdrawalCaps;
readonly swapUnevenAuthority: Address;
readonly tokenATokenProgram: Address;
readonly tokenBTokenProgram: Address;
readonly pendingAdmin: Address;
readonly padding3: BN;
readonly padding4: Array<BN>;
readonly padding5: Array<BN>;
readonly padding6: Array<BN>;
readonly padding7: Array<BN>;
static readonly discriminator: Buffer<ArrayBuffer>;
static readonly layout: import("buffer-layout").Layout<WhirlpoolStrategy>;
constructor(fields: WhirlpoolStrategyFields);
static fetch(rpc: Rpc<GetAccountInfoApi>, address: Address, programId?: Address): Promise<WhirlpoolStrategy | null>;
static fetchMultiple(rpc: Rpc<GetMultipleAccountsApi>, addresses: Address[], programId?: Address): Promise<Array<WhirlpoolStrategy | null>>;
static decode(data: Buffer): WhirlpoolStrategy;
toJSON(): WhirlpoolStrategyJSON;
static fromJSON(obj: WhirlpoolStrategyJSON): WhirlpoolStrategy;
}
//# sourceMappingURL=WhirlpoolStrategy.d.ts.map