UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

44 lines (43 loc) 3.37 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 AlienProxyV8Abi, type SolanaTokenMergeDetails } from '../../models'; import { type AlienProxyV8DecodedEvent, type AlienProxyV8DecodedTransaction, AlienProxyV8Utils, type DeriveEvmAlienTokenRootV8AbiParams, type DeriveSolanaAlienTokenRootV8AbiParams } from '../../models/alien-proxy/AlienProxyV8Utils'; import { type EvmTokenMergeDetails } from '../../models/alien-proxy/types'; export interface AlienProxyV8CtorOptions { watchDebounceDelay?: number; } export interface AlienProxyV8CreateOptions extends AlienProxyV8CtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class AlienProxyV8 extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<AlienProxyV8CtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof AlienProxyV8Utils; /** * @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<AlienProxyV8CreateOptions>} [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<AlienProxyV8CtorOptions> | 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<AlienProxyV8CreateOptions>} [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<AlienProxyV8CreateOptions>, provider?: ProviderRpcClient): Promise<AlienProxyV8>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; deriveEvmAlienTokenRoot(params: DeriveEvmAlienTokenRootV8AbiParams): Promise<Address>; deriveSolanaAlienTokenRoot(params: DeriveSolanaAlienTokenRootV8AbiParams): 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<SolanaTokenMergeDetails | undefined>; decodeEvent(args: DecodeEventParams<typeof AlienProxyV8Abi>): Promise<AlienProxyV8DecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof AlienProxyV8Abi>): Promise<AlienProxyV8DecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<AlienProxyV8DecodedEvent[]>; }