UNPKG

kamino-sdk-beta

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

180 lines 7.69 kB
import { PublicKey, Connection } from "@solana/web3.js"; 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: PublicKey; /** Token Y mint */ tokenYMint: PublicKey; /** LB token X vault */ reserveX: PublicKey; /** LB token Y vault */ reserveY: PublicKey; /** Uncollected protocol fee */ protocolFee: types.ProtocolFeeFields; /** Protocol fee owner, */ feeOwner: PublicKey; /** Farming reward information */ rewardInfos: Array<types.RewardInfoFields>; /** Oracle pubkey */ oracle: PublicKey; /** Packed initialized bin array state */ binArrayBitmap: Array<BN>; /** Last time the pool fee parameter was updated */ lastUpdatedAt: BN; /** Whitelisted wallet */ whitelistedWallet: PublicKey; /** 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: PublicKey; /** Base keypair. Only required for permission pair */ baseKey: PublicKey; /** 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: PublicKey; /** 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: PublicKey; /** Token Y mint */ readonly tokenYMint: PublicKey; /** LB token X vault */ readonly reserveX: PublicKey; /** LB token Y vault */ readonly reserveY: PublicKey; /** Uncollected protocol fee */ readonly protocolFee: types.ProtocolFee; /** Protocol fee owner, */ readonly feeOwner: PublicKey; /** Farming reward information */ readonly rewardInfos: Array<types.RewardInfo>; /** Oracle pubkey */ readonly oracle: PublicKey; /** Packed initialized bin array state */ readonly binArrayBitmap: Array<BN>; /** Last time the pool fee parameter was updated */ readonly lastUpdatedAt: BN; /** Whitelisted wallet */ readonly whitelistedWallet: PublicKey; /** 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: PublicKey; /** Base keypair. Only required for permission pair */ readonly baseKey: PublicKey; /** 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: PublicKey; /** Reserved space for future use */ readonly reserved: Array<number>; static readonly discriminator: Buffer<ArrayBuffer>; static readonly layout: any; constructor(fields: LbPairFields); static fetch(c: Connection, address: PublicKey, programId?: PublicKey): Promise<LbPair | null>; static fetchMultiple(c: Connection, addresses: PublicKey[], programId?: PublicKey): Promise<Array<LbPair | null>>; static decode(data: Buffer): LbPair; toJSON(): LbPairJSON; static fromJSON(obj: LbPairJSON): LbPair; } //# sourceMappingURL=LbPair.d.ts.map