UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

69 lines (68 loc) 3.41 kB
import { type Address, type Contract, type ProviderRpcClient, type Subscriber } from 'everscale-inpage-provider'; import { SmartContractModel } from '../../core'; import { CONFIG_ABI } from '../../models/network-config/constants'; import { type Forceable, type Silentable, type Syncable, type Watchable } from '../../types'; export interface MasterChainConfigCtorOptions { ttl?: number; watchDebounceDelay?: number; } export interface MasterChainCreateOptions extends MasterChainConfigCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface MasterChainConfigData { bitPrice: string; blockGasLimit: string; cellPrice: string; deleteDueLimit: string; firstFrac: string; flatGasLimit: string; flatGasPrice: string; freezeDueLimit: string; gasCredit: string; gasLimit: string; gasPrice: string; ihrPriceFactor: string; lumpPrice: string; nextFrac: string; specialGasLimit: string; } interface SyncOptions extends Forceable, Silentable { ttl?: number; } 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?: SyncOptions): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; protected syncParams(): Promise<void>; get bitPrice(): MasterChainConfigData['bitPrice']; get blockGasLimit(): MasterChainConfigData['blockGasLimit']; get cellPrice(): MasterChainConfigData['cellPrice']; get deleteDueLimit(): MasterChainConfigData['deleteDueLimit']; get firstFrac(): MasterChainConfigData['firstFrac']; get flatGasLimit(): MasterChainConfigData['flatGasLimit']; get flatGasPrice(): MasterChainConfigData['flatGasPrice']; get freezeDueLimit(): MasterChainConfigData['freezeDueLimit']; get gasCredit(): MasterChainConfigData['gasCredit']; get gasLimit(): MasterChainConfigData['gasLimit']; get gasPrice(): MasterChainConfigData['gasPrice']; get ihrPriceFactor(): MasterChainConfigData['ihrPriceFactor']; get lumpPrice(): MasterChainConfigData['lumpPrice']; get nextFrac(): MasterChainConfigData['nextFrac']; get specialGasLimit(): MasterChainConfigData['specialGasLimit']; } export {};