UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

47 lines (46 loc) 3.84 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 TonAlienProxyV3Abi } from '../../models/ton-alien-proxy/abi'; import { type TonAlienProxyV3DailyLimits, type TonAlienProxyV3DecodedEvent, type TonAlienProxyV3DecodedTransaction, type TonAlienProxyV3TvmDefaultFee, type TonAlienProxyV3TvmFees, type TonAlienProxyV3TvmTokenFee, TonAlienProxyV3Utils } from '../../models/ton-alien-proxy/TonAlienProxyV3Utils'; import { type DeriveEvmAlienJettonRootAbiParams, type DeriveTonAlienJettonRootAbiParams, type EvmJettonMergeDetails, type TonJettonMergeDetails } from '../../models/ton-alien-proxy/types'; export interface TonAlienProxyV3CtorOptions { watchDebounceDelay?: number; } export interface TonAlienProxyV3CreateOptions extends TonAlienProxyV3CtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class TonAlienProxyV3 extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<TonAlienProxyV3CtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof TonAlienProxyV3Utils; /** * @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<TonAlienProxyV3CtorOptions>} [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<TonAlienProxyV3CtorOptions> | 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<TonAlienProxyV3CreateOptions>} [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<TonAlienProxyV3CreateOptions>, provider?: ProviderRpcClient): Promise<TonAlienProxyV3>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; deriveEvmAlienTokenRoot(params: DeriveEvmAlienJettonRootAbiParams): Promise<Address>; deriveTonAlienTokenRoot(params: DeriveTonAlienJettonRootAbiParams): Promise<Address>; getExpectedTokenFeeAddress(tokenAddress: Address | string): Promise<Address>; getDailyLimits(tokenAddress: Address | string): Promise<TonAlienProxyV3DailyLimits>; getTvmDefaultFee(): Promise<TonAlienProxyV3TvmDefaultFee>; getTvmFees(): Promise<TonAlienProxyV3TvmFees>; getTvmTokenFee(tokenAddress: Address | string): Promise<TonAlienProxyV3TvmTokenFee>; getTonEvmConfiguration(): Promise<Address>; getEvmTokenMergeDetails(tokenAddress: Address | string, chainId: string): Promise<EvmJettonMergeDetails | undefined>; getTonTokenMergeDetails(tokenAddress: Address | string): Promise<TonJettonMergeDetails | undefined>; decodeEvent(args: DecodeEventParams<typeof TonAlienProxyV3Abi>): Promise<TonAlienProxyV3DecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof TonAlienProxyV3Abi>): Promise<TonAlienProxyV3DecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<TonAlienProxyV3DecodedEvent[]>; }