UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

44 lines (43 loc) 2.64 kB
import { type Address, type ProviderRpcClient, type Subscriber } from 'everscale-inpage-provider'; import { SmartContractModel } from '../../core'; import { type DexCtorOptions } from '../../models/dex'; import { DexGasValuesUtils, type GetAccountDepositGasParams, type GetAccountWithdrawGasParams, type GetAddPoolGasAbiParams, type GetDeployPoolGasAbiParams, type GetPoolDirectNoFeeWithdrawGasAbiParams } from '../../models/dex-gas-values/DexGasValuesUtils'; import { type Forceable, type Silentable, type Syncable, type Watchable } from '../../types'; export interface DexGasValuesCtorOptions { /** * Gas price * @default 1000 */ gasPrice?: string | number; watchDebounceDelay?: number; } export interface DexGasValuesCreateOptions extends DexCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class DexGasValues extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<DexGasValuesCtorOptions> | undefined; static Utils: typeof DexGasValuesUtils; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address DexGasValues root address * @param {Readonly<DexCtorOptions>} [options] (optional) DexGasValues Smart Contract Model options */ constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<DexGasValuesCtorOptions> | undefined); /** * @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address DexGasValues root address * @param {Readonly<DexGasValuesCreateOptions>} [options] (optional) DexGasValues Smart Contract Model options */ static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<DexGasValuesCreateOptions>): Promise<DexGasValues>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; getDeployAccountGas(): Promise<string>; getDepositToAccountGas(): Promise<string>; getAccountWithdrawGas(params: GetAccountWithdrawGasParams): Promise<string>; getAccountDepositGas(params: GetAccountDepositGasParams): Promise<string>; getAddPoolGas(params: GetAddPoolGasAbiParams): Promise<string>; getDeployPoolGas(params: GetDeployPoolGasAbiParams): Promise<string>; getPoolDirectNoFeeWithdrawGas(params: GetPoolDirectNoFeeWithdrawGasAbiParams): Promise<string>; }