@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
40 lines (39 loc) • 3.07 kB
TypeScript
import { 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 TonAlienProxyV1Abi } from '../../models/ton-alien-proxy/abi';
import { type TonAlienProxyV1DecodedEvent, type TonAlienProxyV1DecodedTransaction, TonAlienProxyV1Utils } from '../../models/ton-alien-proxy/TonAlienProxyV1Utils';
import { type DeriveEvmAlienJettonRootAbiParams, type EvmJettonMergeDetails } from '../../models/ton-alien-proxy/types';
export interface TonAlienProxyV1CtorOptions {
watchDebounceDelay?: number;
}
export interface TonAlienProxyV1CreateOptions extends TonAlienProxyV1CtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export declare class TonAlienProxyV1 extends SmartContractModel {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<TonAlienProxyV1CtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof TonAlienProxyV1Utils;
/**
* @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address Alien Proxy root address
* @param {Readonly<TonAlienProxyV1CtorOptions>} [options] (optional) Alien 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<TonAlienProxyV1CtorOptions> | undefined, _provider?: ProviderRpcClient | undefined);
/**
* @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address Alien Proxy root address
* @param {Readonly<TonAlienProxyV1CreateOptions>} [options] (optional) Alien 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<TonAlienProxyV1CreateOptions>, provider?: ProviderRpcClient): Promise<TonAlienProxyV1>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
deriveEvmAlienTokenRoot(params: DeriveEvmAlienJettonRootAbiParams): Promise<Address>;
getTonEvmConfiguration(): Promise<Address>;
getEvmTokenMergeDetails(tokenAddress: Address | string, chainId: string): Promise<EvmJettonMergeDetails | undefined>;
decodeEvent(args: DecodeEventParams<typeof TonAlienProxyV1Abi>): Promise<TonAlienProxyV1DecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof TonAlienProxyV1Abi>): Promise<TonAlienProxyV1DecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<TonAlienProxyV1DecodedEvent[]>;
}