const ASSETS = { BTC: { name: "Bitcoin", symbol: "BTC", decimals: 18, }, ETH: { name: "Ethereum", symbol: "ETH", decimals: 18, }, MUSD: { name: "MUSD", symbol: "MUSD", decimals: 18, }, mDAI: { name: "Mezo Dai Stablecoin", symbol: "mDAI", decimals: 18, }, mFBTC: { name: "Mezo Fire Bitcoin", symbol: "mFBTC", decimals: 8, }, mcbBTC: { name: "Mezo Coinbase Wrapped BTC", symbol: "mcbBTC", decimals: 8, }, mSolvBTC: { name: "Mezo SolvBTC", symbol: "mSolvBTC", decimals: 18, }, mswBTC: { name: "Mezo swBTC", symbol: "mswBTC", decimals: 8, }, mT: { name: "Mezo Threshold Network Token", symbol: "mT", decimals: 18, }, mUSDC: { name: "Mezo Circle USDC", symbol: "mUSDC", decimals: 6, }, mUSDe: { name: "Mezo Ethena USDe", symbol: "mUSDe", decimals: 18, }, mUSDT: { name: "Mezo Tether USDe", symbol: "mUSDT", decimals: 6, }, mxSolvBTC: { name: "Mezo xSolvBTC", symbol: "mxSolvBTC", decimals: 18, }, MEZO: { name: "MEZO", symbol: "MEZO", decimals: 18, }, } /** * Gets details of given crypto asset * @param key The key of crypto asset * @returns The crypto asset details */ export function getAsset(key: keyof typeof ASSETS) { return ASSETS[key] } /** * Checks if given crypto asset is Bitcoin-like * @param key The key of crypto asset * @returns True if crypto asset is Bitcoin-like */ export function isBitcoinLikeCryptoAsset(key: string) { return /(btc)/i.test(key) } /** * Checks if given crypto asset is USD-like * @param key The key of crypto asset * @returns True if crypto asset is USD-like */ export function isUsdLikeCryptoAsset(key: string) { return /(usd|dai)/i.test(key) } /** * Checks if given crypto asset is T token * @param key The key of crypto asset * @returns True if crypto asset is T token */ export function isTTokenCryptoAsset(key: string) { return /^(mt|t)$/i.test(key) } /** * Checks if given crypto asset is MEZO token * @param key The key of crypto asset * @returns True if crypto asset is MEZO token */ export function isMezoCryptoAsset(key: string) { return /^mezo$/i.test(key) }