@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
50 lines (49 loc) • 3.48 kB
TypeScript
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 TonEvmBaseEventAbi } from '../../models/ton-evm-base-event/abi';
import { type TonEvmBaseEventDecodedEvent, type TonEvmBaseEventDecodedTransaction, type TonEvmBaseEventDetails, TonEvmBaseEventUtils } from '../../models/ton-evm-base-event/TonEvmBaseEventUtils';
export interface TonEvmBaseEventCtorOptions {
watchDebounceDelay?: number;
}
export interface TonEvmBaseEventCreateOptions extends TonEvmBaseEventCtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export interface TonEvmBaseEventData extends TonEvmBaseEventDetails {
}
export declare class TonEvmBaseEvent extends SmartContractModel<TonEvmBaseEventData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<TonEvmBaseEventCtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof TonEvmBaseEventUtils;
/**
* @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<TonEvmBaseEventCtorOptions>} [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<TonEvmBaseEventCtorOptions> | 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<TonEvmBaseEventCreateOptions>} [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<TonEvmBaseEventCreateOptions>, provider?: ProviderRpcClient): Promise<TonEvmBaseEvent>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
relayRound(): Promise<Address>;
roundNumber(): Promise<number>;
get balance(): TonEvmBaseEventData['balance'];
get confirms(): TonEvmBaseEventData['confirms'];
get empty(): TonEvmBaseEventData['empty'];
get eventInitData(): TonEvmBaseEventData['eventInitData'];
get initializer(): TonEvmBaseEventData['initializer'];
get meta(): TonEvmBaseEventData['meta'];
get rejects(): TonEvmBaseEventData['rejects'];
get requiredVotes(): TonEvmBaseEventData['requiredVotes'];
get status(): TonEvmBaseEventData['status'];
decodeEvent(args: DecodeEventParams<typeof TonEvmBaseEventAbi>): Promise<TonEvmBaseEventDecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof TonEvmBaseEventAbi>): Promise<TonEvmBaseEventDecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<TonEvmBaseEventDecodedEvent[]>;
}