UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

26 lines (25 loc) 1.4 kB
import { type Address, type DecodedAbiFunctionOutputs, type FullContractState, type ProviderRpcClient } from 'everscale-inpage-provider'; import { type TokenRootAlienTvmAbi } from '../../models/token-root-alien-tvm/abi'; type AlienTvmMeta = DecodedAbiFunctionOutputs<typeof TokenRootAlienTvmAbi, 'meta'>; export interface TokenRootAlienTvmMeta extends Omit<AlienTvmMeta, 'base_chainId' | 'base_token' | 'base_native_proxy_wallet'> { baseChainId: string; baseNativeProxyWallet: Address; baseToken: Address; } export declare abstract class TokenRootAlienTvmUtils { /** * 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 {string} payload * @param {FullContractState} [cachedState] - optional. Full contract state of the token root alien EVM contract */ static meta(connection: ProviderRpcClient, tokenAddress: Address | string, payload?: string, cachedState?: FullContractState): Promise<TokenRootAlienTvmMeta>; } export {};