UNPKG

@marinade.finance/kamino-sdk

Version:
76 lines (75 loc) 2.51 kB
/// <reference types="node" /> import { PublicKey, Connection } from '@solana/web3.js'; import BN from 'bn.js'; import * as types from '../types'; export interface WhirlpoolFields { whirlpoolsConfig: PublicKey; whirlpoolBump: Array<number>; tickSpacing: number; tickSpacingSeed: Array<number>; feeRate: number; protocolFeeRate: number; liquidity: BN; sqrtPrice: BN; tickCurrentIndex: number; protocolFeeOwedA: BN; protocolFeeOwedB: BN; tokenMintA: PublicKey; tokenVaultA: PublicKey; feeGrowthGlobalA: BN; tokenMintB: PublicKey; tokenVaultB: PublicKey; 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: PublicKey; 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: PublicKey; readonly tokenVaultA: PublicKey; readonly feeGrowthGlobalA: BN; readonly tokenMintB: PublicKey; readonly tokenVaultB: PublicKey; readonly feeGrowthGlobalB: BN; readonly rewardLastUpdatedTimestamp: BN; readonly rewardInfos: Array<types.WhirlpoolRewardInfo>; static readonly discriminator: Buffer; static readonly layout: any; constructor(fields: WhirlpoolFields); static fetch(c: Connection, address: PublicKey): Promise<Whirlpool | null>; static fetchMultiple(c: Connection, addresses: PublicKey[]): Promise<Array<Whirlpool | null>>; static decode(data: Buffer): Whirlpool; toJSON(): WhirlpoolJSON; static fromJSON(obj: WhirlpoolJSON): Whirlpool; }