UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

50 lines (49 loc) 3.48 kB
import { type Forceable, type Silentable, SmartContractModel, type Syncable, type Watchable } from '@broxus/js-core'; import { type Address, type DecodeEventParams, type DecodeTransactionParams, type ProviderRpcClient, type Subscriber, type Transaction } from 'everscale-inpage-provider'; import { type TvmEvmBaseEventAbi } from '../../models/tvm-evm-base-event/abi'; import { type TvmEvmBaseEventDecodedEvent, type TvmEvmBaseEventDecodedTransaction, type TvmEvmBaseEventDetails, TvmEvmBaseEventUtils } from '../../models/tvm-evm-base-event/TvmEvmBaseEventUtils'; export interface TvmEvmBaseEventCtorOptions { watchDebounceDelay?: number; } export interface TvmEvmBaseEventCreateOptions extends TvmEvmBaseEventCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface TvmEvmBaseEventData extends TvmEvmBaseEventDetails { } export declare class TvmEvmBaseEvent extends SmartContractModel<TvmEvmBaseEventData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TvmEvmBaseEventCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TvmEvmBaseEventUtils; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address Transfer Event root address * @param {Readonly<TvmEvmBaseEventCtorOptions>} [options] (optional) Transfer Event ABI Wrapper options * @param {ProviderRpcClient} [_provider] (optional) RPC provider that require connection to the TVM wallet */ constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<TvmEvmBaseEventCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined); /** * @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address Transfer Event root address * @param {Readonly<TvmEvmBaseEventCreateOptions>} [options] (optional) Transfer Event ABI Wrapper options * @param {ProviderRpcClient} [provider] (optional) RPC provider that require connection to the TVM wallet */ static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<TvmEvmBaseEventCreateOptions>, provider?: ProviderRpcClient): Promise<TvmEvmBaseEvent>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; relayRound(): Promise<Address>; roundNumber(): Promise<number>; get balance(): TvmEvmBaseEventData['balance']; get confirms(): TvmEvmBaseEventData['confirms']; get empty(): TvmEvmBaseEventData['empty']; get eventInitData(): TvmEvmBaseEventData['eventInitData']; get initializer(): TvmEvmBaseEventData['initializer']; get meta(): TvmEvmBaseEventData['meta']; get rejects(): TvmEvmBaseEventData['rejects']; get requiredVotes(): TvmEvmBaseEventData['requiredVotes']; get status(): TvmEvmBaseEventData['status']; decodeEvent(args: DecodeEventParams<typeof TvmEvmBaseEventAbi>): Promise<TvmEvmBaseEventDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TvmEvmBaseEventAbi>): Promise<TvmEvmBaseEventDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TvmEvmBaseEventDecodedEvent[]>; }