@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
62 lines (61 loc) • 3.97 kB
TypeScript
import { type Forceable, type Silentable, type SmartContractWatchCallback, type Syncable, type Watchable, SmartContractModel } from '@broxus/js-core';
import { type PublicKey } from '@solana/web3.js';
import { type Address, type DecodeEventParams, type DecodeTransactionParams, type ProviderRpcClient, type Subscriber, type Transaction } from 'everscale-inpage-provider';
import { type TvmSolEventNativeAbi } from '../../models/tvm-sol-event-native/abi';
import { type TvmSolEventNativeDecodedData, type TvmSolEventNativeDecodedEvent, type TvmSolEventNativeDecodedTransaction, type TvmSolEventNativeDetails, TvmSolEventNativeUtils } from '../../models/tvm-sol-event-native/TvmSolEventNativeUtils';
export interface TvmSolEventNativeCtorOptions {
watchDebounceDelay?: number;
}
export interface TvmSolEventNativeCreateOptions extends Syncable, TvmSolEventNativeCtorOptions, Watchable {
watchCallback?: VoidFunction;
}
export interface TvmSolEventNativeData extends TvmSolEventNativeDetails {
decodedData: TvmSolEventNativeDecodedData;
}
export declare class TvmSolEventNative extends SmartContractModel<TvmSolEventNativeData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<TvmSolEventNativeCtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof TvmSolEventNativeUtils;
/**
* @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<TvmSolEventNativeCtorOptions>} [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<TvmSolEventNativeCtorOptions> | 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<TvmSolEventNativeCreateOptions>} [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<TvmSolEventNativeCreateOptions>, provider?: ProviderRpcClient): Promise<TvmSolEventNative>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: SmartContractWatchCallback<TvmSolEventNativeData>): Promise<Subscriber>;
unwatch(): Promise<void>;
nonce(): Promise<string>;
recipient(): Promise<PublicKey>;
relayRound(): Promise<Address>;
roundNumber(): Promise<number>;
sender(): Promise<Address>;
get balance(): TvmSolEventNativeData['balance'];
get confirms(): TvmSolEventNativeData['confirms'];
get decodedData(): TvmSolEventNativeData['decodedData'];
get empty(): TvmSolEventNativeData['empty'];
get eventInitData(): TvmSolEventNativeData['eventInitData'];
get initializer(): TvmSolEventNativeData['initializer'];
get meta(): TvmSolEventNativeData['meta'];
get rejects(): TvmSolEventNativeData['rejects'];
get requiredVotes(): TvmSolEventNativeData['requiredVotes'];
get status(): TvmSolEventNativeData['status'];
decodeEvent(args: DecodeEventParams<typeof TvmSolEventNativeAbi>): Promise<TvmSolEventNativeDecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof TvmSolEventNativeAbi>): Promise<TvmSolEventNativeDecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<TvmSolEventNativeDecodedEvent[]>;
}