Skip to content

ibithub/app-boilerplate

 
 

Repository files navigation

Ledger Boilerplate Application

This is a boilerplate application which can be forked to start a new project for the Ledger Nano S/X.

Prerequisite

With the docker image builder

The app-builder docker image from this repository contains all needed tools and library to build and load an application. You can download it from the ghcr.io docker repository:

sudo docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-full

You can then enter this development environment by executing the following command from the directory of the application git repository:

sudo docker run --rm -ti --user "$(id -u)":"$(id -g)" -v "$(realpath .):/app" ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-full

The application's code will be available from inside the docker container, you can proceed to the following compilation steps to build your app.

Without the docker image builder

Be sure to have your environment correctly set up (see Getting Started) and ledgerblue and installed.

If you want to benefit from vscode integration, it's recommended to move the toolchain in /opt and set BOLOS_ENV environment variable as follows

BOLOS_ENV=/opt/bolos-devenv

and do the same with BOLOS_SDK environment variable

BOLOS_SDK=/opt/nanos-secure-sdk

Compilation and load

make DEBUG=1  # compile optionally with PRINTF
make load     # load the app on the Nano using ledgerblue

Documentation

High level documentation such as APDU, commands and transaction serialization are included in developer documentation which can be generated with doxygen

doxygen .doxygen/Doxyfile

the process outputs HTML and LaTeX documentations in doc/html and doc/latex folders.

Tests & Continuous Integration

The flow processed in GitHub Actions is the following:

It outputs 4 artifacts:

  • boilerplate-app-debug within output files of the compilation process in debug mode
  • speculos-log within APDU command/response when executing end-to-end tests
  • code-coverage within HTML details of code coverage
  • documentation within HTML auto-generated documentation

Are you developing a Nano S, S Plus, X application?

If so, This boilerplate will help you get started.

For a smooth and quick integration:

About

Boilerplate application for Ledger Nano S/X

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 68.8%
  • Python 15.2%
  • Shell 10.2%
  • CMake 2.8%
  • Makefile 2.4%
  • C++ 0.6%