@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
51 lines (50 loc) • 4.24 kB
TypeScript
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 AlienProxyV9Abi } from '../../models/alien-proxy/abi';
import { type AlienProxyV9DecodedEvent, type AlienProxyV9DecodedTransaction, type AlienProxyV9DeployTokenFeeAbiParams, type AlienProxyV9TvmDefaultFee, type AlienProxyV9TvmFees, type AlienProxyV9TvmTokenFee, AlienProxyV9Utils, type DeriveEvmAlienTokenRootV9AbiParams, type DeriveSolanaAlienTokenRootV9AbiParams, type DeriveTvmAlienTokenRootV9AbiParams } from '../../models/alien-proxy/AlienProxyV9Utils';
import { type EvmTokenMergeDetails, type SolanaTokenMergeDetails, type TvmTokenMergeDetails } from '../../models/alien-proxy/types';
export interface AlienProxyV9CtorOptions {
watchDebounceDelay?: number;
}
export interface AlienProxyV9CreateOptions extends AlienProxyV9CtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export declare class AlienProxyV9 extends SmartContractModel {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<AlienProxyV9CtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof AlienProxyV9Utils;
/**
* @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<AlienProxyV9CtorOptions>} [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<AlienProxyV9CtorOptions> | 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<AlienProxyV9CreateOptions>} [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<AlienProxyV9CreateOptions>, provider?: ProviderRpcClient): Promise<AlienProxyV9>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
deployTokenFee(params: AlienProxyV9DeployTokenFeeAbiParams, args?: Partial<SendInternalParams>): Promise<DelayedMessageExecution>;
deriveEvmAlienTokenRoot(params: DeriveEvmAlienTokenRootV9AbiParams): Promise<Address>;
deriveTvmAlienTokenRoot(params: DeriveTvmAlienTokenRootV9AbiParams): Promise<Address>;
deriveSolanaAlienTokenRoot(params: DeriveSolanaAlienTokenRootV9AbiParams): Promise<Address>;
getExpectedTokenFeeAddress(tokenAddress: Address | string): Promise<Address>;
getTvmDefaultFee(): Promise<AlienProxyV9TvmDefaultFee>;
getTvmFees(): Promise<AlienProxyV9TvmFees>;
getTvmTokenFee(tokenAddress: Address | string): Promise<AlienProxyV9TvmTokenFee>;
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 AlienProxyV9Abi>): Promise<AlienProxyV9DecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof AlienProxyV9Abi>): Promise<AlienProxyV9DecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<AlienProxyV9DecodedEvent[]>;
}