UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

53 lines (52 loc) 3.71 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 SolTvmEventNativeAbi } from '../../models/sol-tvm-event-native/abi'; import { type SolTvmEventNativeDecodedData, type SolTvmEventNativeDecodedEvent, type SolTvmEventNativeDecodedTransaction, type SolTvmEventNativeDetails, SolTvmEventNativeUtils } from '../../models/sol-tvm-event-native/SolTvmEventNativeUtils'; export interface SolTvmEventNativeCtorOptions { watchDebounceDelay?: number; } export interface SolTvmEventNativeCreateOptions extends SolTvmEventNativeCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface SolTvmEventNativeData extends SolTvmEventNativeDetails { decodedData: SolTvmEventNativeDecodedData; } export declare class SolTvmEventNative extends SmartContractModel<SolTvmEventNativeData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<SolTvmEventNativeCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof SolTvmEventNativeUtils; /** * @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<SolTvmEventNativeCtorOptions>} [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<SolTvmEventNativeCtorOptions> | 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<SolTvmEventNativeCreateOptions>} [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<SolTvmEventNativeCreateOptions>, provider?: ProviderRpcClient): Promise<SolTvmEventNative>; 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(): SolTvmEventNativeData['balance']; get confirms(): SolTvmEventNativeData['confirms']; get decodedData(): SolTvmEventNativeData['decodedData']; get empty(): SolTvmEventNativeData['empty']; get eventInitData(): SolTvmEventNativeData['eventInitData']; get initializer(): SolTvmEventNativeData['initializer']; get meta(): SolTvmEventNativeData['meta']; get rejects(): SolTvmEventNativeData['rejects']; get requiredVotes(): SolTvmEventNativeData['requiredVotes']; get status(): SolTvmEventNativeData['status']; decodeEvent(args: DecodeEventParams<typeof SolTvmEventNativeAbi>): Promise<SolTvmEventNativeDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof SolTvmEventNativeAbi>): Promise<SolTvmEventNativeDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<SolTvmEventNativeDecodedEvent[]>; }