# @ledgerhq/live-config

> Ledger Live configuration tools

Latest version **3.8.0** (published 2026-06-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @ledgerhq/live-config
pnpm add @ledgerhq/live-config
yarn add @ledgerhq/live-config
bun add @ledgerhq/live-config
```

## Health

**Score 55/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.8.0 |
| Published | 2026-06-11 |
| First published | 2023-12-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 79.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 618 |
| Maintainers | phenry-ledger, sergii-shkolin, gbrahm-ledger, thomas.coudray, ldg-github-ci, vbouzon, ledger-releaser |
| Keywords | Ledger |

## Links

- npm: https://www.npmjs.com/package/@ledgerhq/live-config
- Repository: https://github.com/LedgerHQ/ledger-live
- Homepage: https://github.com/LedgerHQ/ledger-live/tree/develop/libs/live-config
- Issues: https://github.com/LedgerHQ/ledger-live/issues
- npm.io page: https://npm.io/package/@ledgerhq/live-config

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21

## Recent versions

- 3.8.0 (latest) — 2026-06-11
- 3.8.0-nightly.20260612030643 (nightly) — 2026-06-12
- 3.1.0-next.0 (next) — 2024-08-05
- 2.0.0-new-wc.0 (new-wc) — 2024-02-20
- 2.0.0-new-wc-test.0 (new-wc-test) — 2024-02-20
- 2.0.0-wc-test.0 (wc-test) — 2024-02-14
- 2.0.0-start-exchange.0 (start-exchange) — 2024-01-31
- 1.0.1-custom-exchange.0 (custom-exchange) — 2024-01-09
- 3.8.0-nightly.20260611030748 — 2026-06-11
- 3.8.0-nightly.20260610030722 — 2026-06-10
- 3.8.0-nightly.20260609030647 — 2026-06-09
- 3.8.0-nightly.20260606030643 — 2026-06-06
- 3.8.0-nightly.20260605030615 — 2026-06-05
- 3.7.0-nightly.20260416030536 — 2026-04-16
- 3.7.0-nightly.20260415165444 — 2026-04-15
- … 89 more at https://npm.io/package/@ledgerhq/live-config/versions

## README

<img src="https://user-images.githubusercontent.com/3273751/151214602-f5153588-1911-4456-ae65-604d56821b36.png" height="80" /> <img src="https://user-images.githubusercontent.com/211411/52533081-e679d380-2d2e-11e9-9c5e-571e4ad0107b.png" height="80" />

[![Ledger Devs Slack](https://img.shields.io/badge/Slack-LedgerDevs-yellow.svg?style=flat)](https://ledger-dev.slack.com/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Welcome to Ledger's @ledgerhq/live-config JavaScript lib.

### Introduction

@ledgerhq/live-config is a versatile TypeScript library designed to manage application configurations dynamically. It supports various data types and integrates seamlessly with different configuration providers.

### Features

- Singleton pattern: Ensures only one instance of the configuration is active.
- Support for multiple data types: string, boolean, number, object, array.
- Custom configuration providers: Extendable to various backend services.
- Easy to use API for fetching configuration values.

### Installation
```
npm install @ledgerhq/live-config
```

or

```
yarn add @ledgerhq/live-config
```

### Usage
## Initializing LiveConfig
LiveConfig is a singleton class. To use it, you must first set a provider and a configuration schema.

Set a Provider
Implement your own provider by extending the Provider interface. Here is an example provider implementation:
```
import { Provider } from "@ledgerhq/live-config/providers/index";
import { ConfigInfo, LiveConfig } from "@ledgerhq/live-config/LiveConfig";

class MyCustomProvider implements Provider {
  getValueByKey(key: string, info: ConfigInfo) {
    // Implement logic to retrieve the value for the given key
    // This can be an API call, local storage access, etc.
  }
}

const myProvider = new MyCustomProvider();
LiveConfig.setProvider(myProvider);
```

Set Configuration Schema
Define your configuration schema as follows:

```
import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";

const configSchema = {
  key1: { type: "string", default: "value1" },
  key2: { type: "boolean", default: false },
  key3: { type: "number", default: 1 },
  key4: {
    type: "object",
    default: {
      url: "https://url.com",
      supportedCurrencies: ["btc", "eth"],
    },
  },
};

LiveConfig.setConfig(configSchema);
```

## Retrieving Configuration Values
To retrieve a value from the configuration, use the getValueByKey method:
```
const value = LiveConfig.getValueByKey("key1");
```

---
_Source: https://npm.io/package/@ledgerhq/live-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
