Skip to content

gonner22/app-bitcoin-clone-boilerplate

 
 

Repository files navigation

Ledger AI Power Grid Application

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.

Quick access links:

Linux Installation Instructions

Pre-requisites

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:
  1. Clone the repository app-bitcoin-clone-boilerplate.
git clone https://github.com/gonner22/app-bitcoin-clone-boilerplate --recurse-submodules
  1. Navigate into the cloned directory.
cd app-bitcoin-clone-boilerplate
  1. 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
  1. 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
  1. To compile and load the app, run the following command within the container:
make load
  1. 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.

Windows Installation Instructions

(with PowerShell)

Pre-requisites

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:
  1. Clone the repository app-bitcoin-clone-boilerplate.
git clone https://github.com/gonner22/app-bitcoin-clone-boilerplate --recurse-submodules
  1. Navigate into the cloned directory.
cd app-bitcoin-clone-boilerplate
  1. 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
  1. 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
  1. To compile the app, run the following command within the container:
make

If everything was successful and no errors appeared on your computer screen.

  1. 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
  1. 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.

macOS Installation Instructions

Pre-requisites

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:
  1. Clone the repository app-bitcoin-clone-boilerplate.
git clone https://github.com/gonner22/app-bitcoin-clone-boilerplate --recurse-submodules
  1. Navigate into the cloned directory.
cd app-bitcoin-clone-boilerplate
  1. 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
  1. 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
  1. To compile the app, run the following command within the container:
make

If everything was successful and no errors appeared on your computer screen.

  1. 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
  1. 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.

This application adheres with Ledger latest application guidelines

Are you testing a Ledger device application?

  • Go on Discord to chat with developer support and the developer community.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 84.7%
  • Makefile 8.3%
  • Shell 7.0%