パッケージの詳細

@ledgerhq/live-env

LedgerHQ203.9kApache-2.02.11.0

Ledger Live environment definition

Ledger

readme

<image src="https://user-images.githubusercontent.com/3428394/165078916-06fe0b1b-c11d-4c6f-9c1a-ac9291333852.png" alt="ledger-logo" height="100" />   <image src="https://user-images.githubusercontent.com/3428394/165078595-1b2a55ae-783a-4c8f-8548-c4f050ae5e76.png" alt="js-logo" height="100" />

The Ledger Live JavaScript Ecosystem

We are hiring, join us! 👨‍💻👩‍💻

gitpoap badge

About

ledger-live is a monorepository whose purpose is to centralize all the JavaScript code related to the Ledger Live applications in one place.

Ledger Live is our platform of apps and services designed specifically for seamless integration with your Ledger device. Acting as a secure gateway to the crypto ecosystem, it allows direct access to a diverse range of crypto, NFT and DeFi services. This integration ensures a safer and more user-friendly experience that address a common security issue known as 'blind signing'.

Developers looking to integrate their blockchain in Ledger Live are invited to head to the Developer Portal where they will find the section Blockchain Support.

Installation

💡 This is only a minimal setup. You will need to perform additional installation steps depending on the package you want to work on, please refer to its nested readme file.

Cloning

git clone git@github.com:LedgerHQ/ledger-live.git
cd ledger-live

Proto

⚠️ Important: In order to install the right version of the tools you will need to install the proto toolchain manager. Please follow the instructions on the proto website to install it.

Once you have installed proto, please run the following command:

# Will download and install the supported versions of nodejs, npm and pnpm.
# Run it from the root or a subfolder of the repository.
proto use

Dependencies

Pre-requisites

  1. Install a newer ruby version

We recommend to use homebrew to install packages on your MacOs computer.

Make sure to install Ruby in its 3.3.X version

brew install ruby@3.3

Put the following content to your ~/.zshrc file

if [ -d "/opt/homebrew/opt/ruby@3.3/bin" ]; then
  export PATH=/opt/homebrew/opt/ruby@3.3/bin:$PATH
  export PATH=`gem environment gemdir`/bin:$PATH
fi

Reload the configuration

source ~/.zshrc

And check the ruby version

ruby --version

It displays the latest stable version among the one you've selected (3.3.7 at the time writing)

ruby 3.3.7 (2025-01-15 revision be31f993d7) [arm64-darwin24]
  1. Install bundler and cocoapods for ledger-live-mobile on iOS

    gem install bundler:2.5.7
    gem install cocoapods
  2. Downgrade the version of the activesupport gem

There is known bug on the activesupport version with cocoapods (we did not dig into it), so we need to downgrade it to make it works

gem uninstall activesupport

You will have the following output

cocoapods-core-1.16.2 depends on activesupport (>= 5.0, < 8)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]

Type y, then

gem install activesupport -v  7.0.8 # this version was working for the install, an other may work also

And you are done !

Install dependencies

Use the pnpm package manager to install the dependencies in the whole workspace:

pnpm i
# Alternatively, if you want to bypass the postinstall scripts which can be long to run
# pnpm i --ignore-scripts

Note: multiple postinstall steps will be triggered and fail if the applications prerequisites are not met. You can safely ignore the errors if you do not plan to work on those apps.

Common setup errors

Out of sync Podfile.lock

You may encounter this error when running pnpm i. Try:

rm -rf ~/.cocoapods/
pnpm clean && pnpm store prune && proto use && pnpm i && pnpm build:llm:deps
pnpm mobile pod

Note: If prompted to run bundle install do this in the ledger-live-mobile directory. Restart terminal if the error persists.

Usage

Important: All the commands should be run at the root of the monorepo.

Tools

We use pnpm workspaces and turborepo under the hood to handle local and external dependencies, orchestrate tasks and perform various optimizations like package hoisting or remote caching.

For changelog generation releases and package publishing we rely on the changesets library.

Root scripts

The scripts that are defined inside the root /package.json file will use turborepo under the hood and automatically perform needed tasks before running the action.

# This command will first build all the local dependencies needed in the right order.
# Only then it will attempt to build the `Ledger Live Desktop` app.
pnpm build:lld

Aliases

To run nested scripts which are not covered at the root, you should not change your working directory. Every package has an alias defined (see application or library tables or check out the package.json file) that you can use as a prefix when running the script from the root.

# `pnpm desktop` is one of the shorthands written to avoid changing the working directory.

