UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

52 lines (51 loc) 4.4 kB
import { SmartContractModel, type Syncable, type Watchable } from '@broxus/js-core'; import { type Address, type DecodeEventParams, type DecodeTransactionParams, type DelayedMessageExecution, type ProviderRpcClient, type SendInternalParams, type Subscriber, type Transaction } from 'everscale-inpage-provider'; import { type AlienProxyV10Abi } from '../../models/alien-proxy/abi'; import { type AlienProxyV10DailyLimits, type AlienProxyV10DecodedEvent, type AlienProxyV10DecodedTransaction, type AlienProxyV10DeployTokenFeeAbiParams, type AlienProxyV10TvmDefaultFee, type AlienProxyV10TvmFees, type AlienProxyV10TvmTokenFee, AlienProxyV10Utils, type DeriveEvmAlienTokenRootV10AbiParams, type DeriveSolanaAlienTokenRootV10AbiParams, type DeriveTvmAlienTokenRootV10AbiParams } from '../../models/alien-proxy/AlienProxyV10Utils'; import { type EvmTokenMergeDetails, type SolanaTokenMergeDetails, type TvmTokenMergeDetails } from '../../models/alien-proxy/types'; export interface AlienProxyV10CtorOptions { watchDebounceDelay?: number; } export interface AlienProxyV10CreateOptions extends AlienProxyV10CtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export declare class AlienProxyV10 extends SmartContractModel { protected readonly _connection: ProviderRpcClient; protected readonly options?: Readonly<AlienProxyV10CtorOptions> | undefined; protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof AlienProxyV10Utils; /** * @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<AlienProxyV10CtorOptions>} [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<AlienProxyV10CtorOptions> | 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<AlienProxyV10CreateOptions>} [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<AlienProxyV10CreateOptions>, provider?: ProviderRpcClient): Promise<AlienProxyV10>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; deployTokenFee(params: AlienProxyV10DeployTokenFeeAbiParams, args?: Partial<SendInternalParams>): Promise<DelayedMessageExecution>; deriveEvmAlienTokenRoot(params: DeriveEvmAlienTokenRootV10AbiParams): Promise<Address>; deriveTvmAlienTokenRoot(params: DeriveTvmAlienTokenRootV10AbiParams): Promise<Address>; deriveSolanaAlienTokenRoot(params: DeriveSolanaAlienTokenRootV10AbiParams): Promise<Address>; getExpectedTokenFeeAddress(tokenAddress: Address | string): Promise<Address>; getDailyLimits(tokenAddress: Address | string): Promise<AlienProxyV10DailyLimits>; getTvmDefaultFee(): Promise<AlienProxyV10TvmDefaultFee>; getTvmFees(): Promise<AlienProxyV10TvmFees>; getTvmTokenFee(tokenAddress: Address | string): Promise<AlienProxyV10TvmTokenFee>; getTvmEvmConfiguration(): Promise<Address>; getTvmSolConfiguration(): Promise<Address>; getSolTvmConfiguration(): Promise<Address>; getEvmTokenMergeDetails(tokenAddress: Address | string, chainId: string): Promise<EvmTokenMergeDetails | undefined>; getTvmTokenMergeDetails(tokenAddress: Address | string): Promise<TvmTokenMergeDetails | undefined>; getSolTokenMergeDetails(tokenAddress: Address | string): Promise<SolanaTokenMergeDetails | undefined>; decodeEvent(args: DecodeEventParams<typeof AlienProxyV10Abi>): Promise<AlienProxyV10DecodedEvent | undefined>; decodeTransaction(args: DecodeTransactionParams<typeof AlienProxyV10Abi>): Promise<AlienProxyV10DecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<AlienProxyV10DecodedEvent[]>; }