@broxus/js-core
Version:
MobX-based JavaScript Core library
56 lines (55 loc) • 3.71 kB
TypeScript
import { type Address, type ProviderRpcClient, type Subscriber } from 'everscale-inpage-provider';
import { SmartContractModel } from '../../core';
import { type GaugeAccountAverages, type GaugeAccountDetails, type GaugeAccountPendingReward, type GaugeAccountPendingRewardParams, type GaugeAccountRewardDetails, GaugeAccountUtils } from '../../models/gauge-account/GaugeAccountUtils';
import { type Forceable, type Silentable, type Syncable, type Watchable } from '../../types';
export interface GaugeAccountCtorOptions {
watchDebounceDelay?: number;
}
export interface GaugeAccountCreateOptions extends GaugeAccountCtorOptions, Syncable, Watchable {
}
export interface GaugeAccountData extends Partial<GaugeAccountAverages>, Partial<GaugeAccountDetails>, Partial<GaugeAccountRewardDetails> {
minGas?: string;
}
export declare class GaugeAccount extends SmartContractModel<GaugeAccountData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<GaugeAccountCtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof GaugeAccountUtils;
/**
* @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address GaugeAccount root address
* @param {Readonly<GaugeAccountCtorOptions>} [options] (optional) GaugeAccount Smart Contract Model options
* @param {ProviderRpcClient} [_provider] (optional) RPC provider that require connection to the TVM wallet
*/
constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<GaugeAccountCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined);
/**
* @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address GaugeAccount root address
* @param {Readonly<GaugeAccountCreateOptions>} [options] (optional) GaugeAccount Smart Contract Model options
* @param {ProviderRpcClient} [provider] (optional) RPC provider that require connection to the TVM wallet
*/
static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<GaugeAccountCreateOptions>, provider?: ProviderRpcClient): Promise<GaugeAccount>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
calculateMinGas(): Promise<string>;
pendingReward(params: GaugeAccountPendingRewardParams): Promise<GaugeAccountPendingReward>;
get balance(): GaugeAccountData['balance'];
get curAverageState(): GaugeAccountData['curAverageState'];
get currentVersion(): GaugeAccountData['currentVersion'];
get extraReward(): GaugeAccountData['extraReward'];
get extraVesting(): GaugeAccountData['extraVesting'];
get gauge(): GaugeAccountData['gauge'];
get lastAverageState(): GaugeAccountData['lastAverageState'];
get lastUpdateTime(): GaugeAccountData['lastUpdateTime'];
get lockedBalance(): GaugeAccountData['lockedBalance'];
get lockBoostedBalance(): GaugeAccountData['lockBoostedBalance'];
get lockedDepositsNum(): GaugeAccountData['lockedDepositsNum'];
get qubeReward(): GaugeAccountData['qubeReward'];
get qubeVesting(): GaugeAccountData['qubeVesting'];
get totalBoostedBalance(): GaugeAccountData['totalBoostedBalance'];
get user(): GaugeAccountData['user'];
get veAccount(): GaugeAccountData['veAccount'];
get veBoostedBalance(): GaugeAccountData['veBoostedBalance'];
get voteEscrow(): GaugeAccountData['voteEscrow'];
}