UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

35 lines (34 loc) 2.7 kB
import { type Address, type DecodeEventParams, type DecodeTransactionParams, type ProviderRpcClient, type SendInternalParams, type Transaction } from 'everscale-inpage-provider'; import { SmartContractModel } from '../../core'; import { type TokenFactoryAbi } from '../../models/tvm-token-factory/abi'; import { type TvmTokenFactoryCreateTokenAbiParams, type TvmTokenFactoryDecodedEvent, type TvmTokenFactoryDecodedTransaction, TvmTokenFactoryUtils } from '../../models/tvm-token-factory/TvmTokenFactoryUtils'; import { type SendMessageCallback, type Syncable, type TransactionCallbacks, type TransactionFailureReason, type TransactionSuccessResult, type Watchable } from '../../types'; export interface TvmTokenFactoryDeployRootSuccessResult { tokenAddress: Address; } export interface TvmTokenFactoryDeployRootCallbacks extends TransactionCallbacks<TransactionSuccessResult<TvmTokenFactoryDeployRootSuccessResult>, TransactionFailureReason>, SendMessageCallback { } export interface TvmTokenFactoryCreateTokenParams extends TvmTokenFactoryCreateTokenAbiParams, TvmTokenFactoryDeployRootCallbacks { } export interface TvmTokenFactoryCreateOptions extends TvmTokenFactoryCtorOptions, Syncable, Watchable { } export interface TvmTokenFactoryCtorOptions { watchDebounceDelay?: number; } export declare class TvmTokenFactory extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TvmTokenFactoryCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TvmTokenFactoryUtils; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address TvmTokenFactory root address * @param {Readonly<TvmTokenFactoryCtorOptions>} [options] (optional) TvmTokenFactory 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<TvmTokenFactoryCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined); createToken(params: TvmTokenFactoryCreateTokenParams, args?: SendInternalParams): Promise<Transaction | undefined>; decodeEvent(args: DecodeEventParams<typeof TokenFactoryAbi>): Promise<TvmTokenFactoryDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TokenFactoryAbi>): Promise<TvmTokenFactoryDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TvmTokenFactoryDecodedEvent[]>; }