@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
59 lines (58 loc) • 3.63 kB
TypeScript
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 EvmTvmBaseEventAbi } from '../../models/evm-tvm-base-event/abi';
import { type EvmTvmBaseEventDecodedEvent, type EvmTvmBaseEventDecodedTransaction, type EvmTvmBaseEventDetails, EvmTvmBaseEventUtils } from '../../models/evm-tvm-base-event/EvmTvmBaseEventUtils';
export interface EvmTvmBaseEventCtorOptions {
watchDebounceDelay?: number;
}
export interface EvmTvmBaseEventCreateOptions extends EvmTvmBaseEventCtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export interface EvmTvmBaseEventData extends EvmTvmBaseEventDetails {
}
export declare class EvmTvmBaseEvent extends SmartContractModel<EvmTvmBaseEventData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<EvmTvmBaseEventCtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof EvmTvmBaseEventUtils;
/**
* @param {ProviderRpcClient} _connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* Base Event root address
* @param {Readonly<EvmTvmBaseEventCtorOptions>} [options]
* (optional) Base 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<EvmTvmBaseEventCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined);
/**
* @param {ProviderRpcClient} connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* Base Event root address
* @param {Readonly<EvmTvmBaseEventCreateOptions>} [options]
* (optional) Base 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<EvmTvmBaseEventCreateOptions>, provider?: ProviderRpcClient): Promise<EvmTvmBaseEvent>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: SmartContractWatchCallback<EvmTvmBaseEventData>): Promise<Subscriber>;
unwatch(): Promise<void>;
nonce(): Promise<string>;
relayRound(): Promise<Address>;
roundNumber(): Promise<number>;
get balance(): EvmTvmBaseEventData['balance'];
get confirms(): EvmTvmBaseEventData['confirms'];
get empty(): EvmTvmBaseEventData['empty'];
get eventInitData(): EvmTvmBaseEventData['eventInitData'];
get initializer(): EvmTvmBaseEventData['initializer'];
get meta(): EvmTvmBaseEventData['meta'];
get rejects(): EvmTvmBaseEventData['rejects'];
get requiredVotes(): EvmTvmBaseEventData['requiredVotes'];
get status(): EvmTvmBaseEventData['status'];
decodeEvent(args: DecodeEventParams<typeof EvmTvmBaseEventAbi>): Promise<EvmTvmBaseEventDecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof EvmTvmBaseEventAbi>): Promise<EvmTvmBaseEventDecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<EvmTvmBaseEventDecodedEvent[]>;
}