This is the code for the Kaspa embedded app.
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:
docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-fullYou can then enter this development environment by executing the following command from the directory of the application git repository:
cd app-kaspa
docker run --rm -it -v "$(realpath .):/app" ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-fullThe application's code will be available from inside the docker container, you can proceed to the following compilation steps to build your app.
make DEBUG=1 # compile optionally with PRINTF
make load # load the app on the Nano using ledgerblueHigh level documentation such as APDU, commands and transaction serialization are included in developer documentation which can be generated with doxygen
doxygen .doxygen/Doxyfilethe process outputs HTML and LaTeX documentations in doc/html and doc/latex folders.
The flow processed in GitHub Actions is the following:
- Code formatting with clang-format
- Compilation of the application for Ledger Nano S in ledger-app-builder
- Unit tests of C functions with cmocka (see unit-tests/)
- End-to-end tests with Speculos emulator (see tests/)
- Code coverage with gcov/lcov and upload to codecov.io
- Documentation generation with doxygen
It outputs 3 artifacts:
speculos-logwithin APDU command/response when executing end-to-end testscode-coveragewithin HTML details of code coveragedocumentationwithin HTML auto-generated documentation