UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

75 lines (74 loc) 3 kB
import { type Address, type FullContractState, type ProviderRpcClient } from 'everscale-inpage-provider'; import { type GaugeRewardRound } from '../../models/gauge'; export interface GaugeAccountPendingRewardParams { gaugeSyncData: { depositSupply: string; depositSupplyAverage: string; depositSupplyAveragePeriod: number; extraRewardRounds: GaugeRewardRound[][]; poolLastRewardTime: number; qubeRewardRounds: GaugeRewardRound[]; }; veAccQubeAverage: string; veAccQubeAveragePeriod: number; veQubeAverage: string; veQubeAveragePeriod: number; } export interface GaugeAccountAverageState { lockBoostedBalanceAverage: string; lockBoostedBalanceAveragePeriod: number; gaugeSupplyAverage: string; gaugeSupplyAveragePeriod: number; veAccQubeAverage: string; veAccQubeAveragePeriod: number; veQubeAverage: string; veQubeAveragePeriod: number; } export interface GaugeAccountAverages { curAverageState: GaugeAccountAverageState; lastAverageState: GaugeAccountAverageState; } export interface GaugeAccountDetails { balance: string; currentVersion: string; gauge: Address; lastUpdateTime: number; lockBoostedBalance: string; lockedBalance: string; lockedDepositsNum: number; totalBoostedBalance: string; user: Address; veAccount: Address; veBoostedBalance: string; voteEscrow: Address; } export interface GaugeAccountReward { accRewardPerShare: string; lastRewardTime: number; lockedReward: string; unlockedReward: string; } export interface GaugeAccountVesting { vestingPeriod: number; vestingRatio: number; vestingTime: number; } export interface GaugeAccountRewardDetails { extraReward: GaugeAccountReward[]; extraVesting: GaugeAccountVesting[]; qubeReward: GaugeAccountReward; qubeVesting: GaugeAccountVesting; } export interface GaugeAccountPendingReward { extraReward: GaugeAccountReward[]; extraVesting: GaugeAccountVesting[]; qubeReward: GaugeAccountReward; qubeVesting: GaugeAccountVesting; } export declare abstract class GaugeAccountUtils { static calculateMinGas(connection: ProviderRpcClient, gaugeAccountAddress: Address | string, cachedState?: FullContractState): Promise<string>; static getAverages(connection: ProviderRpcClient, gaugeAccountAddress: Address | string, cachedState?: FullContractState): Promise<GaugeAccountAverages>; static getDetails(connection: ProviderRpcClient, gaugeAccountAddress: Address | string, cachedState?: FullContractState): Promise<GaugeAccountDetails>; static getRewardDetails(connection: ProviderRpcClient, gaugeAccountAddress: Address | string, cachedState?: FullContractState): Promise<GaugeAccountRewardDetails>; static pendingReward(connection: ProviderRpcClient, gaugeAccountAddress: Address | string, params: GaugeAccountPendingRewardParams, cachedState?: FullContractState): Promise<GaugeAccountPendingReward>; }