UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

42 lines (41 loc) 3.33 kB
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 TonAlienProxyV2Abi } from '../../models/ton-alien-proxy/abi'; import { type TonAlienProxyV2DecodedEvent, type TonAlienProxyV2DecodedTransaction, TonAlienProxyV2Utils } from '../../models/ton-alien-proxy/TonAlienProxyV2Utils'; import { type DeriveEvmAlienJettonRootAbiParams, type DeriveTonAlienJettonRootAbiParams, type EvmJettonMergeDetails, type TonJettonMergeDetails } from '../../models/ton-alien-proxy/types'; export interface TonAlienProxyV2CtorOptions { watchDebounceDelay?: number; } export interface TonAlienProxyV2CreateOptions extends TonAlienProxyV2CtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class TonAlienProxyV2 extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TonAlienProxyV2CtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TonAlienProxyV2Utils; /** * @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<TonAlienProxyV2CtorOptions>} [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<TonAlienProxyV2CtorOptions> | 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<TonAlienProxyV2CreateOptions>} [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<TonAlienProxyV2CreateOptions>, provider?: ProviderRpcClient): Promise<TonAlienProxyV2>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; deriveEvmAlienTokenRoot(params: DeriveEvmAlienJettonRootAbiParams): Promise<Address>; deriveTonAlienTokenRoot(params: DeriveTonAlienJettonRootAbiParams): Promise<Address>; getTonEvmConfiguration(): Promise<Address>; getEvmTokenMergeDetails(tokenAddress: Address | string, chainId: string): Promise<EvmJettonMergeDetails | undefined>; getTonTokenMergeDetails(tokenAddress: Address | string): Promise<TonJettonMergeDetails | undefined>; decodeEvent(args: DecodeEventParams<typeof TonAlienProxyV2Abi>): Promise<TonAlienProxyV2DecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TonAlienProxyV2Abi>): Promise<TonAlienProxyV2DecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TonAlienProxyV2DecodedEvent[]>; }