UNPKG

@kamino-finance/kliquidity-sdk

Version:

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

114 lines 4.93 kB
import { Address, GetAccountInfoApi, GetMultipleAccountsApi, Rpc } from "@solana/kit"; import BN from "bn.js"; import * as types from "../types"; export interface PositionV2Fields { /** The LB pair of this position */ lbPair: Address; /** Owner of the position. Client rely on this to to fetch their positions. */ owner: Address; /** Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept. */ liquidityShares: Array<BN>; /** Farming reward information */ rewardInfos: Array<types.UserRewardInfoFields>; /** Swap fee to claim information */ feeInfos: Array<types.FeeInfoFields>; /** Lower bin ID */ lowerBinId: number; /** Upper bin ID */ upperBinId: number; /** Last updated timestamp */ lastUpdatedAt: BN; /** Total claimed token fee X */ totalClaimedFeeXAmount: BN; /** Total claimed token fee Y */ totalClaimedFeeYAmount: BN; /** Total claimed rewards */ totalClaimedRewards: Array<BN>; /** Operator of position */ operator: Address; /** Slot which the locked liquidity can be withdraw */ lockReleaseSlot: BN; /** Is the position subjected to liquidity locking for the launch pool. */ subjectedToBootstrapLiquidityLocking: number; /** Address is able to claim fee in this position, only valid for bootstrap_liquidity_position */ feeOwner: Address; /** Reserved space for future use */ reserved: Array<number>; } export interface PositionV2JSON { /** The LB pair of this position */ lbPair: string; /** Owner of the position. Client rely on this to to fetch their positions. */ owner: string; /** Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept. */ liquidityShares: Array<string>; /** Farming reward information */ rewardInfos: Array<types.UserRewardInfoJSON>; /** Swap fee to claim information */ feeInfos: Array<types.FeeInfoJSON>; /** Lower bin ID */ lowerBinId: number; /** Upper bin ID */ upperBinId: number; /** Last updated timestamp */ lastUpdatedAt: string; /** Total claimed token fee X */ totalClaimedFeeXAmount: string; /** Total claimed token fee Y */ totalClaimedFeeYAmount: string; /** Total claimed rewards */ totalClaimedRewards: Array<string>; /** Operator of position */ operator: string; /** Slot which the locked liquidity can be withdraw */ lockReleaseSlot: string; /** Is the position subjected to liquidity locking for the launch pool. */ subjectedToBootstrapLiquidityLocking: number; /** Address is able to claim fee in this position, only valid for bootstrap_liquidity_position */ feeOwner: string; /** Reserved space for future use */ reserved: Array<number>; } export declare class PositionV2 { /** The LB pair of this position */ readonly lbPair: Address; /** Owner of the position. Client rely on this to to fetch their positions. */ readonly owner: Address; /** Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept. */ readonly liquidityShares: Array<BN>; /** Farming reward information */ readonly rewardInfos: Array<types.UserRewardInfo>; /** Swap fee to claim information */ readonly feeInfos: Array<types.FeeInfo>; /** Lower bin ID */ readonly lowerBinId: number; /** Upper bin ID */ readonly upperBinId: number; /** Last updated timestamp */ readonly lastUpdatedAt: BN; /** Total claimed token fee X */ readonly totalClaimedFeeXAmount: BN; /** Total claimed token fee Y */ readonly totalClaimedFeeYAmount: BN; /** Total claimed rewards */ readonly totalClaimedRewards: Array<BN>; /** Operator of position */ readonly operator: Address; /** Slot which the locked liquidity can be withdraw */ readonly lockReleaseSlot: BN; /** Is the position subjected to liquidity locking for the launch pool. */ readonly subjectedToBootstrapLiquidityLocking: number; /** Address is able to claim fee in this position, only valid for bootstrap_liquidity_position */ readonly feeOwner: Address; /** Reserved space for future use */ readonly reserved: Array<number>; static readonly discriminator: Buffer<ArrayBuffer>; static readonly layout: import("buffer-layout").Layout<PositionV2>; constructor(fields: PositionV2Fields); static fetch(rpc: Rpc<GetAccountInfoApi>, address: Address, programId?: Address): Promise<PositionV2 | null>; static fetchMultiple(rpc: Rpc<GetMultipleAccountsApi>, addresses: Address[], programId?: Address): Promise<Array<PositionV2 | null>>; static decode(data: Buffer): PositionV2; toJSON(): PositionV2JSON; static fromJSON(obj: PositionV2JSON): PositionV2; } //# sourceMappingURL=PositionV2.d.ts.map