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 TvmSolBaseEventAbi } from '../../models/tvm-sol-base-event/abi'; import { type TvmSolBaseEventDecodedEvent, type TvmSolBaseEventDecodedTransaction, type TvmSolBaseEventDetails, TvmSolBaseEventUtils } from '../../models/tvm-sol-base-event/TvmSolBaseEventUtils'; export interface TvmSolBaseEventCtorOptions { watchDebounceDelay?: number; } export interface TvmSolBaseEventCreateOptions extends TvmSolBaseEventCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface TvmSolBaseEventData extends TvmSolBaseEventDetails { } export declare class TvmSolBaseEvent extends SmartContractModel<TvmSolBaseEventData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TvmSolBaseEventCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TvmSolBaseEventUtils; /** * @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<TvmSolBaseEventCtorOptions>} [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<TvmSolBaseEventCtorOptions> | 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<TvmSolBaseEventCreateOptions>} [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<TvmSolBaseEventCreateOptions>, provider?: ProviderRpcClient): Promise<TvmSolBaseEvent>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; relayRound(): Promise<Address>; roundNumber(): Promise<number>; get balance(): TvmSolBaseEventData['balance']; get confirms(): TvmSolBaseEventData['confirms']; get empty(): TvmSolBaseEventData['empty']; get eventInitData(): TvmSolBaseEventData['eventInitData']; get initializer(): TvmSolBaseEventData['initializer']; get meta(): TvmSolBaseEventData['meta']; get rejects(): TvmSolBaseEventData['rejects']; get requiredVotes(): TvmSolBaseEventData['requiredVotes']; get status(): TvmSolBaseEventData['status']; decodeEvent(args: DecodeEventParams<typeof TvmSolBaseEventAbi>): Promise<TvmSolBaseEventDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TvmSolBaseEventAbi>): Promise<TvmSolBaseEventDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TvmSolBaseEventDecodedEvent[]>; }