UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

62 lines (61 loc) 3.9 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 TonEvmEventNativeAbi } from '../../models/ton-evm-event-native/abi'; import { type TonEvmEventNativeDecodedData, type TonEvmEventNativeDecodedEvent, type TonEvmEventNativeDecodedTransaction, type TonEvmEventNativeDetails, TonEvmEventNativeUtils } from '../../models/ton-evm-event-native/TonEvmEventNativeUtils'; export interface TonEvmEventNativeCtorOptions { watchDebounceDelay?: number; } export interface TonEvmEventNativeCreateOptions extends TonEvmEventNativeCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface TonEvmEventNativeData extends TonEvmEventNativeDetails { decodedData: TonEvmEventNativeDecodedData; } export declare class TonEvmEventNative extends SmartContractModel<TonEvmEventNativeData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TonEvmEventNativeCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TonEvmEventNativeUtils; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection * to the TVM wallet provider * @param {Address | string} address Native Event root address * @param {Readonly<TonEvmEventNativeCtorOptions>} [options] (optional) Native 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<TonEvmEventNativeCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined); /** * @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection * to the TVM wallet provider * @param {Address | string} address Native Event root address * @param {Readonly<TonEvmEventNativeCreateOptions>} [options] (optional) Native 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<TonEvmEventNativeCreateOptions>, provider?: ProviderRpcClient): Promise<TonEvmEventNative>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; nonce(): Promise<string>; recipient(): Promise<string>; relayRound(): Promise<Address>; roundNumber(): Promise<number>; sender(): Promise<Address>; get balance(): TonEvmEventNativeData['balance']; get confirms(): TonEvmEventNativeData['confirms']; get decodedData(): TonEvmEventNativeData['decodedData']; get empty(): TonEvmEventNativeData['empty']; get eventInitData(): TonEvmEventNativeData['eventInitData']; get initializer(): TonEvmEventNativeData['initializer']; get meta(): TonEvmEventNativeData['meta']; get rejects(): TonEvmEventNativeData['rejects']; get requiredVotes(): TonEvmEventNativeData['requiredVotes']; get signatures(): TonEvmEventNativeData['signatures']; get status(): TonEvmEventNativeData['status']; decodeEvent(args: DecodeEventParams<typeof TonEvmEventNativeAbi>): Promise<TonEvmEventNativeDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TonEvmEventNativeAbi>): Promise<TonEvmEventNativeDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TonEvmEventNativeDecodedEvent[]>; }