Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@ledgerhq/cryptoassets

LedgerHQ399.1kApache-2.013.20.0TypeScript support: included

Ledger crypto-assets list

Ledger

readme

@ledgerhq/cryptoassets

Ledger's material for crypto currencies, tokens and fiats. Also includes signatures required by Nano devices for these tokens.

DO NOT EDIT because this library is generated.

Usage

There are two modes of usage of this library.

  • The all-in way: you want to have all the data available (ERC20 token loaded,...). To do this, you simply import @ledgerhq/cryptoassets
  • The custom way: you can import individual data piece from @ledgerhq/cryptoassets/data/*. For instance, importing the ERC20 signatures can be done with @ledgerhq/cryptoassets/data/erc20-signatures sub module.

Importing CAL tokens in cryptoassets data

pnpm import:cal-tokens

API

Table of Contents

abandonSeedAddresses

these are either "dead"/"burn" addresses OR "abandon" seed addresses. These addresses are PUBLIC addresses We use them for tests and also for dry-run estimations DO NOT USE AS RECIPIENT OR SIGN TRANSACTIONS INTO THEM

Type: Partial<Record<any, string>>

getAbandonSeedAddress

Returns a valid address for a given currency. These addresses are PUBLIC addresses We use them for tests and also for dry-run estimations DO NOT USE AS RECIPIENT OR SIGN TRANSACTIONS INTO THEM

Parameters

  • currencyId any

Returns string

registerCryptoCurrency

Parameters

  • currency CryptoCurrency
  • id string

Returns void

listCryptoCurrencies

Parameters

  • withDevCrypto any (optional, default false)
  • withTerminated any (optional, default false)

Returns Array<CryptoCurrency>

findCryptoCurrency

Parameters

  • f any

Returns (CryptoCurrency | null | undefined)

findCryptoCurrencyByScheme

Parameters

  • scheme any

Returns (CryptoCurrency | null | undefined)

findCryptoCurrencyByTicker

Parameters

  • ticker any

Returns (CryptoCurrency | null | undefined)

findCryptoCurrencyByKeyword

Parameters

  • keyword any
  • tests (optional, default ["keywords","name","id","ticker","manager"])

Returns (CryptoCurrency | null | undefined)

hasCryptoCurrencyId

Parameters

  • id any

Returns boolean

findExchangeCurrencyConfig

Parameters

Returns ({config: string, signature: string} | null | undefined)

hasFiatCurrencyTicker

Parameters

  • ticker any

Returns boolean

findFiatCurrencyByTicker

Parameters

  • ticker any

Returns (FiatCurrency | null | undefined)

getFiatCurrencyByTicker

Parameters

  • ticker any

Returns FiatCurrency

listFiatCurrencies

Returns Array<FiatCurrency>

__clearObject

Only for jest purpose, clean object to be empty

Parameters

  • obj Record<string, (TokenCurrency | Array<TokenCurrency>)>

Returns void

__clearAllLists

Only for jest purpose, clear all the init list

Returns void

listTokens

Parameters

  • options Partial<TokensListOptions>?

Returns Array<TokenCurrency>

listTokensForCryptoCurrency

Parameters

  • currency CryptoCurrency
  • options Partial<TokensListOptions>?

Returns Array<TokenCurrency>

listTokenTypesForCryptoCurrency

Parameters

  • currency CryptoCurrency

Returns Array<string>

findTokenByTicker

Parameters

Returns (TokenCurrency | undefined)

findTokenById

Parameters

Returns (TokenCurrency | undefined)

hasTokenId

Parameters

Returns boolean

getTokenById

Parameters

Returns TokenCurrency

removeTokenFromAllLists

Delete previous token entry to all array

Parameters

  • token TokenCurrency

id

We clean all the reference of an existing token, if an hash doesn't match. Like this we can update any change from a already added token coming from Dynamic CAL and maintain it up to date without having to release a new version of LLD or LLM

changelog

@ledgerhq/cryptoassets

13.20.0

Minor Changes

Patch Changes

13.20.0-next.0

Minor Changes

Patch Changes

13.19.0

Minor Changes

13.19.0-next.0

Minor Changes

13.18.1

Patch Changes

13.18.1-next.0

Patch Changes

13.18.0

Minor Changes

Patch Changes

13.18.0-next.0

Minor Changes

Patch Changes

13.17.0

Minor Changes

  • #10162 f92f49a Thanks @qperrot! - Add fetching of tokens signature in preload method of the solana bridge

13.17.0-next.0

Minor Changes

  • #10162 f92f49a Thanks @qperrot! - Add fetching of tokens signature in preload method of the solana bridge

13.16.0

Minor Changes

13.16.0-next.0

Minor Changes

13.15.0

Minor Changes

13.15.0-next.0

Minor Changes

13.14.1

Patch Changes

13.14.1-next.0

Patch Changes

13.14.0

Minor Changes

Patch Changes

13.14.0-next.0

Minor Changes

Patch Changes

13.13.0

Minor Changes

Patch Changes

13.13.0-next.0

Minor Changes

Patch Changes

13.12.0

Minor Changes

13.12.0-next.0

Minor Changes

13.11.0

Minor Changes

13.11.0-next.0

Minor Changes

13.10.0

Minor Changes

13.10.0-next.0

Minor Changes

13.9.0

Minor Changes

Patch Changes

13.9.0-next.0

Minor Changes

Patch Changes

13.8.0

Minor Changes

13.8.0-next.0

Minor Changes

13.7.0

Minor Changes

Patch Changes

13.7.0-next.0

Minor Changes

Patch Changes

13.6.2

Patch Changes

13.6.2-next.0

Patch Changes

13.6.1

Patch Changes

13.6.1-next.0

Patch Changes

13.6.0

Minor Changes

13.6.0-next.0

Minor Changes

13.5.0

Minor Changes

  • #7621 1605678 Thanks @lambertkevin! - Update all importers to use the crypt-assets service instead of the CDN & remove when possible deprecated and usued values like disableCounterValue and BEP20 type.

Patch Changes

13.5.0-next.1

Patch Changes

13.5.0-next.0

Minor Changes

  • #7621 1605678 Thanks @lambertkevin! - Update all importers to use the crypt-assets service instead of the CDN & remove when possible deprecated and usued values like disableCounterValue and BEP20 type.

Patch Changes

13.4.0

Minor Changes

Patch Changes

13.4.0-next.0

Minor Changes

Patch Changes

13.3.0

Minor Changes

Patch Changes

13.3.0-next.1

Minor Changes

13.3.0-next.0

Minor Changes

Patch Changes

13.2.0

Minor Changes

Patch Changes

13.2.0-next.0

Minor Changes

Patch Changes

13.1.1

Patch Changes

13.1.1-next.1

Patch Changes

13.1.1-next.0

Patch Changes

13.1.0

Minor Changes

Patch Changes

  • #6771 6c35cc5 Thanks @gre! - LL's preferred countervalues will now have all the possible fiats that our CVS api supports.

  • #6778 4499990 Thanks @cng-ledger! - feat(10131): update token signatures

  • #7114 d5a1300 Thanks @lambertkevin! - Rollback nano app used for Ethereum Classic from Ethereum to Ethereum Classic, due to Classic using a 61 coin type for its derivation, incompatible with the Ethereum app

  • #7077 f7e7881 Thanks @lambertkevin! - CAL update fixing the blast_testnet naming for blast_sepolia

  • fda6a81 Thanks @valpinkman! - Update TRC20 exchange importer not compatible with the new fetchTokens return

13.1.0-next.2

Patch Changes

  • #7114 d5a1300 Thanks @lambertkevin! - Rollback nano app used for Ethereum Classic from Ethereum to Ethereum Classic, due to Classic using a 61 coin type for its derivation, incompatible with the Ethereum app

13.1.0-next.1

Patch Changes

13.1.0-next.0

Minor Changes

Patch Changes

  • #6771 6c35cc5 Thanks @gre! - LL's preferred countervalues will now have all the possible fiats that our CVS api supports.

  • #6778 4499990 Thanks @cng-ledger! - feat(10131): update token signatures

  • fda6a81 Thanks @valpinkman! - Update TRC20 exchange importer not compatible with the new fetchTokens return

13.0.0

Major Changes

  • #6669 fdb76a7 Thanks @lambertkevin! - Removing support for Goerli & Ropsten networks and their Layer 2 variants (Linea Goerli & Optimism Goerli) and replace them by Linea Sepolia & Optimism Sepolia

Minor Changes

Patch Changes

13.0.0-next.0

Major Changes

  • #6669 fdb76a7 Thanks @lambertkevin! - Removing support for Goerli & Ropsten networks and their Layer 2 variants (Linea Goerli & Optimism Goerli) and replace them by Linea Sepolia & Optimism Sepolia

Minor Changes

Patch Changes

12.1.0

Minor Changes

  • #6309 5848f9e Thanks @lambertkevin! - Removes never publicly exposed Evmos & Kava currencies. Also fixes multiple Etherscan based explorers URI (Lukso, RSK, Astar & Boba).

Patch Changes

12.1.0-next.0

Minor Changes

  • #6309 5848f9e Thanks @lambertkevin! - Removes never publicly exposed Evmos & Kava currencies. Also fixes multiple Etherscan based explorers URI (Lukso, RSK, Astar & Boba).

Patch Changes

12.0.0

Major Changes

Minor Changes

Patch Changes

12.0.0-next.0

Major Changes

Minor Changes

Patch Changes

11.4.1

Patch Changes

11.4.1-hotfix.0

Patch Changes

11.4.0

Minor Changes

Patch Changes

11.4.0-next.0

Minor Changes

Patch Changes

11.3.1

Patch Changes

11.3.1-next.0

Patch Changes

11.3.0

Minor Changes

Patch Changes

11.3.0-next.0

Minor Changes

Patch Changes

11.2.0

Minor Changes

Patch Changes

11.2.0-next.1

Patch Changes

11.2.0-next.0

Minor Changes

Patch Changes

11.1.0

Minor Changes

Patch Changes

11.1.0-next.0

Minor Changes

Patch Changes

11.0.1

Patch Changes

  • #5115 fbeebfe04b Thanks @lambertkevin! - Reordering bsc & binance_beacon_chain to avoid errors while sorting by market cap due to token collision

11.0.1-hotfix.0

Patch Changes

  • #5115 fbeebfe04b Thanks @lambertkevin! - Reordering bsc & binance_beacon_chain to avoid errors while sorting by market cap due to token collision

11.0.0

Major Changes

  • #4285 533278e2c4 Thanks @chabroA! - Migrate Ethereum family implementation to EVM family

    Replace the legcay Ethereum familly implementation that was present in ledger-live-common by the coin-evm lib implementation. This change was made in order to improve scalabillity and maintainability of the evm coins, as well as more easilly integrate new evm based chains in the future.

Minor Changes

Patch Changes

  • #4741 a134f28e9d Thanks @chabroA! - Don't use 0 address for evm currencies to avoid gas estimation error in swap when interacting with smart contracts (swapping from token accounts)

  • #4714 49ea3fd98b Thanks @lvndry! - Update zcash explorer to zcashblockexplorer.com

9.13.0

Minor Changes

9.12.1

Patch Changes

9.12.0

Minor Changes

9.12.0-next.0

Minor Changes

9.11.1

Patch Changes

9.11.1-next.0

Patch Changes

9.11.0

Minor Changes

Patch Changes

9.11.0-next.0

Minor Changes

Patch Changes

9.10.0

Minor Changes

Patch Changes

9.10.0-next.0

Minor Changes

Patch Changes

9.9.0

Minor Changes

Patch Changes

9.9.0-next.0

Minor Changes

Patch Changes

9.8.0

Minor Changes

Patch Changes

9.8.0-next.0

Minor Changes

Patch Changes

9.7.0

Minor Changes

Patch Changes

9.7.0-next.1

Minor Changes

9.7.0-next.0

Minor Changes

Patch Changes

9.6.0

Minor Changes

9.6.0-next.0

Minor Changes

9.5.0

Minor Changes

9.5.0-next.0

Minor Changes

9.4.0

Minor Changes

9.4.0-next.0

Minor Changes

9.3.0

Minor Changes

9.3.0-next.0

Minor Changes

9.2.0

Minor Changes

9.2.0-next.0

Minor Changes

9.1.0

Minor Changes

9.1.0-next.0

Minor Changes

9.0.0

Major Changes

  • #1991 62af25493e Thanks @valpinkman! - Remove the support for imports ending with / mapping to the index.js file.

    For instance:

    import { getCryptoCurrencyById } from "@ledgerhq/live-common/currencies/";

    Should be rewritten to:

    import { getCryptoCurrencyById } from "@ledgerhq/live-common/currencies/index";

    This trailing slash is poorly supported by some tools like vite.js and was meant as a transitional change. Time has come to remove the support for thos shorthand.

Minor Changes

Patch Changes

9.0.0-next.0

Major Changes

  • #1991 62af25493e Thanks @valpinkman! - Remove the support for imports ending with / mapping to the index.js file.

    For instance:

    import { getCryptoCurrencyById } from "@ledgerhq/live-common/currencies/";

    Should be rewritten to:

    import { getCryptoCurrencyById } from "@ledgerhq/live-common/currencies/index";

    This trailing slash is poorly supported by some tools like vite.js and was meant as a transitional change. Time has come to remove the support for thos shorthand.

Minor Changes

Patch Changes

8.0.0

Major Changes

Minor Changes

8.0.0-next.0

Major Changes

Minor Changes

7.3.0

Minor Changes

7.3.0-next.0

Minor Changes

7.2.0

Minor Changes

Patch Changes

7.2.0-next.0

Minor Changes

Patch Changes

7.1.0

Minor Changes

7.1.0-next.0

Minor Changes

7.0.0

Major Changes

  • #1778 9100363270 Thanks @valpinkman! - Breaking: Moved data folder in src so it can be compiled by TS (also changed files to Typescript)

Minor Changes

7.0.0-next.0

Major Changes

  • #1778 9100363270 Thanks @valpinkman! - Breaking: Moved data folder in src so it can be compiled by TS (also changed files to Typescript)

Minor Changes

6.37.0

Minor Changes

Patch Changes

6.37.0-next.0

Minor Changes

Patch Changes

6.36.1

Patch Changes

6.36.1-next.0

Patch Changes

6.36.0

Minor Changes

Patch Changes

  • #1419 2100b9fb81 Thanks @gre! - Introduce tests to ensure we define abandonseed values for coin we support

6.36.0-next.0

Minor Changes

Patch Changes

  • #1419 2100b9fb81 Thanks @gre! - Introduce tests to ensure we define abandonseed values for coin we support

6.35.1

Patch Changes

6.35.1-next.0

Patch Changes

6.35.0

Minor Changes

Patch Changes

  • #1304 df76dd28c1 Thanks @lambertkevin! - Fixing currency inferences in cryptoassets, and reorder currencies as a temporary fix for the ticker/managerAppName collisions' side effects

6.35.0-next.0

Minor Changes

Patch Changes

  • #1304 df76dd28c1 Thanks @lambertkevin! - Fixing currency inferences in cryptoassets, and reorder currencies as a temporary fix for the ticker/managerAppName collisions' side effects

6.34.0

Minor Changes

Patch Changes

  • #1023 318e80452 Thanks @gre! - Fixes testnet currencies to be $0 valued on countervalues

6.34.0-next.1

Minor Changes

6.34.0-next.0

Minor Changes

Patch Changes

6.32.0

Minor Changes

  • #451 134355d561 Thanks @hedi-edelbloute! - Type libraries usage in LLC, LLD, LLM, CLI

  • #723 0c12f3e897 Thanks @marco-figment! - Osmosis Send, Receive and Staking + Cosmos refactor

    For additional context on what changed:

    • Ledger Live Desktop: functionality for Osmosis send, receive and staking.
    • Ledger Live Desktop: refactor of some Cosmos components to enable reusing some components for Osmosis. and easily integrate future Cosmos-based cryptocurrencies.

    • Ledger Live Common: functionality for Osmosis send, receive and staking.

    • Ledger Live Common: refactor of some Cosmos modules to enable reusing code for Osmosis. Notable changes are: renaming the hook useCosmosPreloadData to useCosmosFamilyPreloadData and turning validators.ts and js-synchronisation.ts into classes.

    • Ledger Live Mobile: only marked as major because the useCosmosPreloadData hook changed name, which is a breaking change.

    • Cryptoassets: updated a URL in the Osmosis cryptocurrency definition.

    • Live CLI: updated references to cosmosSourceValidators to sourceValidators for re-usability.

  • #887 e2a9cfad63 Thanks @adrienlacombe-ledger! - CAL update 20220809

6.33.0

Minor Changes

  • #723 0c12f3e897 Thanks @marco-figment! - Osmosis Send, Receive and Staking + Cosmos refactor

    For additional context on what changed:

    • Ledger Live Desktop: functionality for Osmosis send, receive and staking.
    • Ledger Live Desktop: refactor of some Cosmos components to enable reusing some components for Osmosis. and easily integrate future Cosmos-based cryptocurrencies.

    • Ledger Live Common: functionality for Osmosis send, receive and staking.

    • Ledger Live Common: refactor of some Cosmos modules to enable reusing code for Osmosis. Notable changes are: renaming the hook useCosmosPreloadData to useCosmosFamilyPreloadData and turning validators.ts and js-synchronisation.ts into classes.

    • Ledger Live Mobile: only marked as major because the useCosmosPreloadData hook changed name, which is a breaking change.

    • Cryptoassets: updated a URL in the Osmosis cryptocurrency definition.

    • Live CLI: updated references to cosmosSourceValidators to sourceValidators for re-usability.

6.33.0-next.0

Minor Changes

  • #723 0c12f3e897 Thanks @marco-figment! - Osmosis Send, Receive and Staking + Cosmos refactor

    For additional context on what changed:

    • Ledger Live Desktop: functionality for Osmosis send, receive and staking.
    • Ledger Live Desktop: refactor of some Cosmos components to enable reusing some components for Osmosis. and easily integrate future Cosmos-based cryptocurrencies.

    • Ledger Live Common: functionality for Osmosis send, receive and staking.

    • Ledger Live Common: refactor of some Cosmos modules to enable reusing code for Osmosis. Notable changes are: renaming the hook useCosmosPreloadData to useCosmosFamilyPreloadData and turning validators.ts and js-synchronisation.ts into classes.

    • Ledger Live Mobile: only marked as major because the useCosmosPreloadData hook changed name, which is a breaking change.

    • Cryptoassets: updated a URL in the Osmosis cryptocurrency definition.

    • Live CLI: updated references to cosmosSourceValidators to sourceValidators for re-usability.

6.32.0

Minor Changes

  • #451 134355d561 Thanks @hedi-edelbloute! - Type libraries usage in LLC, LLD, LLM, CLI

  • #723 0c12f3e897 Thanks @marco-figment! - Osmosis Send, Receive and Staking + Cosmos refactor

    For additional context on what changed:

    • Ledger Live Desktop: functionality for Osmosis send, receive and staking.
    • Ledger Live Desktop: refactor of some Cosmos components to enable reusing some components for Osmosis. and easily integrate future Cosmos-based cryptocurrencies.

    • Ledger Live Common: functionality for Osmosis send, receive and staking.

    • Ledger Live Common: refactor of some Cosmos modules to enable reusing code for Osmosis. Notable changes are: renaming the hook useCosmosPreloadData to useCosmosFamilyPreloadData and turning validators.ts and js-synchronisation.ts into classes.

    • Ledger Live Mobile: only marked as major because the useCosmosPreloadData hook changed name, which is a breaking change.

    • Cryptoassets: updated a URL in the Osmosis cryptocurrency definition.

    • Live CLI: updated references to cosmosSourceValidators to sourceValidators for re-usability.

  • #887 e2a9cfad63 Thanks @adrienlacombe-ledger! - CAL update 20220809

6.32.0-next.1

Minor Changes

  • #723 0c12f3e89 Thanks @marco-figment! - Osmosis Send, Receive and Staking + Cosmos refactor

    For additional context on what changed:

    • Ledger Live Desktop: functionality for Osmosis send, receive and staking.
    • Ledger Live Desktop: refactor of some Cosmos components to enable reusing some components for Osmosis. and easily integrate future Cosmos-based cryptocurrencies.

    • Ledger Live Common: functionality for Osmosis send, receive and staking.

    • Ledger Live Common: refactor of some Cosmos modules to enable reusing code for Osmosis. Notable changes are: renaming the hook useCosmosPreloadData to useCosmosFamilyPreloadData and turning validators.ts and js-synchronisation.ts into classes.

    • Ledger Live Mobile: only marked as major because the useCosmosPreloadData hook changed name, which is a breaking change.

    • Cryptoassets: updated a URL in the Osmosis cryptocurrency definition.

    • Live CLI: updated references to cosmosSourceValidators to sourceValidators for re-usability.

6.32.0-next.0

Minor Changes

6.31.0

Minor Changes

6.31.0-next.0

Minor Changes

6.30.0

Minor Changes

6.30.0-next.2

Minor Changes

6.30.0-next.1

Minor Changes

6.30.0-next.0

Minor Changes

  • #604 e142b9484 Thanks @gre! - Set Goerli currency on coinType=60 per eth accepted convention

6.29.0

Minor Changes

6.29.0-next.0

Minor Changes

  • 6e956f22b: Update CAL