Skip to content

ychen-ledger/ledger-live-desktop

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

We are hiring, join us! πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»

Ledger Live (desktop) Crowdin

Ledger Live is a new generation wallet desktop application providing a unique interface to maintain multiple cryptocurrencies for your Ledger Nano S / Blue. Manage your device, create accounts, receive and send cryptoassets, ...and many more.

Architecture

Ledger Live is an hybrid desktop application built with Electron, React, Redux, RxJS,.. and highly optimized with ledger-core C++ library to deal with blockchains (sync, broadcast,..) via ledger-core-node-bindings. It communicates to Ledger hardware wallet devices (Nano X / Nano S / Blue) to verify address and sign transactions with ledgerjs. Some logic is shared with live-common.

Download

The latest stable release is available on ledger.com/ledger-live.

Previous versions and pre-releases can be downloaded on here from the Releases section.

Compatibility

  • macOS 10.14+
  • Windows 8.1+ (x64)
  • Linux (x64)

Signed hashes

Ledger Live releases are signed. The automatic update mechanism makes use of the signature to verify that each subsequent update is authentic. Instructions for verifying the hash and signatures of the installation packages are available on this page, which will be integrated into the official download page.

Development

Setup

Requirements

Install

# install dependencies
yarn

Run

# launch the app
yarn start

Build

# Build & package the whole app
# Creates a .dmg for Mac, .exe installer for Windows, or .AppImage for Linux
# Output files will be created in dist/ folder
yarn dist

Debug

If you are using Visual Studio Code IDE, here is a Launch Configuration that should allow you to run and debug the main process as well as the render process of the application.

As stated in the debugging documentation, this file should be named launch.json and located under the .vscode folder.

{
  "version": "0.2.0",
  "compounds": [
    {
      "name": "Run and Debug LLD",
      "configurations": ["Debug Main Process", "Debug Renderer Process"],
      "stopAll": true
    }
  ],
  "configurations": [
    {
      "name": "Debug Main Process",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceFolder}",
      "runtimeExecutable": "yarn",
      "args": ["start"],
      "outputCapture": "std",
      "resolveSourceMapLocations": null,
      "env": {
        "ELECTRON_ARGS": "--remote-debugging-port=8315"
      }
    },
    {
      "name": "Debug Renderer Process",
      "type": "chrome",
      "request": "attach",
      "address": "localhost",
      "port": 8315,
      "timeout": 60000
    }
  ]
}

Config (optional helpers)

Environment variables

(you can use a .env or export environment variables)

NO_DEBUG_COMMANDS=1
NO_DEBUG_DB=1
NO_DEBUG_ACTION=1
NO_DEBUG_TAB_KEY=1
NO_DEBUG_NETWORK=1
NO_DEBUG_ANALYTICS=1
NO_DEBUG_WS=1
NO_DEBUG_DEVICE=1
NO_DEBUG_COUNTERVALUES=1

other envs can be seen in live-common:src/env.js

Run tests

In a terminal you need to have webpack dev server running

yarn start

In an other terminal you need to launch the webdriver/electron container. First run will be slow. Next ones will be fast unless some changes are made to the container or package.json. You need to kill and re run the command if package.json changed. Make sure you are running Docker.

yarn start-electron-webdriver

You can point VNCViewer to localhost::5900 to check what is happening in the container. secret is the password. Then you can launch tests.

yarn spectron

or

node_modules/.bin/jest tests/specs/<FILEREGEX>.spec.js

By default it uses --runInBand jest option otherwise it explodes!

If you need to create an app.json, run a test that set up what you need and run it with the env var SPECTRON_DUMP_APP_JSON set. It will create tests/dump.json at the end of the spec.

Please put the image expectations at the end of the it(...) tests so that it does not break the whole flow if a snapshot breaks

Run code quality checks

yarn ci

File structure

src
β”œβ”€β”€ main : the main process is the mother of all process. it boots internal and renderer process and starts the window.
β”œβ”€β”€ internal : related to internal thread that runs commands, device logic, libcore,..
β”œβ”€β”€ renderer : everything related to the UI.
β”‚Β Β  β”œβ”€β”€ screens
β”‚Β Β  β”œβ”€β”€ modals
β”‚Β Β  β”œβ”€β”€ components : all components that are not screens or modals, flattened.
β”‚Β Β  β”œβ”€β”€ animations
β”‚Β Β  β”œβ”€β”€ icons
β”‚Β Β  β”œβ”€β”€ images
β”‚Β Β  β”œβ”€β”€ styles
β”‚Β Β  β”œβ”€β”€ bridge : logic related to interacting with accounts and currencies.
β”‚Β Β  β”œβ”€β”€ families : per currency specific logic and components
β”‚Β Β  β”œβ”€β”€ actions : redux actions
β”‚Β Β  β”œβ”€β”€ reducers : redux reducers
β”‚Β Β  β”œβ”€β”€ middlewares
β”‚Β Β  β”œβ”€β”€ analytics
β”‚Β Β  β”œβ”€β”€ fonts
β”‚Β Β  β”œβ”€β”€ hooks
β”‚Β Β  β”œβ”€β”€ i18n : all translation files
β”‚Β Β  β”œβ”€β”€ index.html : html point point
β”‚Β Β  β”œβ”€β”€ index.js : js entry point
β”‚Β Β  β”œβ”€β”€ init.js : initialize the rendering
β”‚Β Β  β”œβ”€β”€ live-common-setup.js : set up live-common for renderer specific parts
β”‚Β Β  └── ... other files related to renderer
β”œβ”€β”€ config : constants files. DEPRECATED. will be moved to live-common.
β”œβ”€β”€ helpers : helpers. DEPRECATED. will be moved to live-common or in relevant places.
β”œβ”€β”€ live-common-set-supported-currencies.js : generic set up of supported coins
β”œβ”€β”€ live-common-setup.js : generic set up of live-common
β”œβ”€β”€ logger : internal logging library. used by all thread. produces the "export logs".
β”œβ”€β”€ network.js : network implementation. will eventually move back to live-common.
└── sentry : related to bug report API

Localization / Translations

Translations from English to other languages are handled internally so it is not possible to directly contribute to them, however if you spot a bug (e.g. a wrong variable name) or any issue in translation files, feel free to report a bug to Ledger's support team and it will be taken care of.

Packages

No packages published

Languages

  • JavaScript 72.1%
  • TypeScript 27.5%
  • Python 0.2%
  • HTML 0.1%
  • Shell 0.1%
  • NSIS 0.0%