UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

51 lines (50 loc) 3.5 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 EvmTonBaseEventAbi } from '../../models/evm-ton-base-event/abi'; import { type EvmTonBaseEventDecodedEvent, type EvmTonBaseEventDecodedTransaction, type EvmTonBaseEventDetails, EvmTonBaseEventUtils } from '../../models/evm-ton-base-event/EvmTonBaseEventUtils'; export interface EvmTonBaseEventCtorOptions { watchDebounceDelay?: number; } export interface EvmTonBaseEventCreateOptions extends EvmTonBaseEventCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface EvmTonBaseEventData extends EvmTonBaseEventDetails { } export declare class EvmTonBaseEvent extends SmartContractModel<EvmTonBaseEventData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<EvmTonBaseEventCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof EvmTonBaseEventUtils; /** * @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<EvmTonBaseEventCtorOptions>} [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<EvmTonBaseEventCtorOptions> | 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<EvmTonBaseEventCreateOptions>} [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<EvmTonBaseEventCreateOptions>, provider?: ProviderRpcClient): Promise<EvmTonBaseEvent>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; nonce(): Promise<string>; relayRound(): Promise<Address>; roundNumber(): Promise<number>; get balance(): EvmTonBaseEventData['balance']; get confirms(): EvmTonBaseEventData['confirms']; get empty(): EvmTonBaseEventData['empty']; get eventInitData(): EvmTonBaseEventData['eventInitData']; get initializer(): EvmTonBaseEventData['initializer']; get meta(): EvmTonBaseEventData['meta']; get rejects(): EvmTonBaseEventData['rejects']; get requiredVotes(): EvmTonBaseEventData['requiredVotes']; get status(): EvmTonBaseEventData['status']; decodeEvent(args: DecodeEventParams<typeof EvmTonBaseEventAbi>): Promise<EvmTonBaseEventDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof EvmTonBaseEventAbi>): Promise<EvmTonBaseEventDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<EvmTonBaseEventDecodedEvent[]>; }