@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
45 lines (44 loc) • 2.96 kB
TypeScript
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 TonNativeProxyV2Abi } from '../../models/ton-native-proxy/abi';
import { type TonNativeProxyV2DecodedEvent, type TonNativeProxyV2DecodedTransaction, TonNativeProxyV2Utils } from '../../models/ton-native-proxy/TonNativeProxyV2Utils';
export interface TonNativeProxyV2CtorOptions {
watchDebounceDelay?: number;
}
export interface TonNativeProxyV2CreateOptions extends TonNativeProxyV2CtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export declare class TonNativeProxyV2 extends SmartContractModel {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<TonNativeProxyV2CtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof TonNativeProxyV2Utils;
/**
* @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<TonNativeProxyV2CtorOptions>} [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<TonNativeProxyV2CtorOptions> | 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<TonNativeProxyV2CreateOptions>} [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?: TonNativeProxyV2CreateOptions, provider?: ProviderRpcClient): Promise<TonNativeProxyV2>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
getTonEvmConfiguration(): Promise<Address>;
getDexMiddleware(): Promise<Address>;
decodeEvent(args: DecodeEventParams<typeof TonNativeProxyV2Abi>): Promise<TonNativeProxyV2DecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof TonNativeProxyV2Abi>): Promise<TonNativeProxyV2DecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<TonNativeProxyV2DecodedEvent[]>;
}