npm package: @owdin/live-common
Description: Common ground for the Ledger Live apps
Latest version: 20.5.5

**[We are hiring, join us! 👨‍💻👩‍💻](https://jobs.lever.co/ledger/?department=Engineering)**

## “Ledger Live Common” `@owdin/live-common`

`````
                ````
           `.--:::::
        `.-:::::::::       ````
       .://///:-..``     `-/+++/-`
     `://///-`           -++++++o/.
    `/+++/:`            -+++++osss+`
   `:++++:`            ./++++-/osss/`
   .+++++`             `-://- .ooooo.
   -+ooo/`                ``  `/oooo-
   .oooo+` .::-.`             `+++++.
   `+oooo:./+++/.             -++++/`
    -ossso+++++:`            -/+++/.
     -ooo+++++:`           .://///.
      ./+++++/`       ``.-://///:`
        `---.`      -:::::///:-.
                    :::::::-.`
                    ....``

`````

Ledger Live Common (`@owdin/live-common`) is a JavaScript library available via a [NPM package](https://npmjs.com/@owdin/live-common).

This library depends on a bunch of [ledgerjs packages](https://github.com/LedgerHQ/ledgerjs) and put together the core business logic behind [Ledger Live Desktop](https://github.com/LedgerHQ/ledger-live-desktop) and [Ledger Live Mobile](https://github.com/LedgerHQ/ledger-live-mobile).

The stack is pretty standard for a ES6 and FlowType library. The notable dependencies are libraries like **RxJS** and **BigNumber.js**. There is also a bit of React and Redux but exposed in agnostic ways (meaning it's not mandatory to use – there will be dedicated entry point for them to offer utilities like React Hooks).

## Table of Contents

- [Introduction, Goals and Tradeoffs](./docs/intro.md)
- Getting started
  - [Setup to use `@owdin/live-common`](./docs/live-common-setup.md)
  - [`ledger-live` CLI](./docs/cli.md)
  - **tools** web playground
  - `mobile-test-app` test project
- Learn by example
  - [gist: transaction with a Ledger device](./docs/gist-tx.md)
  - [gist: Update firmware of a Ledger device](./docs/gist-firmware.md)
  - ...
- [The Currency models](./docs/currency.md) and utilities
- [The Account models and portfolio logic](./docs/account.md)
- The [CurrencyBridge](./docs/CurrencyBridge.md): scan accounts with a device
- The [AccountBridge](./docs/AccountBridge.md): synchronize an account and perform transaction
- [Hardware Wallet logic](./docs/hw.md)
- [Apps store logic](./docs/apps.md)
- [Firmware Update logic](./docs/firmware-update.md)
- [Countervalues logic](./docs/countervalues.md)
- Coin integration specifics
  - [Introduction](./docs/ci-intro.md)
  - Bridge implementations, where to start? (JS, Libcore, Mock)
  - Implementing the hardware wallet logic of a new coin
  - [The account derivation (BIP44 and exceptions)](./docs/derivation.md)
- Advanced
  - [api/socket `createDeviceSocket` and script runner](./docs/socket.md)
  - env.js: live-common configuration system
  - Serialization and reconciliation
  - libcore typing and wrapping
  - cross.js and "LiveQR" protocol
  - cache.js helpers
  - Tokens management and ERC20
  - [Developing with lib-ledger-core bindings](./docs/adding-libcore-bindings.md)

### Developing with Ledger Live Common

- [Developing setup](./docs/developing.md)
- The different test approaches
  - Unit test of live-common logic
  - End-to-end tests of the `ledger-live` command
  - Bridge dataset tests
  - Providing mocks to implement UI tests