UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

25 lines (24 loc) 1.31 kB
import { type Address, type DecodedAbiFunctionOutputs, type FullContractState, type ProviderRpcClient } from 'everscale-inpage-provider'; import { type TokenRootAlienEvmAbi } from '../../models/token-root-alien-evm/abi'; type AlienEvmMeta = DecodedAbiFunctionOutputs<typeof TokenRootAlienEvmAbi, 'meta'>; export interface TokenRootAlienEvmMeta extends Omit<AlienEvmMeta, 'base_chainId' | 'base_token'> { baseChainId: string; baseToken: string; evmTokenAddress: string; } export declare abstract class TokenRootAlienEvmUtils { /** * Get alien token meta by the given TVM-like token address * * - If request passed and `base_chainId` equal to target EVM network - it means token is alien * for TVM and native for target EVM network. * - If request failed, or passed, but `base_chainId` not equal to target EVM network - it * means token is native for TVM and alien for target EVM network * * @param {ProviderRpcClient} connection * @param {Address | string} tokenAddress * @param {FullContractState} [cachedState] - optional. Full contract state of the token root alien EVM contract */ static meta(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<TokenRootAlienEvmMeta>; } export {};