@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 NativeProxyV7Abi } from '../../models/native-proxy/abi';
import { type NativeProxyV7DecodedEvent, type NativeProxyV7DecodedTransaction, type NativeProxyV7DeployTokenFeeAbiParams, type NativeProxyV7TvmDefaultFee, type NativeProxyV7TvmFees, type NativeProxyV7TvmTokenFee, NativeProxyV7Utils } from '../../models/native-proxy/NativeProxyV7Utils';
export interface NativeProxyV7CtorOptions {
watchDebounceDelay?: number;
}
export interface NativeProxyV7CreateOptions extends NativeProxyV7CtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export declare class NativeProxyV7 extends SmartContractModel {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<NativeProxyV7CtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof NativeProxyV7Utils;
/**
* @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<NativeProxyV7CtorOptions>} [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<NativeProxyV7CtorOptions> | 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<NativeProxyV7CreateOptions>} [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<NativeProxyV7CreateOptions>, provider?: ProviderRpcClient): Promise<NativeProxyV7>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
deployTokenFee(params: NativeProxyV7DeployTokenFeeAbiParams, args?: Partial<SendInternalParams>): Promise<DelayedMessageExecution>;
getExpectedTokenFeeAddress(tokenAddress: Address | string): Promise<Address>;
getTvmDefaultFee(): Promise<NativeProxyV7TvmDefaultFee>;
getTvmFees(): Promise<NativeProxyV7TvmFees>;
getTvmTokenFee(tokenAddress: Address | string): Promise<NativeProxyV7TvmTokenFee>;
getTvmEvmConfiguration(): Promise<Address>;
getTvmSolConfiguration(): Promise<Address>;
getSolTvmConfiguration(): Promise<Address>;
getDexMiddleware(): Promise<Address>;
decodeEvent(args: DecodeEventParams<typeof NativeProxyV7Abi>): Promise<NativeProxyV7DecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof NativeProxyV7Abi>): Promise<NativeProxyV7DecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<NativeProxyV7DecodedEvent[]>;
}