UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

64 lines (63 loc) 4.9 kB
import { type Forceable, type Silentable, SmartContractModel, type Syncable, type Watchable } from '@broxus/js-core'; import { type Address, type DecodeEventParams, type DecodeTransactionParams, type DelayedMessageExecution, type ProviderRpcClient, type SendInternalParams, type Subscriber, type Transaction } from 'everscale-inpage-provider'; import { type TvmTvmBaseEventDetails } from '../../models/tvm-tvm-base-event'; import { type TvmTvmEventNativeAbi } from '../../models/tvm-tvm-event-native/abi'; import { type TvmTvmEventNativeCancelAbiParams, type TvmTvmEventNativeDecodedData, type TvmTvmEventNativeDecodedEvent, type TvmTvmEventNativeDecodedTransaction, TvmTvmEventNativeUtils } from '../../models/tvm-tvm-event-native/TvmTvmEventNativeUtils'; export interface TvmTvmEventNativeCtorOptions { watchDebounceDelay?: number; } export interface TvmTvmEventNativeCreateOptions extends TvmTvmEventNativeCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface TvmTvmEventNativeData extends TvmTvmBaseEventDetails { bounty: string; decodedData: TvmTvmEventNativeDecodedData; eventInitialBalance: string; eventTokenWalletAddress: Address; limitApproverAddress: Address; sender: Address; recipient: Address; } export declare class TvmTvmEventNative extends SmartContractModel<TvmTvmEventNativeData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TvmTvmEventNativeCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TvmTvmEventNativeUtils; /** * @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<TvmTvmEventNativeCtorOptions>} [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<TvmTvmEventNativeCtorOptions> | 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<TvmTvmEventNativeCreateOptions>} [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?: TvmTvmEventNativeCreateOptions, provider?: ProviderRpcClient): Promise<TvmTvmEventNative>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; approveLimit(args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; cancel(params: TvmTvmEventNativeCancelAbiParams, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; rejectLimit(expectedGasReceiver: Address | string, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; retry(args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; setBounty(bounty: string | number, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; expectedGas(): Promise<string>; nonce(): Promise<string>; get bounty(): TvmTvmEventNativeData['bounty']; get decodedData(): TvmTvmEventNativeData['decodedData']; get eventInitData(): TvmTvmEventNativeData['eventInitData']; get eventTokenWalletAddress(): TvmTvmEventNativeData['eventTokenWalletAddress']; get initializer(): TvmTvmEventNativeData['initializer']; get limitApproverAddress(): TvmTvmEventNativeData['limitApproverAddress']; get meta(): TvmTvmEventNativeData['meta']; get recipient(): TvmTvmEventNativeData['recipient']; get sender(): TvmTvmEventNativeData['sender']; get status(): TvmTvmEventNativeData['status']; decodeEvent(args: DecodeEventParams<typeof TvmTvmEventNativeAbi>): Promise<TvmTvmEventNativeDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TvmTvmEventNativeAbi>): Promise<TvmTvmEventNativeDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TvmTvmEventNativeDecodedEvent[]>; }