@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
52 lines (51 loc) • 3.59 kB
TypeScript
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 NativeProxyV8Abi } from '../../models/native-proxy/abi';
import { type NativeProxyV8DecodedEvent, type NativeProxyV8DecodedTransaction, type NativeProxyV8DeployTokenFeeAbiParams, type NativeProxyV8TvmDefaultFee, type NativeProxyV8TvmFees, type NativeProxyV8TvmTokenFee, NativeProxyV8Utils } from '../../models/native-proxy/NativeProxyV8Utils';
export interface NativeProxyV8CtorOptions {
watchDebounceDelay?: number;
}
export interface NativeProxyV8CreateOptions extends NativeProxyV8CtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export declare class NativeProxyV8 extends SmartContractModel {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<NativeProxyV8CtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof NativeProxyV8Utils;
/**
* @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<NativeProxyV8CtorOptions>} [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<NativeProxyV8CtorOptions> | 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<NativeProxyV8CreateOptions>} [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<NativeProxyV8CreateOptions>, provider?: ProviderRpcClient): Promise<NativeProxyV8>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
deployTokenFee(params: NativeProxyV8DeployTokenFeeAbiParams, args?: Partial<SendInternalParams>): Promise<DelayedMessageExecution>;
getExpectedTokenFeeAddress(tokenAddress: Address | string): Promise<Address>;
getTvmDefaultFee(): Promise<NativeProxyV8TvmDefaultFee>;
getTvmFees(): Promise<NativeProxyV8TvmFees>;
getTvmTokenFee(tokenAddress: Address | string): Promise<NativeProxyV8TvmTokenFee>;
getTvmEvmConfiguration(): Promise<Address>;
getTvmSolConfiguration(): Promise<Address>;
getSolTvmConfiguration(): Promise<Address>;
getDexMiddleware(): Promise<Address>;
decodeEvent(args: DecodeEventParams<typeof NativeProxyV8Abi>): Promise<NativeProxyV8DecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof NativeProxyV8Abi>): Promise<NativeProxyV8DecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<NativeProxyV8DecodedEvent[]>;
}