UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

52 lines (51 loc) 3.49 kB
import { type SmartContractWatchCallback, type Syncable, type Watchable, SmartContractModel } 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, type DeriveEvmAlienTokenRootV8AbiParams, type DeriveSolanaAlienTokenRootV8AbiParams, AlienProxyV8Utils } 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?: SmartContractWatchCallback): 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[]>; }