This application automates the process of creating a Ledger device app for our AI Power Grid cryptocurrency. It utilizes a Docker container to simplify this process, allowing users to:
- Easily compile their app for the desired Ledger device.
- Install the AI Power Grid app directly onto their chosen device.
Ledger devices such as Nano S, NanoS+, Ledger Stax or Ledger Flex are supported.
Please note that the Ledger Nano X does not currently support sideloading, so it is not compatible with this application.
- Install and configure
- ℹ️ Docker: https://docs.docker.com/engine/install. Note: user must be able to run Docker without
sudo
(https://docs.docker.com/engine/install/linux-postinstall/) - ℹ️ It is assumed you have Python installed on your computer.
- ℹ️ Having trouble connecting your USB device? Check out this link for help: https://support.ledger.com/article/115005165269-zd?redirect=false
- ℹ️ Docker: https://docs.docker.com/engine/install. Note: user must be able to run Docker without
Warning
- To ensure data protection, users must back up their Ledger device recovery seeds before using this application. AIPG is not responsible for any failures or issues that may arise. While the app has been tested on some devices, we rely on community feedback to validate its functionality on others, including the Ledger Flex and Stax.
- This repository contains a submodule, and should therefore be cloned with the appropriate command:
- Clone the repository app-bitcoin-clone-boilerplate.
git clone https://github.com/gonner22/app-bitcoin-clone-boilerplate --recurse-submodules
- Navigate into the cloned directory.
cd app-bitcoin-clone-boilerplate
-
To begin developing, first connect your Ledger device to your PC and unlock it. Ensure it's displayed on the dashboard (not within another app). Then, execute the following command to download the necessary image and enter the container. The container will be located at the "/app" path.
Please note that all Ledger devices are compatible except for the Nano X, which is not currently supported due to technical limitations of Ledger.
docker run --rm -ti -v "$(realpath .):/app" --privileged -v "/dev/bus/usb:/dev/bus/usb" --user root ghcr.io/gonner22/ledger-app-builder-legacy:latest
- You can choose which device to compile for by setting the BOLOS_SDK environment variable to the following values:
- Nano S
BOLOS_SDK=$NANOS_SDK
- NANO S+
BOLOS_SDK=$NANOSP_SDK
- NANO Flax
BOLOS_SDK=$FLAX_SDK
- NANO Stax
BOLOS_SDK=$STAX_SDK
- To compile and load the app, run the following command within the container:
make load
-
The user should review their device screen and confirm when prompted.
If everything was successful and no errors appeared on your computer screen, a new app called "AI Power Grid" will appear in the main menu of your device.
(with PowerShell)
- Install and configure
- ℹ️ Docker: https://docs.docker.com/engine/install.
- ℹ️ It is assumed you have Python installed on your computer.
- ℹ️ Go to the official Git download page: https://git-scm.com/downloads
- ℹ️ Ensure your PowerShell execution policy permits script execution: https://go.microsoft.com/fwlink/?LinkID=135170
- ℹ️ Having trouble connecting your USB device? Check out this link for help: https://support.ledger.com/article/115005165269-zd?redirect=false
Warning
- To ensure data protection, users must back up their Ledger device recovery seeds before using this application. AIPG is not responsible for any failures or issues that may arise. While the app has been tested on some devices, we rely on community feedback to validate its functionality on others, including the Ledger Flex and Stax.
- This repository contains a submodule, and should therefore be cloned with the appropriate command:
- Clone the repository app-bitcoin-clone-boilerplate.
git clone https://github.com/gonner22/app-bitcoin-clone-boilerplate --recurse-submodules
- Navigate into the cloned directory.
cd app-bitcoin-clone-boilerplate
-
To begin developing, first connect your Ledger device to your PC and unlock it. Ensure it's displayed on the dashboard (not within another app). Then, execute the following command to download the necessary image and enter the container. The container will be located at the "/app" path.
Please note that all Ledger devices are compatible except for the Nano X, which is not currently supported due to technical limitations of Ledger.
docker run --rm -ti --privileged -v "$(Get-Location):/app" ghcr.io/gonner22/ledger-app-builder-legacy:latest
- You can choose which device to compile for by setting the BOLOS_SDK environment variable to the following values:
- Nano S
BOLOS_SDK=$NANOS_SDK
- NANO S+
BOLOS_SDK=$NANOSP_SDK
- NANO Flax
BOLOS_SDK=$FLAX_SDK
- NANO Stax
BOLOS_SDK=$STAX_SDK
- To compile the app, run the following command within the container:
make
If everything was successful and no errors appeared on your computer screen.
- Run these commands on your host from the app's source folder once you have built the app for the device you want:
# Install Python virtualenv
python -m pip install virtualenv
# Create the 'ledger' virtualenv
python -m virtualenv ledger
Enter the Python virtual environment
.\ledger\Scripts\activate.ps1
# Install Ledgerblue (tool to load the app)
python -m pip install ledgerblue
# Load the app.
python -m ledgerblue.runScript --scp --fileName bin/app.apdu --elfFile bin/app.elf
-
The user should review their device screen and confirm when prompted.
A new app called "AI Power Grid" will appear in the main menu of your device.
- Install and configure
- ℹ️ Docker: https://docs.docker.com/engine/install.
- ℹ️ It is assumed you have Python installed on your computer.
- ℹ️ Go to the official Git download page: https://git-scm.com/downloads.
- ℹ️ Having trouble connecting your USB device? Check out this link for help: https://support.ledger.com/article/115005165269-zd?redirect=false
Warning
- To ensure data protection, users must back up their Ledger device recovery seeds before using this application. AIPG is not responsible for any failures or issues that may arise. While the app has been tested on some devices, we rely on community feedback to validate its functionality on others, including the Ledger Flex and Stax.
- This repository contains a submodule, and should therefore be cloned with the appropriate command:
- Clone the repository app-bitcoin-clone-boilerplate.
git clone https://github.com/gonner22/app-bitcoin-clone-boilerplate --recurse-submodules
- Navigate into the cloned directory.
cd app-bitcoin-clone-boilerplate
-
To begin developing, first connect your Ledger device to your PC and unlock it. Ensure it's displayed on the dashboard (not within another app). Then, execute the following command to download the necessary image and enter the container. The container will be located at the "/app" path.
Please note that all Ledger devices are compatible except for the Nano X, which is not currently supported due to technical limitations of Ledger.
sudo docker run --rm -ti --user root --privileged -v "$(pwd -P):/app" ghcr.io/gonner22/ledger-app-builder-legacy:latest
- You can choose which device to compile for by setting the BOLOS_SDK environment variable to the following values:
- Nano S
BOLOS_SDK=$NANOS_SDK
- NANO S+
BOLOS_SDK=$NANOSP_SDK
- NANO Flax
BOLOS_SDK=$FLAX_SDK
- NANO Stax
BOLOS_SDK=$STAX_SDK
- To compile the app, run the following command within the container:
make
If everything was successful and no errors appeared on your computer screen.
- Run these commands on your host from the app's source folder once you have built the app for the device you want:
# Install Python virtualenv
python3 -m pip install virtualenv
# Create the 'ledger' virtualenv
python3 -m virtualenv ledger
Enter the Python virtual environment
source ledger/bin/activate
# Install Ledgerblue (tool to load the app)
python3 -m pip install ledgerblue
# Load the app.
python3 -m ledgerblue.runScript --scp --fileName bin/app.apdu --elfFile bin/app.elf
-
The user should review their device screen and confirm when prompted.
A new app called "AI Power Grid" will appear in the main menu of your device.
- Go on Discord to chat with developer support and the developer community.