Skip to content

LLC:ci intro

Alexandrine Boissiere edited this page Jul 9, 2024 · 2 revisions

Coin Integration Introduction

Ledger Live Common is designed to have very generic models (for currencies, accounts) but to also facilitate new coin integrations.

The way this is structured is the folder src/families would contain the only specific bits a coin family will have and the rest is factorized and generic.

The goal is to minimize the amount of effort to implement while guaranteeing the general library integrity.

A typical families folder

For each new coin integration, define a family for it (potentially one family of coin can contain many coins, for instance Bitcoin Cash is in bitcoin family, Ethereum Classic is in ethereum family). A family is a ledger specific technical grouping that puts together the similar coins, typically those issued by a fork.

The family is defined in the CryptoCurrency field.

For a new family, create a new folder in src/families.

The folder will have this kind of structure:

.
├── bridge
│   ├── js.ts
│   └── mock.ts
├── cli-transaction.ts
├── hw-getAddress.ts
├── hw-signMessage.ts  # if possible
├── transaction.ts # transaction specific fields
└── types.ts # family specific types

Most of these files are optional and you will typically see when a file implementation is missing when testing.

A coin would typically also have custom files to share code or expose families specific features.

Clone this wiki locally