UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

65 lines (64 loc) 4.82 kB
import { type Forceable, type Silentable, type SmartContractWatchCallback, type Syncable, type Watchable, SmartContractModel } 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 TvmTvmEventAlienAbi } from '../../models/tvm-tvm-event-alien/abi'; import { type TvmTvmEventAlienCancelAbiParams, type TvmTvmEventAlienDecodedData, type TvmTvmEventAlienDecodedEvent, type TvmTvmEventAlienDecodedTransaction, TvmTvmEventAlienUtils } from '../../models/tvm-tvm-event-alien/TvmTvmEventAlienUtils'; export interface TvmTvmEventAlienCtorOptions { watchDebounceDelay?: number; } export interface TvmTvmEventAlienCreateOptions extends Syncable, TvmTvmEventAlienCtorOptions, Watchable { watchCallback?: VoidFunction; } export interface TvmTvmEventAlienData extends TvmTvmBaseEventDetails { bounty: string; decodedData: TvmTvmEventAlienDecodedData; eventInitialBalance: string; eventTokenWalletAddress: Address; limitApproverAddress: Address; } export declare class TvmTvmEventAlien extends SmartContractModel<TvmTvmEventAlienData> { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TvmTvmEventAlienCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TvmTvmEventAlienUtils; /** * @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<TvmTvmEventAlienCtorOptions>} [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<TvmTvmEventAlienCtorOptions> | 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<TvmTvmEventAlienCreateOptions>} [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<TvmTvmEventAlienCreateOptions>, provider?: ProviderRpcClient): Promise<TvmTvmEventAlien>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: SmartContractWatchCallback<TvmTvmEventAlienData>): Promise<Subscriber>; unwatch(): Promise<void>; approveLimit(args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; cancel(params: TvmTvmEventAlienCancelAbiParams, 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>; nonce(): Promise<string>; get bounty(): TvmTvmEventAlienData['bounty']; get decodedData(): TvmTvmEventAlienData['decodedData']; get eventInitData(): TvmTvmEventAlienData['eventInitData']; get eventTokenWalletAddress(): TvmTvmEventAlienData['eventTokenWalletAddress']; get initializer(): TvmTvmEventAlienData['initializer']; get limitApproverAddress(): TvmTvmEventAlienData['limitApproverAddress']; get meta(): TvmTvmEventAlienData['meta']; get status(): TvmTvmEventAlienData['status']; decodeEvent(args: DecodeEventParams<typeof TvmTvmEventAlienAbi>): Promise<TvmTvmEventAlienDecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TvmTvmEventAlienAbi>): Promise<TvmTvmEventAlienDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TvmTvmEventAlienDecodedEvent[]>; }