UNPKG

@kamino-finance/kliquidity-sdk

Version:

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

75 lines 2.65 kB
import { Address, GetAccountInfoApi, GetMultipleAccountsApi, Rpc } from "@solana/kit"; import BN from "bn.js"; import * as types from "../types"; export interface WhirlpoolFields { whirlpoolsConfig: Address; whirlpoolBump: Array<number>; tickSpacing: number; tickSpacingSeed: Array<number>; feeRate: number; protocolFeeRate: number; liquidity: BN; sqrtPrice: BN; tickCurrentIndex: number; protocolFeeOwedA: BN; protocolFeeOwedB: BN; tokenMintA: Address; tokenVaultA: Address; feeGrowthGlobalA: BN; tokenMintB: Address; tokenVaultB: Address; feeGrowthGlobalB: BN; rewardLastUpdatedTimestamp: BN; rewardInfos: Array<types.WhirlpoolRewardInfoFields>; } export interface WhirlpoolJSON { whirlpoolsConfig: string; whirlpoolBump: Array<number>; tickSpacing: number; tickSpacingSeed: Array<number>; feeRate: number; protocolFeeRate: number; liquidity: string; sqrtPrice: string; tickCurrentIndex: number; protocolFeeOwedA: string; protocolFeeOwedB: string; tokenMintA: string; tokenVaultA: string; feeGrowthGlobalA: string; tokenMintB: string; tokenVaultB: string; feeGrowthGlobalB: string; rewardLastUpdatedTimestamp: string; rewardInfos: Array<types.WhirlpoolRewardInfoJSON>; } export declare class Whirlpool { readonly whirlpoolsConfig: Address; readonly whirlpoolBump: Array<number>; readonly tickSpacing: number; readonly tickSpacingSeed: Array<number>; readonly feeRate: number; readonly protocolFeeRate: number; readonly liquidity: BN; readonly sqrtPrice: BN; readonly tickCurrentIndex: number; readonly protocolFeeOwedA: BN; readonly protocolFeeOwedB: BN; readonly tokenMintA: Address; readonly tokenVaultA: Address; readonly feeGrowthGlobalA: BN; readonly tokenMintB: Address; readonly tokenVaultB: Address; readonly feeGrowthGlobalB: BN; readonly rewardLastUpdatedTimestamp: BN; readonly rewardInfos: Array<types.WhirlpoolRewardInfo>; static readonly discriminator: Buffer<ArrayBuffer>; static readonly layout: import("buffer-layout").Layout<Whirlpool>; constructor(fields: WhirlpoolFields); static fetch(rpc: Rpc<GetAccountInfoApi>, address: Address, programId?: Address): Promise<Whirlpool | null>; static fetchMultiple(rpc: Rpc<GetMultipleAccountsApi>, addresses: Address[], programId?: Address): Promise<Array<Whirlpool | null>>; static decode(data: Buffer): Whirlpool; toJSON(): WhirlpoolJSON; static fromJSON(obj: WhirlpoolJSON): Whirlpool; } //# sourceMappingURL=Whirlpool.d.ts.map