UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

55 lines (54 loc) 2.91 kB
import { type Address, type Contract, type ProviderRpcClient, type Subscriber } from 'everscale-inpage-provider'; import { SmartContractModel } from '../../core'; import { CONFIG_ABI } from '../../models/master-chain-config/constants'; import { type Forceable, type Silentable, type Syncable, type Watchable } from '../../types'; export interface MasterChainConfigCtorOptions { watchDebounceDelay?: number; } export interface MasterChainCreateOptions extends MasterChainConfigCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface MasterChainConfigData { tag1: string; gasPrice: string; gasLimit: string; tag2: string; specialGasLimit: string; gasCredit: string; blockGasLimit: string; freezeDueLimit: string; deleteDueLimit: string; flatGasLimit: string; flatGasPrice: string; } export declare class MasterChainConfig extends SmartContractModel<MasterChainConfigData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<MasterChainConfigCtorOptions> | undefined; protected readonly _contract: Contract<typeof CONFIG_ABI>; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address MasterChainConfig root address * @param {Readonly<MasterChainConfigCtorOptions>} [options] (optional) MasterChainConfig Smart Contract Model options */ constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<MasterChainConfigCtorOptions> | undefined); /** * @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address MasterChainConfig root address * @param {Readonly<MasterChainCreateOptions>} [options] (optional) MasterChainConfig Smart Contract Model options */ static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<MasterChainCreateOptions>): Promise<MasterChainConfig>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; protected syncParams(): Promise<void>; get gasPrice(): MasterChainConfigData['gasPrice']; get gasLimit(): MasterChainConfigData['gasLimit']; get tag2(): MasterChainConfigData['tag2']; get specialGasLimit(): MasterChainConfigData['specialGasLimit']; get gasCredit(): MasterChainConfigData['gasCredit']; get blockGasLimit(): MasterChainConfigData['blockGasLimit']; get freezeDueLimit(): MasterChainConfigData['freezeDueLimit']; get deleteDueLimit(): MasterChainConfigData['deleteDueLimit']; get flatGasLimit(): MasterChainConfigData['flatGasLimit']; get flatGasPrice(): MasterChainConfigData['flatGasPrice']; }