import { ethers } from "ethers"; import { Call, Token, TokenBalance } from "../types/balances.types"; import { ForeignCoin } from "../types/foreignCoins.types"; import { ObserverSupportedChain } from "../types/supportedChains.types"; export declare const TON_MAINNET_API = "https://tonapi.io/v2/accounts"; export declare const TON_TESTNET_API = "https://testnet.tonapi.io/v2/accounts"; export interface UTXO { txid: string; value: number; vout: number; } /** * Parses a token ID from chain ID and symbol */ export declare const parseTokenId: (chainId?: string, symbol?: string) => `${string}__${string}`; /** * Collects tokens from foreign coins data */ export declare const collectTokensFromForeignCoins: (foreignCoins: ForeignCoin[], supportedChains: ObserverSupportedChain[], zetaChainId: string) => Token[]; /** * Adds ZETA tokens to the tokens list */ export declare const addZetaTokens: (supportedChains: ObserverSupportedChain[], chains: Record, zetaChainId: string) => Token[]; /** * Enriches tokens with additional metadata */ export declare const enrichTokens: (tokens: Token[], supportedChains: ObserverSupportedChain[]) => Token[]; /** * Prepares multicall contexts for EVM tokens */ export declare const prepareMulticallContexts: (tokens: Token[], evmAddress: string) => Record; /** * Gets EVM token balances using multicall */ export declare const getEvmTokenBalancesWithMulticall: (chainName: string, rpc: string, multicallContexts: Call[], tokens: Token[]) => Promise; /** * Fallback to individual calls if multicall fails */ export declare const getEvmTokenBalancesFallback: (chainName: string, rpc: string, tokens: Token[], evmAddress: string) => Promise; /** * Gets native EVM token balances */ export declare const getNativeEvmTokenBalances: (tokens: Token[], evmAddress: string, getEndpoint: (type: string, chainName: string) => string, chains: Record) => Promise; /** * Gets BTC balances */ export declare const getBtcBalances: (tokens: Token[], btcAddress: string) => Promise; /** * Gets Solana native SOL balances */ export declare const getSolanaBalances: (tokens: Token[], solanaAddress: string, getEndpoint: (type: string, chainName: string) => string) => Promise; /** * Gets Sui native SUI and fungible token balances */ export declare const getSuiBalances: (tokens: Token[], suiAddress: string) => Promise; /** * Gets SPL token balances */ export declare const getSplTokenBalances: (tokens: Token[], solanaAddress: string, getEndpoint: (type: string, chainName: string) => string) => Promise; /** * Checks if a wallet has sufficient balance for a transaction * * @param provider - The ethers Provider to use for blockchain interactions * @param signer - The wallet to check the balance for * @param amount - The amount to check against the balance as a string * @param erc20 - Optional ERC20 token address. If not provided, checks native token balance * @returns Object containing the current balance, token decimals, and whether there's enough balance */ export declare const hasSufficientBalanceEvm: (provider: ethers.Provider, signer: ethers.Wallet, amount: string, erc20?: string) => Promise<{ balance: bigint; decimals: number; hasEnoughBalance: boolean; }>; /** * Gets TON native token balances */ export declare const getTonBalances: (tokens: Token[], tonAddress: string) => Promise;