import type { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets"; import type { ApiAsset } from "@ledgerhq/cryptoassets"; import { PartialMarketItemResponse } from "../../market/utils/types"; // Types for crypto asset metadata export interface CryptoAssetMeta { /** Asset identifier */ id: string; /** Asset ticker symbol */ ticker: string; /** Asset display name */ name: string; /** Map of network IDs to their corresponding asset IDs */ assetsIds: Record; } // Types for network information export interface NetworkInfo { /** Network identifier */ id: string; /** Network display name */ name: string; } // Types for interest rate data export interface InterestRate { /** Currency identifier */ currencyId: string; /** Interest rate value */ rate: number; /** Type of rate (NRR, APR, APY, etc.) */ type: string; /** Timestamp when the rate was fetched */ fetchAt: string; } // Types for currency ordering export interface CurrenciesOrder { /** Sorting key (e.g., "marketCap") */ key: string; /** Sort order (e.g., "desc") */ order: string; /** Ordered list of meta-currency IDs */ metaCurrencyIds: string[]; } // Types for raw API response (before transformation) export interface RawApiResponse { /** Grouped crypto assets by meta-currency */ cryptoAssets: Record; /** Network information */ networks: Record; /** Raw crypto currencies and token currencies from API */ cryptoOrTokenCurrencies: Record; /** Interest rates for various currencies */ interestRates: Record; /** Market data for currencies */ markets: Record; /** Currency ordering information */ currenciesOrder: CurrenciesOrder; } // Types for transformed API response (after transformation) export interface AssetsData { /** Grouped crypto assets by meta-currency */ cryptoAssets: Record; /** Network information */ networks: Record; /** Transformed crypto currencies and token currencies compatible with Ledger Live */ cryptoOrTokenCurrencies: Record; /** Interest rates for various currencies */ interestRates: Record; /** Market data for currencies */ markets: Record; /** Currency ordering information */ currenciesOrder: CurrenciesOrder; }