import type { TokenCurrency } from "@ledgerhq/types-cryptoassets"; import type { TokenUnit } from "./cal-client/entities"; export interface ApiTokenData { id: string; contractAddress: string; name: string; ticker: string; units: TokenUnit[]; standard: string; delisted?: boolean; disableCountervalue?: boolean; tokenIdentifier?: string; ledgerSignature?: string; } /** * Transforms Ledger Live token ID to backend API format for querying * * This handles cases where LL uses different ID conventions than backend APIs. * Applied BEFORE querying the API to ensure the request uses the correct format: * * - MultiversX: multiversx/esdt/* → elrond/esdt/* (API uses old name) [LIVE-22557] * - Stellar: UPPERCASE → lowercase (API uses lowercase) [LIVE-22558] * * @param legacyId - Token ID in Ledger Live format * @returns Token ID in backend API format */ export declare function legacyIdToApiId(legacyId: string): string; /** * Converts API token data to Ledger Live TokenCurrency format * * This function applies client-side transformations to reconcile differences between * backend APIs (CAL/DaDa) and Ledger Live's expected token format: * * - MultiversX: elrond/esdt/* → multiversx/esdt/* [LIVE-22557] * - Stellar: Normalizes casing to stellar/asset/UPPERCASE_ADDRESS and tokenType asset → stellar [LIVE-22558] * - Cardano: Reconstructs contractAddress from policyId + tokenIdentifier [LIVE-22559] * - Sui: Transforms tokenType from "coin" to "sui" [LIVE-22560] * - TON Jetton: Removes name prefix from ID (ton/jetton/name_address → ton/jetton/address) [LIVE-22561] * * @param apiToken - Token data from backend API * @returns TokenCurrency object in Ledger Live format, or undefined if parent currency not found */ export declare function convertApiToken(apiToken: ApiTokenData): TokenCurrency | undefined; //# sourceMappingURL=api-token-converter.d.ts.map