UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

39 lines (38 loc) 2.72 kB
import { SmartContractModel, type Syncable, type Watchable } from '@broxus/js-core'; import { type Address, type ProviderRpcClient, type Subscriber } from 'everscale-inpage-provider'; import { AlienProxyUtils, type DeriveEvmAlienTokenRootAbiParams, type DeriveSolanaAlienTokenRootAbiParams, type EvmTokenMergeDetails } from '../../models/alien-proxy/AlienProxyUtils'; export interface AlienProxyCtorOptions { watchDebounceDelay?: number; } export interface AlienProxyCreateOptions extends AlienProxyCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class AlienProxy extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<AlienProxyCtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof AlienProxyUtils; /** * @param {ProviderRpcClient} _connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address AlienProxy root address * @param {Readonly<AlienProxyCtorOptions>} [options] (optional) AlienProxy Smart Contract Model options * @param {ProviderRpcClient} [_provider] (optional) RPC provider that require connection to the TVM wallet */ constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<AlienProxyCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined); /** * @param {ProviderRpcClient} connection Standalone RPC client that doesn't require connection to the TVM wallet provider * @param {Address | string} address AlienProxy root address * @param {Readonly<AlienProxyCreateOptions>} [options] (optional) AlienProxy Smart Contract Model options * @param {ProviderRpcClient} [provider] (optional) RPC provider that require connection to the TVM wallet */ static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<AlienProxyCreateOptions>, provider?: ProviderRpcClient): Promise<AlienProxy>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; deriveEvmAlienTokenRoot(params: DeriveEvmAlienTokenRootAbiParams): Promise<Address>; deriveSolanaAlienTokenRoot(params: DeriveSolanaAlienTokenRootAbiParams): Promise<Address>; getTvmEvmConfiguration(): Promise<Address>; getTvmSolConfiguration(): Promise<Address>; getSolTvmConfiguration(): Promise<Address>; getEvmTokenMergeDetails(tokenAddress: Address | string, chainId: string): Promise<EvmTokenMergeDetails | undefined>; getSolTokenMergeDetails(tokenAddress: Address | string): Promise<EvmTokenMergeDetails | undefined>; }