<img src="https://user-images.githubusercontent.com/4631227/191834116-59cf590e-25cc-4956-ae5c-812ea464f324.png" height="100" />

## @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

```bash
pnpm import:cal-tokens
```

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

*   [abandonSeedAddresses](#abandonseedaddresses)
*   [getAbandonSeedAddress](#getabandonseedaddress)
    *   [Parameters](#parameters)
*   [](#)
*   [registerCryptoCurrency](#registercryptocurrency)
    *   [Parameters](#parameters-1)
*   [listCryptoCurrencies](#listcryptocurrencies)
    *   [Parameters](#parameters-2)
*   [findCryptoCurrency](#findcryptocurrency)
    *   [Parameters](#parameters-3)
*   [findCryptoCurrencyByScheme](#findcryptocurrencybyscheme)
    *   [Parameters](#parameters-4)
*   [findCryptoCurrencyByTicker](#findcryptocurrencybyticker)
    *   [Parameters](#parameters-5)
*   [findCryptoCurrencyById](#findcryptocurrencybyid)
    *   [Parameters](#parameters-6)
*   [findCryptoCurrencyByKeyword](#findcryptocurrencybykeyword)
    *   [Parameters](#parameters-7)
*   [hasCryptoCurrencyId](#hascryptocurrencyid)
    *   [Parameters](#parameters-8)
*   [getCryptoCurrencyById](#getcryptocurrencybyid)
    *   [Parameters](#parameters-9)
*   [findExchangeCurrencyConfig](#findexchangecurrencyconfig)
    *   [Parameters](#parameters-10)
*   [hasFiatCurrencyTicker](#hasfiatcurrencyticker)
    *   [Parameters](#parameters-11)
*   [findFiatCurrencyByTicker](#findfiatcurrencybyticker)
    *   [Parameters](#parameters-12)
*   [getFiatCurrencyByTicker](#getfiatcurrencybyticker)
    *   [Parameters](#parameters-13)
*   [listFiatCurrencies](#listfiatcurrencies)
*   [\_\_clearObject](#__clearobject)
    *   [Parameters](#parameters-14)
*   [\_\_clearAllLists](#__clearalllists)
*   [listTokens](#listtokens)
    *   [Parameters](#parameters-15)
*   [listTokensForCryptoCurrency](#listtokensforcryptocurrency)
    *   [Parameters](#parameters-16)
*   [listTokenTypesForCryptoCurrency](#listtokentypesforcryptocurrency)
    *   [Parameters](#parameters-17)
*   [findTokenByTicker](#findtokenbyticker)
    *   [Parameters](#parameters-18)
*   [findTokenById](#findtokenbyid)
    *   [Parameters](#parameters-19)
*   [hasTokenId](#hastokenid)
    *   [Parameters](#parameters-20)
*   [getTokenById](#gettokenbyid)
    *   [Parameters](#parameters-21)
*   [removeTokenFromAllLists](#removetokenfromalllists)
    *   [Parameters](#parameters-22)
*   [id](#id)

### 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](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/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**&#x20;

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

###

### registerCryptoCurrency

#### Parameters

*   `currency` **CryptoCurrency**&#x20;
*   `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

Returns **void**&#x20;

### listCryptoCurrencies

#### Parameters

*   `withDevCrypto` **any**  (optional, default `false`)
*   `withTerminated` **any**  (optional, default `false`)

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<CryptoCurrency>**&#x20;

### findCryptoCurrency

#### Parameters

*   `f` **any**&#x20;

Returns **(CryptoCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### findCryptoCurrencyByScheme

#### Parameters

*   `scheme` **any**&#x20;

Returns **(CryptoCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### findCryptoCurrencyByTicker

#### Parameters

*   `ticker` **any**&#x20;

Returns **(CryptoCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### findCryptoCurrencyById

#### Parameters

*   `id` **any**&#x20;

Returns **(CryptoCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### findCryptoCurrencyByKeyword

#### Parameters

*   `keyword` **any**&#x20;
*   `tests`   (optional, default `["keywords","name","id","ticker","manager"]`)

Returns **(CryptoCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### hasCryptoCurrencyId

#### Parameters

*   `id` **any**&#x20;

Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**&#x20;

### getCryptoCurrencyById

#### Parameters

*   `id` **any**&#x20;

Returns **CryptoCurrency**&#x20;

### findExchangeCurrencyConfig

#### Parameters

*   `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

Returns **({config: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), signature: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)} | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### hasFiatCurrencyTicker

#### Parameters

*   `ticker` **any**&#x20;

Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**&#x20;

### findFiatCurrencyByTicker

#### Parameters

*   `ticker` **any**&#x20;

Returns **(FiatCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### getFiatCurrencyByTicker

#### Parameters

*   `ticker` **any**&#x20;

Returns **FiatCurrency**&#x20;

### listFiatCurrencies

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<FiatCurrency>**&#x20;

### \_\_clearObject

Only for jest purpose, clean object to be empty

#### Parameters

*   `obj` **Record<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), (TokenCurrency | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<TokenCurrency>)>**&#x20;

Returns **void**&#x20;

### \_\_clearAllLists

Only for jest purpose, clear all the init list

Returns **void**&#x20;

### listTokens

#### Parameters

*   `options` **Partial\<TokensListOptions>?**&#x20;

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<TokenCurrency>**&#x20;

### listTokensForCryptoCurrency

#### Parameters

*   `currency` **CryptoCurrency**&#x20;
*   `options` **Partial\<TokensListOptions>?**&#x20;

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<TokenCurrency>**&#x20;

### listTokenTypesForCryptoCurrency

#### Parameters

*   `currency` **CryptoCurrency**&#x20;

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;

### findTokenByTicker

#### Parameters

*   `ticker` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

Returns **(TokenCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### findTokenById

#### Parameters

*   `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

Returns **(TokenCurrency | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;

### hasTokenId

#### Parameters

*   `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**&#x20;

### getTokenById

#### Parameters

*   `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

Returns **TokenCurrency**&#x20;

### removeTokenFromAllLists

Delete previous token entry to all array

#### Parameters

*   `token` **TokenCurrency**&#x20;

### 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
