UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

37 lines (36 loc) 2.34 kB
import { type Forceable, type Silentable, SmartContractModel, type Syncable, type Watchable } from '@broxus/js-core'; import { type Address, type ProviderRpcClient, type Subscriber } from 'everscale-inpage-provider'; import { NativeProxyUtils } from '../../models/native-proxy/NativeProxyUtils'; export interface NativeProxyCtorOptions { watchDebounceDelay?: number; } export interface NativeProxyCreateOptions extends NativeProxyCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class NativeProxy extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<NativeProxyCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof NativeProxyUtils; /** * @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<NativeProxyCtorOptions>} [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<NativeProxyCtorOptions> | 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<NativeProxyCreateOptions>} [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?: Readonly<NativeProxyCreateOptions>, provider?: ProviderRpcClient): Promise<NativeProxy>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; getTvmEvmConfiguration(): Promise<Address>; getTvmSolConfiguration(): Promise<Address>; getSolTvmConfiguration(): Promise<Address>; getDexMiddleware(): Promise<Address>; }