<img src="https://user-images.githubusercontent.com/211411/34776833-6f1ef4da-f618-11e7-8b13-f0697901d6a8.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.

## API

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

#### Table of Contents

-   [getAbandonSeedAddress](#getabandonseedaddress)
    -   [Parameters](#parameters)
-   [CryptoCurrencyObjMap](#cryptocurrencyobjmap)
-   [CryptoCurrencyConfig](#cryptocurrencyconfig)
-   [CryptoCurrencyIds](#cryptocurrencyids)
-   [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)
-   [listTokens](#listtokens)
    -   [Parameters](#parameters-14)
-   [listTokensForCryptoCurrency](#listtokensforcryptocurrency)
    -   [Parameters](#parameters-15)
-   [listTokenTypesForCryptoCurrency](#listtokentypesforcryptocurrency)
    -   [Parameters](#parameters-16)
-   [findTokenByTicker](#findtokenbyticker)
    -   [Parameters](#parameters-17)
-   [findTokenById](#findtokenbyid)
    -   [Parameters](#parameters-18)
-   [findTokenByAddress](#findtokenbyaddress)
    -   [Parameters](#parameters-19)
-   [hasTokenId](#hastokenid)
    -   [Parameters](#parameters-20)
-   [getTokenById](#gettokenbyid)
    -   [Parameters](#parameters-21)
-   [findCompoundToken](#findcompoundtoken)
    -   [Parameters](#parameters-22)
-   [Unit](#unit)
    -   [Properties](#properties)
-   [CurrencyCommon](#currencycommon)
    -   [Properties](#properties-1)
-   [TokenCurrency](#tokencurrency)
-   [FiatCurrency](#fiatcurrency)
-   [ExplorerView](#explorerview)
    -   [Properties](#properties-2)
-   [CryptoCurrency](#cryptocurrency)
-   [Currency](#currency)

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

### CryptoCurrencyObjMap

Type: $Exact&lt;$ObjMap&lt;any, F>>

### CryptoCurrencyConfig

Type: [CryptoCurrencyObjMap](#cryptocurrencyobjmap)&lt;function (any): C>

### CryptoCurrencyIds

Type: $Keys&lt;any>

### registerCryptoCurrency

#### Parameters

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

### 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)&lt;[CryptoCurrency](#cryptocurrency)>** 

### findCryptoCurrency

#### Parameters

-   `f` **any** 

Returns **[CryptoCurrency](#cryptocurrency)?** 

### findCryptoCurrencyByScheme

#### Parameters

-   `scheme` **any** 

Returns **[CryptoCurrency](#cryptocurrency)?** 

### findCryptoCurrencyByTicker

#### Parameters

-   `ticker` **any** 

Returns **[CryptoCurrency](#cryptocurrency)?** 

### findCryptoCurrencyById

#### Parameters

-   `id` **any** 

Returns **[CryptoCurrency](#cryptocurrency)?** 

### findCryptoCurrencyByKeyword

#### Parameters

-   `keyword` **any** 

Returns **[CryptoCurrency](#cryptocurrency)?** 

### hasCryptoCurrencyId

#### Parameters

-   `id` **any** 

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

### getCryptoCurrencyById

#### Parameters

-   `id` **any** 

Returns **[CryptoCurrency](#cryptocurrency)** 

### findExchangeCurrencyConfig

#### Parameters

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

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)}?** 

### hasFiatCurrencyTicker

#### Parameters

-   `ticker` **any** 

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

### findFiatCurrencyByTicker

#### Parameters

-   `ticker` **any** 

Returns **[FiatCurrency](#fiatcurrency)?** 

### getFiatCurrencyByTicker

#### Parameters

-   `ticker` **any** 

Returns **[FiatCurrency](#fiatcurrency)** 

### listFiatCurrencies

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

### listTokens

#### Parameters

-   `options` **$Shape&lt;TokensListOptions>?** 

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

### listTokensForCryptoCurrency

#### Parameters

-   `currency` **[CryptoCurrency](#cryptocurrency)** 
-   `options` **$Shape&lt;TokensListOptions>?** 

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

### listTokenTypesForCryptoCurrency

#### Parameters

-   `currency` **[CryptoCurrency](#cryptocurrency)** 

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

### findTokenByTicker

#### Parameters

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

Returns **[TokenCurrency](#tokencurrency)?** 

### findTokenById

#### Parameters

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

Returns **[TokenCurrency](#tokencurrency)?** 

### findTokenByAddress

#### Parameters

-   `address` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 

Returns **[TokenCurrency](#tokencurrency)?** 

### hasTokenId

#### Parameters

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

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

### getTokenById

#### Parameters

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

Returns **[TokenCurrency](#tokencurrency)** 

### findCompoundToken

if a given token account is a token that can be used in compound, give the associated compound token (cToken)

#### Parameters

-   `token` **any** 

Returns **[TokenCurrency](#tokencurrency)?** 

### Unit

#### Properties

-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
-   `code` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
-   `magnitude` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 
-   `showAllDigits` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** 
-   `prefixCode` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** 

### CurrencyCommon

#### Properties

-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
-   `ticker` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
-   `units` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Unit](#unit)>** 
-   `symbol` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
-   `disableCountervalue` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** 
-   `delisted` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** 
-   `countervalueTicker` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 

### TokenCurrency

Type: any

### FiatCurrency

Type: any

### ExplorerView

#### Properties

-   `tx` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
-   `address` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
-   `token` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 

### CryptoCurrency

Type: any

### Currency

Type: ([FiatCurrency](#fiatcurrency) \| [CryptoCurrency](#cryptocurrency) \| [TokenCurrency](#tokencurrency))

## Maintainance notes

To regenerate data:

    node script/crypto-assets-importer/index.js ~/dev/crypto-assets
    node script/crypto-assets-importer/tron/sync-trc10-tokens.js

NB: currencies, trc20 and asa are currently manually maintained.