# The following command will run the nested `test` script.
# `test` is defined inside the `./apps/ledger-live-desktop/package.json` file.
pnpm desktop test

Note that when using these kinds of scripts you will have to make sure that the dependencies are built beforehand.

Scoping

You can scope any pnpm or turborepo based script by using the --filter flag.

This is a very powerful feature that you should look into if you are a frequent contributor.

Please check out the pnpm or turborepo documentation for more details (the syntax is almost similar albeit pnpm being a bit more powerful).

Here are some examples:

# Install all the dependencies needed for the packages under ./libs
pnpm i -F "{libs/**}..."
# Run lint only on packages that have been changed compared to origin/develop
pnpm lint --filter=[origin/develop]
# Test every package that has been changed since the last commit excluding the applications
pnpm run test --continue --filter="!./apps/*" --filter="...[HEAD~1]"
# Run typechecks for the Ledger Live Mobile project
pnpm typecheck --filter="live-mobile"

Documentation

Each project folder has a README.md file which contains basic documentation. It includes background information about the project and how to setup, run and build it.

Please check the wiki for additional documentation.

Structure

The sub-packages are (roughly) split into three categories.

/app - Applications

The applications are user-facing programs which depend on one or more libraries.

<summary>Ledger Live Applications</summary>

| Name | Alias | Download | | -------------------------------------------------------------------------------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Ledger Live Desktop | pnpm desktop | Website | | Ledger Live Mobile | pnpm mobile | Android / iOS |

/libs - Libraries

Libraries serve as publicly available packages, designed for integration with other libraries or applications. These packages are deployed to the official npm repository under the @ledgerhq organization.

<summary>Ledger Live Libraries</summary>

| Name | Alias | Umbrella | Package | | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | @ledgerhq/ledger-live-common | pnpm common | ----- | | ---- | ----- | ----- | ------- | | @ledgerhq/cryptoassets | pnpm ljs:cryoptoassets | ledgerjs | npm | | @ledgerhq/devices | pnpm ljs:devices | ledgerjs | npm | | @ledgerhq/errors | pnpm ljs:errors | ledgerjs | npm | | @ledgerhq/hw-app-algorand | pnpm ljs:hw-app-algorand | ledgerjs | npm | | @ledgerhq/hw-app-btc | pnpm ljs:hw-app-btc | ledgerjs | npm | | @ledgerhq/hw-app-cosmos | pnpm ljs:hw-app-cosmos | ledgerjs | npm | | @ledgerhq/hw-app-eth | pnpm ljs:hw-app-eth | ledgerjs | npm | | @ledgerhq/hw-app-helium | pnpm ljs:hw-app-helium | ledgerjs | npm | | @ledgerhq/hw-app-polkadot | pnpm ljs:hw-app-polkadot | ledgerjs | npm | | @ledgerhq/hw-app-solana | pnpm ljs:hw-app-solana | ledgerjs | npm | | @ledgerhq/hw-app-str | pnpm ljs:hw-app-str | ledgerjs | npm | | @ledgerhq/hw-app-tezos | pnpm ljs:hw-app-tezos | ledgerjs | npm | | @ledgerhq/hw-app-trx | pnpm ljs:hw-app-trx | ledgerjs | npm | | @ledgerhq/hw-app-xrp | pnpm ljs:hw-app-xrp | ledgerjs | npm | | @ledgerhq/hw-transport | pnpm ljs:hw-transport | ledgerjs | npm | | @ledgerhq/hw-transport-http | pnpm ljs:hw-transport-http | ledgerjs | npm | | @ledgerhq/hw-transport-mocker | pnpm ljs:hw-transport-mocker | ledgerjs | npm | | @ledgerhq/hw-transport-node-hid | pnpm ljs:hw-transport-node | ledgerjs | npm | | @ledgerhq/hw-transport-node-hid-noevents | pnpm ljs:hw-transport-node | ledgerjs | npm | | @ledgerhq/hw-transport-node-hid-singleton | pnpm ljs:hw-transport-node | ledgerjs | npm | | @ledgerhq/hw-transport-node-speculos | pnpm ljs:hw-transport-node | ledgerjs | npm | | @ledgerhq/hw-transport-node-speculos-http | pnpm ljs:hw-transport-node | ledgerjs | npm | | @ledgerhq/hw-transport-web-ble | pnpm ljs:hw-transport-web | ledgerjs | npm | | @ledgerhq/hw-transport-webhid | pnpm ljs:hw-transport-webhid | ledgerjs | npm | | @ledgerhq/hw-transport-webusb | pnpm ljs:hw-transport-webusb | ledgerjs | npm | | @ledgerhq/logs | pnpm ljs:logs | ledgerjs | npm | | @ledgerhq/react-native-hid | pnpm ljs:react-native-hid | ledgerjs | npm | | @ledgerhq/react-native-hw-transport-ble | pnpm ljs:react-native-hw | ledgerjs | npm | | @ledgerhq/types-cryptoassets | pnpm ljs:types-cryptoassets | ledgerjs | npm | | @ledgerhq/types-devices | pnpm ljs:types-devices | ledgerjs | npm | | @ledgerhq/types-live | pnpm ljs:types-live | ledgerjs | npm | | ---- | ----- | ----- | ------- | | @ledgerhq/icons-ui | pnpm ui:icons | ui | npm | | @ledgerhq/native-ui | pnpm ui:native | ui | npm | | @ledgerhq/react-ui | pnpm ui:react | ui | npm | | @ledgerhq/ui-shared | pnpm ui:shared | ui | npm |

