UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

51 lines (50 loc) 3.57 kB
import { type Forceable, type Silentable, type SmartContractWatchCallback, type Syncable, type Watchable, SmartContractModel } from '@broxus/js-core'; import { type Address, type DecodeEventParams, type DecodeTransactionParams, type ProviderRpcClient, type Subscriber, type Transaction } from 'everscale-inpage-provider'; import { type SolTvmBaseEventAbi } from '../../models/sol-tvm-base-event/abi'; import { type SolTvmBaseEventDecodedEvent, type SolTvmBaseEventDecodedTransaction, type SolTvmBaseEventDetails, SolTvmBaseEventUtils } from '../../models/sol-tvm-base-event/SolTvmBaseEventUtils'; export interface SolTvmBaseEventCtorOptions { watchDebounceDelay?: number; } export interface SolTvmBaseEventCreateOptions extends SolTvmBaseEventCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface SolTvmBaseEventData extends SolTvmBaseEventDetails { } export declare class SolTvmBaseEvent extends SmartContractModel<SolTvmBaseEventData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<SolTvmBaseEventCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof SolTvmBaseEventUtils; /** * @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<SolTvmBaseEventCtorOptions>} [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<SolTvmBaseEventCtorOptions> | 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<SolTvmBaseEventCreateOptions>} [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<SolTvmBaseEventCreateOptions>, provider?: ProviderRpcClient): Promise<SolTvmBaseEvent>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: SmartContractWatchCallback<SolTvmBaseEventData>): Promise<Subscriber>; unwatch(): Promise<void>; nonce(): Promise<string>; relayRound(): Promise<Address>; roundNumber(): Promise<number>; get balance(): SolTvmBaseEventData['balance']; get confirms(): SolTvmBaseEventData['confirms']; get empty(): SolTvmBaseEventData['empty']; get eventInitData(): SolTvmBaseEventData['eventInitData']; get initializer(): SolTvmBaseEventData['initializer']; get meta(): SolTvmBaseEventData['meta']; get rejects(): SolTvmBaseEventData['rejects']; get requiredVotes(): SolTvmBaseEventData['requiredVotes']; get status(): SolTvmBaseEventData['status']; decodeEvent(args: DecodeEventParams<typeof SolTvmBaseEventAbi>): Promise<SolTvmBaseEventDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof SolTvmBaseEventAbi>): Promise<SolTvmBaseEventDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<SolTvmBaseEventDecodedEvent[]>; }