@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
180 lines • 7.74 kB
TypeScript
import { Address, GetAccountInfoApi, GetMultipleAccountsApi, Rpc } from "@solana/kit";
import BN from "bn.js";
import * as types from "../types";
export interface LbPairFields {
parameters: types.StaticParametersFields;
vParameters: types.VariableParametersFields;
bumpSeed: Array<number>;
/** Bin step signer seed */
binStepSeed: Array<number>;
/** Type of the pair */
pairType: number;
/** Active bin id */
activeId: number;
/** Bin step. Represent the price increment / decrement. */
binStep: number;
/** Status of the pair. Check PairStatus enum. */
status: number;
requireBaseFactorSeed: number;
baseFactorSeed: Array<number>;
padding1: Array<number>;
/** Token X mint */
tokenXMint: Address;
/** Token Y mint */
tokenYMint: Address;
/** LB token X vault */
reserveX: Address;
/** LB token Y vault */
reserveY: Address;
/** Uncollected protocol fee */
protocolFee: types.ProtocolFeeFields;
/** Protocol fee owner, */
feeOwner: Address;
/** Farming reward information */
rewardInfos: Array<types.RewardInfoFields>;
/** Oracle pubkey */
oracle: Address;
/** Packed initialized bin array state */
binArrayBitmap: Array<BN>;
/** Last time the pool fee parameter was updated */
lastUpdatedAt: BN;
/** Whitelisted wallet */
whitelistedWallet: Address;
/** Address allowed to swap when the current slot is greater than or equal to the pre-activation slot. The pre-activation slot is calculated as `activation_slot - pre_activation_slot_duration`. */
preActivationSwapAddress: Address;
/** Base keypair. Only required for permission pair */
baseKey: Address;
/** Slot to enable the pair. Only applicable for permission pair. */
activationSlot: BN;
/** Number of slot before activation slot. Used to calculate pre-activation slot for pre_activation_swap_address */
preActivationSlotDuration: BN;
/** _padding2 is reclaimed free space from swap_cap_deactivate_slot and swap_cap_amount before, BE CAREFUL FOR TOMBSTONE WHEN REUSE !! */
padding2: Array<number>;
/** Liquidity lock duration for positions which created before activate. Only applicable for permission pair. */
lockDurationsInSlot: BN;
/** Pool creator */
creator: Address;
/** Reserved space for future use */
reserved: Array<number>;
}
export interface LbPairJSON {
parameters: types.StaticParametersJSON;
vParameters: types.VariableParametersJSON;
bumpSeed: Array<number>;
/** Bin step signer seed */
binStepSeed: Array<number>;
/** Type of the pair */
pairType: number;
/** Active bin id */
activeId: number;
/** Bin step. Represent the price increment / decrement. */
binStep: number;
/** Status of the pair. Check PairStatus enum. */
status: number;
requireBaseFactorSeed: number;
baseFactorSeed: Array<number>;
padding1: Array<number>;
/** Token X mint */
tokenXMint: string;
/** Token Y mint */
tokenYMint: string;
/** LB token X vault */
reserveX: string;
/** LB token Y vault */
reserveY: string;
/** Uncollected protocol fee */
protocolFee: types.ProtocolFeeJSON;
/** Protocol fee owner, */
feeOwner: string;
/** Farming reward information */
rewardInfos: Array<types.RewardInfoJSON>;
/** Oracle pubkey */
oracle: string;
/** Packed initialized bin array state */
binArrayBitmap: Array<string>;
/** Last time the pool fee parameter was updated */
lastUpdatedAt: string;
/** Whitelisted wallet */
whitelistedWallet: string;
/** Address allowed to swap when the current slot is greater than or equal to the pre-activation slot. The pre-activation slot is calculated as `activation_slot - pre_activation_slot_duration`. */
preActivationSwapAddress: string;
/** Base keypair. Only required for permission pair */
baseKey: string;
/** Slot to enable the pair. Only applicable for permission pair. */
activationSlot: string;
/** Number of slot before activation slot. Used to calculate pre-activation slot for pre_activation_swap_address */
preActivationSlotDuration: string;
/** _padding2 is reclaimed free space from swap_cap_deactivate_slot and swap_cap_amount before, BE CAREFUL FOR TOMBSTONE WHEN REUSE !! */
padding2: Array<number>;
/** Liquidity lock duration for positions which created before activate. Only applicable for permission pair. */
lockDurationsInSlot: string;
/** Pool creator */
creator: string;
/** Reserved space for future use */
reserved: Array<number>;
}
export declare class LbPair {
readonly parameters: types.StaticParameters;
readonly vParameters: types.VariableParameters;
readonly bumpSeed: Array<number>;
/** Bin step signer seed */
readonly binStepSeed: Array<number>;
/** Type of the pair */
readonly pairType: number;
/** Active bin id */
readonly activeId: number;
/** Bin step. Represent the price increment / decrement. */
readonly binStep: number;
/** Status of the pair. Check PairStatus enum. */
readonly status: number;
readonly requireBaseFactorSeed: number;
readonly baseFactorSeed: Array<number>;
readonly padding1: Array<number>;
/** Token X mint */
readonly tokenXMint: Address;
/** Token Y mint */
readonly tokenYMint: Address;
/** LB token X vault */
readonly reserveX: Address;
/** LB token Y vault */
readonly reserveY: Address;
/** Uncollected protocol fee */
readonly protocolFee: types.ProtocolFee;
/** Protocol fee owner, */
readonly feeOwner: Address;
/** Farming reward information */
readonly rewardInfos: Array<types.RewardInfo>;
/** Oracle pubkey */
readonly oracle: Address;
/** Packed initialized bin array state */
readonly binArrayBitmap: Array<BN>;
/** Last time the pool fee parameter was updated */
readonly lastUpdatedAt: BN;
/** Whitelisted wallet */
readonly whitelistedWallet: Address;
/** Address allowed to swap when the current slot is greater than or equal to the pre-activation slot. The pre-activation slot is calculated as `activation_slot - pre_activation_slot_duration`. */
readonly preActivationSwapAddress: Address;
/** Base keypair. Only required for permission pair */
readonly baseKey: Address;
/** Slot to enable the pair. Only applicable for permission pair. */
readonly activationSlot: BN;
/** Number of slot before activation slot. Used to calculate pre-activation slot for pre_activation_swap_address */
readonly preActivationSlotDuration: BN;
/** _padding2 is reclaimed free space from swap_cap_deactivate_slot and swap_cap_amount before, BE CAREFUL FOR TOMBSTONE WHEN REUSE !! */
readonly padding2: Array<number>;
/** Liquidity lock duration for positions which created before activate. Only applicable for permission pair. */
readonly lockDurationsInSlot: BN;
/** Pool creator */
readonly creator: Address;
/** Reserved space for future use */
readonly reserved: Array<number>;
static readonly discriminator: Buffer<ArrayBuffer>;
static readonly layout: import("buffer-layout").Layout<LbPair>;
constructor(fields: LbPairFields);
static fetch(rpc: Rpc<GetAccountInfoApi>, address: Address, programId?: Address): Promise<LbPair | null>;
static fetchMultiple(rpc: Rpc<GetMultipleAccountsApi>, addresses: Address[], programId?: Address): Promise<Array<LbPair | null>>;
static decode(data: Buffer): LbPair;
toJSON(): LbPairJSON;
static fromJSON(obj: LbPairJSON): LbPair;
}
//# sourceMappingURL=LbPair.d.ts.map