/tools - Tools

⚠️ Tools are primarily intended for internal use and are largely undocumented.

A tool can be a github action, a shell script or a piece of JavaScript code that is used throughout this repository.

Contributing

Please check the general guidelines for contributing to Ledger Live projects: CONTRIBUTING.md.

Each individual project may include its own specific guidelines, located within its respective folder.

While you explore these projects, here are some key points to keep in mind:

  • Follow the git workflow, prefix your branches and do not create unnecessary merge commits.
  • Be mindful when creating Pull Requests, clearly specify the purpose of your changes and include tests where applicable.
  • Ledger Applications are mostly accepting bugfix contributions. Feature contributions are subject to review; they may be declined if they don't align with our roadmap or our long-term objectives.

Nightly Releases

Every night a github action merges the develop branch into the nightly branch.

For more information on the nightly releases, have a look at our wiki.

Ledger Live Desktop

  • Every commit triggers a workflow that will build and attach the application binaries to the run.
  • For Ledger Employees: Nightly releases are built every night under the protected ledger-live-build repository.

Ledger Live Mobile

Libraries

Nightly versions of library packages are pushed every night to npm.

To install a nightly library use the @nightly dist-tag.

npm i @ledgerhq/live-common@nightly

License

Please check each project LICENSE file, most of them are under the MIT license.

更新履歴

@ledgerhq/live-env

2.11.0

Minor Changes

2.11.0-next.0

Minor Changes

2.10.0

Minor Changes

2.10.0-next.0

Minor Changes

2.9.0

Minor Changes

2.9.0-next.0

Minor Changes

2.8.0

Minor Changes

2.8.0-next.0

Minor Changes

2.7.0

Minor Changes

  • #9584 32f2a0c Thanks @francois-guerin-ledger! - perf: set a limit on the number of operations retrieved during the initial synchronization of the Stellar account to improve sync performance.

2.7.0-next.0

Minor Changes

  • #9584 32f2a0c Thanks @francois-guerin-ledger! - perf: set a limit on the number of operations retrieved during the initial synchronization of the Stellar account to improve sync performance.

2.6.0

Minor Changes

2.6.0-next.0

Minor Changes

2.5.0

Minor Changes

2.5.0-next.0

Minor Changes

2.4.1

Patch Changes

2.4.1-next.0

Patch Changes

2.4.0

Minor Changes

  • #7991 ced792c Thanks @lambertkevin! - Decreasing the base fee multiplier to 27% for the EIP1559 fee system. Based on the spec of EIP1559, it should allow to create blocks which could be included in the next 3 blocks even in awful network situations.

2.4.0-next.0

Minor Changes

  • #7991 ced792c Thanks @lambertkevin! - Decreasing the base fee multiplier to 27% for the EIP1559 fee system. Based on the spec of EIP1559, it should allow to create blocks which could be included in the next 3 blocks even in awful network situations.

2.3.0

Minor Changes

Patch Changes

2.3.0-next.0

Minor Changes

Patch Changes

2.2.0

Minor Changes

Patch Changes

2.2.0-next.0

Minor Changes

Patch Changes

2.1.0

Minor Changes

Patch Changes

  • #6883 6623cd1 Thanks @lpaquet-ledger! - Add user IP

  • #6796 6552679 Thanks @gre! - Drop technical Account#name and Account#starred fields and replace it with a new architecture: a wallet store that contains all user's data.

