UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

39 lines (38 loc) 2.89 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 TonNativeProxyV1Abi } from '../../models/ton-native-proxy/abi'; import { type TonNativeProxyV1DecodedEvent, type TonNativeProxyV1DecodedTransaction, TonNativeProxyV1Utils } from '../../models/ton-native-proxy/TonNativeProxyV1Utils'; export interface TonNativeProxyV1CtorOptions { watchDebounceDelay?: number; } export interface TonNativeProxyV1CreateOptions extends TonNativeProxyV1CtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class TonNativeProxyV1 extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TonNativeProxyV1CtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TonNativeProxyV1Utils; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address Native Proxy root address * @param {Readonly<TonNativeProxyV1CtorOptions>} [options] (optional) Native Proxy ABI Wrapper options * @param {ProviderRpcClient} [_provider] (optional) RPC provider that require connection to the TVM wallet */ constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<TonNativeProxyV1CtorOptions> | 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 Proxy root address * @param {Readonly<TonNativeProxyV1CreateOptions>} [options] (optional) Native Proxy ABI Wrapper options * @param {ProviderRpcClient} [provider] (optional) RPC provider that require connection to the TVM wallet */ static create(connection: ProviderRpcClient, address: Address | string, options?: TonNativeProxyV1CreateOptions, provider?: ProviderRpcClient): Promise<TonNativeProxyV1>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; getTonEvmConfiguration(): Promise<Address>; getDexMiddleware(): Promise<Address>; decodeEvent(args: DecodeEventParams<typeof TonNativeProxyV1Abi>): Promise<TonNativeProxyV1DecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TonNativeProxyV1Abi>): Promise<TonNativeProxyV1DecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TonNativeProxyV1DecodedEvent[]>; }