Before you start
Ensure you cloned all the necessary repositories involved in the blockchain implementation :
GitHub repository | Description |
---|---|
Ledger Live | Software Wallet on Desktop, Mobile and CLI. |
Ledger Live monorepo
The LedgerHQ/ledger-live repository is structured as a monorepo. A monorepo is a single repository that stores multiple projects or components, which in this case, are the various parts that make up Ledger Live.
The team currently uses turborepo and split the project in main categories :
- apps : ledger live desktop, ledger live mobile, ledger live cli
- libs: common code between apps and standalone js libraries
- tools : github actions, utils, …
Device apps are applications that you can find directly on your Ledger device (small icons installed with the app manager).
They are are in charge of seed derivation and signing.These are available in other repositories; in the monorepo, we handle only the hardware communication libraries associated with them.
Ledger Live libraries
The monorepo libs folder contains:
- ledger-live-common: common code between apps eg. coin-module initialization and signer definition, react common code, …
- coin-framework: types and utils necessary for blockchain integration
- coin-modules: blockchain libraries, configurable and with signer injection
- ledgerjs : types, nano apps communication libraries, currency metadata
Blockchain integration is implemented in a coin-module, configured in live-common, and used by apps through a generic interface named “Bridges”.
In live-common, we inject signer-related code, present in ledgerjs, to the coin-module.
Blockchains sometimes have a common interface / a common way to deal with them (EVM, cosmos-sdk, parity polkadot sdk, …), and use the same device app, that’s why we talk about blockchain families.
Ledger devices signer libraries are either directly in the repository or imported from partners. Their name usually start with hw-app prefix (ex: hw-app-btc on npmjs, source code).