2.1.0-next.0

Minor Changes

Patch Changes

  • #6883 6623cd1 Thanks @lpaquet-ledger! - Add user IP

  • #6796 6552679 Thanks @gre! - Drop technical Account#name and Account#starred fields and replace it with a new architecture: a wallet store that contains all user's data.

2.0.2

Patch Changes

2.0.2-next.0

Patch Changes

2.0.1

Patch Changes

2.0.1-next.0

Patch Changes

2.0.0

Major Changes

  • #5682 4744c31 Thanks @lambertkevin! - Removing unused env var related to Ethereum transactions crafted with the old ethereum family

Patch Changes

  • #6262 0dd1546 Thanks @JesseKuntz! - Updating the near-api-js library and fetching the NEAR staking positions from the node rather than the kitwallet API.

2.0.0-next.0

Major Changes

  • #5682 4744c31 Thanks @lambertkevin! - Removing unused env var related to Ethereum transactions crafted with the old ethereum family

Patch Changes

  • #6262 0dd1546 Thanks @JesseKuntz! - Updating the near-api-js library and fetching the NEAR staking positions from the node rather than the kitwallet API.

1.0.1

Patch Changes

  • #6279 3e28615 Thanks @hedi-edelbloute! - Updating the near-api-js library and fetching the NEAR staking positions from the node rather than the kitwallet API.

1.0.1-hotfix.0

Patch Changes

  • #6279 3e28615 Thanks @hedi-edelbloute! - Updating the near-api-js library and fetching the NEAR staking positions from the node rather than the kitwallet API.

1.0.0

Major Changes

1.0.0-next.0

Major Changes

  • #5682 4744c31 Thanks @lambertkevin! - Removing unused env var related to Ethereum transactions crafted with the old ethereum family

0.9.0

Minor Changes

0.9.0-next.0

Minor Changes

0.8.0

Minor Changes

Patch Changes

0.8.0-next.0

Minor Changes

Patch Changes

0.7.0

Minor Changes

0.7.0-next.0

Minor Changes

0.6.1

Patch Changes

  • #4709 9e2d32aec4 Thanks @alexandremgo! - feat: enable printing logs to stdout for debug

    • Setup simple tracing system on LLM with context
    • If VERBOSE env var is set, filtered logs can be stdout from the main thread

0.6.1-next.0

Patch Changes

  • #4709 9e2d32aec4 Thanks @alexandremgo! - feat: enable printing logs to stdout for debug

    • Setup simple tracing system on LLM with context
    • If VERBOSE env var is set, filtered logs can be stdout from the main thread

0.6.0

Minor Changes

  • #4285 533278e2c4 Thanks @chabroA! - Migrate Ethereum family implementation to EVM family

    Replace the legcay Ethereum familly implementation that was present in ledger-live-common by the coin-evm lib implementation. This change was made in order to improve scalabillity and maintainability of the evm coins, as well as more easilly integrate new evm based chains in the future.

0.6.0-next.0

Minor Changes

  • #4285 533278e2c4 Thanks @chabroA! - Migrate Ethereum family implementation to EVM family

    Replace the legcay Ethereum familly implementation that was present in ledger-live-common by the coin-evm lib implementation. This change was made in order to improve scalabillity and maintainability of the evm coins, as well as more easilly integrate new evm based chains in the future.

0.5.0

Minor Changes

Patch Changes

0.5.0-next.0

Minor Changes

Patch Changes

0.4.2

Patch Changes

0.4.2-next.0

Patch Changes

0.4.1

Patch Changes

0.4.1-next.0

Patch Changes

0.4.0

Minor Changes

  • #3841 bae3b64dd2 Thanks @Justkant! - feat: recover on LLD

    Handle the recover deeplink Add a screen to redirect to the correct device onboarding automatically Rework of the recover feature flags Add upsell screen for recover after onboarding

Patch Changes

0.4.0-next.0

Minor Changes

  • #3841 bae3b64dd2 Thanks @Justkant! - feat: recover on LLD

    Handle the recover deeplink Add a screen to redirect to the correct device onboarding automatically Rework of the recover feature flags Add upsell screen for recover after onboarding

Patch Changes

0.3.1

Patch Changes

0.3.1-next.0

Patch Changes

0.3.0

Minor Changes

0.3.0-next.0

Minor Changes

0.2.0

Minor Changes

Patch Changes

0.2.0-next.0

Minor Changes

Patch Changes

0.1.0

Minor Changes

0.1.0-next.0

Minor Changes