UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

62 lines (61 loc) 3.85 kB
import { type Forceable, type Silentable, SmartContractModel, type Syncable, type Watchable } 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 TvmSolEventAlienAbi } from '../../models/tvm-sol-event-alien/abi'; import { type TvmSolEventAlienDecodedData, type TvmSolEventAlienDecodedEvent, type TvmSolEventAlienDecodedTransaction, type TvmSolEventAlienDetails, TvmSolEventAlienUtils } from '../../models/tvm-sol-event-alien/TvmSolEventAlienUtils'; export interface TvmSolEventAlienCtorOptions { watchDebounceDelay?: number; } export interface TvmSolEventAlienCreateOptions extends TvmSolEventAlienCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface TvmSolEventAlienData extends TvmSolEventAlienDetails { decodedData: TvmSolEventAlienDecodedData; } export declare class TvmSolEventAlien extends SmartContractModel<TvmSolEventAlienData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TvmSolEventAlienCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TvmSolEventAlienUtils; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection * to the TVM wallet provider * @param {Address | string} address Alien Event root address * @param {Readonly<TvmSolEventAlienCtorOptions>} [options] (optional) Alien 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<TvmSolEventAlienCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined); /** * @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection * to the TVM wallet provider * @param {Address | string} address Alien Event root address * @param {Readonly<TvmSolEventAlienCreateOptions>} [options] (optional) Alien 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<TvmSolEventAlienCreateOptions>, provider?: ProviderRpcClient): Promise<TvmSolEventAlien>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; nonce(): Promise<string>; recipient(): Promise<PublicKey>; relayRound(): Promise<Address>; roundNumber(): Promise<number>; sender(): Promise<Address>; get balance(): TvmSolEventAlienData['balance']; get confirms(): TvmSolEventAlienData['confirms']; get decodedData(): TvmSolEventAlienData['decodedData']; get empty(): TvmSolEventAlienData['empty']; get eventInitData(): TvmSolEventAlienData['eventInitData']; get initializer(): TvmSolEventAlienData['initializer']; get meta(): TvmSolEventAlienData['meta']; get rejects(): TvmSolEventAlienData['rejects']; get requiredVotes(): TvmSolEventAlienData['requiredVotes']; get status(): TvmSolEventAlienData['status']; decodeEvent(args: DecodeEventParams<typeof TvmSolEventAlienAbi>): Promise<TvmSolEventAlienDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TvmSolEventAlienAbi>): Promise<TvmSolEventAlienDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TvmSolEventAlienDecodedEvent[]>; }