Skip to content

blooo-io/LedgerHQ-app-aelf

Repository files navigation

Code style check Compilation & tests Sonarcloud

Aelf app for Ledger Wallet

Overview

This app adds support for the Aelf native token to Ledger Nano S/SP/X hardware wallet.

Prerequisites: Working with the device with VSCode

You can quickly setup a convenient environment to build and test your application by using the vscode integration and the ledger-app-dev-tools docker image.

It will allow you, whether you are developing on macOS, Windows or Linux to quickly build your apps, test them on Speculos and load them on any supported device.

  1. Run Docker.
  2. Make sure you have an X11 server running :
    • On Ubuntu Linux, it should be running by default.
    • On macOS, install and launch XQuartz (make sure to go to XQuartz > Preferences > Security and check "Allow client connections").
    • On Windows, install and launch VcXsrv (make sure to configure it to disable access control).
  3. Open a terminal and clone LedgerHQ-app-aelf with git clone https://github.com/blooo-io/LedgerHQ-app-aelf.git.
  4. Open the LedgerHQ-app-aelf folder with VSCode.
  5. Open the vscode tasks with ctrl + shift + b (command + shift + b on a Mac) and run the following actions : Pull and run the ledger-app-dev-tools docker image by selecting Run dev-tools image.

Build

Open the vscode tasks with ctrl + shift + b (command + shift + b on a Mac) and run the build for the device model of your choice with Build app. To build the app in debug mode use Build app [Debug] instead.

Clean

Open the vscode tasks with ctrl + shift + b (command + shift + b on a Mac) and run the build for the device model of your choice with Clean build files.

Load

Open the vscode tasks with ctrl + shift + b (command + shift + b on a Mac) and load your binary on a Ledger device with Load app on device.

Test

Python

First install the deps

  • Open the vscode tasks with ctrl + shift + b (command + shift + b on a Mac) and run the following actions :
    • First install the requirements with Install tests requirements.
    • Run the tests with Run functional tests.

Unit

Run C tests:

make -C lib