@broxus/js-core
Version:
MobX-based JavaScript Core library
69 lines (68 loc) • 3.38 kB
TypeScript
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 ShardChainConfigCtorOptions {
ttl?: number;
watchDebounceDelay?: number;
}
export interface ShardChainCreateOptions extends ShardChainConfigCtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export interface ShardChainConfigData {
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 ShardChainConfig extends SmartContractModel<ShardChainConfigData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<ShardChainConfigCtorOptions> | 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 ShardChainConfig root address
* @param {Readonly<ShardChainConfigCtorOptions>} [options] (optional) ShardChainConfig Smart Contract Model options
*/
constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<ShardChainConfigCtorOptions> | undefined);
/**
* @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address ShardChainConfig root address
* @param {Readonly<ShardChainCreateOptions>} [options] (optional) ShardChainConfig Smart Contract Model options
*/
static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<ShardChainCreateOptions>): Promise<ShardChainConfig>;
sync(options?: SyncOptions): Promise<void>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
protected syncParams(): Promise<void>;
get bitPrice(): ShardChainConfigData['bitPrice'];
get blockGasLimit(): ShardChainConfigData['blockGasLimit'];
get cellPrice(): ShardChainConfigData['cellPrice'];
get deleteDueLimit(): ShardChainConfigData['deleteDueLimit'];
get firstFrac(): ShardChainConfigData['firstFrac'];
get flatGasLimit(): ShardChainConfigData['flatGasLimit'];
get flatGasPrice(): ShardChainConfigData['flatGasPrice'];
get freezeDueLimit(): ShardChainConfigData['freezeDueLimit'];
get gasCredit(): ShardChainConfigData['gasCredit'];
get gasLimit(): ShardChainConfigData['gasLimit'];
get gasPrice(): ShardChainConfigData['gasPrice'];
get ihrPriceFactor(): ShardChainConfigData['ihrPriceFactor'];
get lumpPrice(): ShardChainConfigData['lumpPrice'];
get nextFrac(): ShardChainConfigData['nextFrac'];
get specialGasLimit(): ShardChainConfigData['specialGasLimit'];
}
export {};