Skip to content

stakefish/ledger-plugin

 
 

Repository files navigation

Ensure compliance with Ledger guidelines Compilation & tests

stakefish plugin

This repo is a fork from Ledger's app-plugin-boilerplate.

It was created following the plugin guide.

To build and test the plugin, use the Ledger's VSCode developer tools extension. You need to first copy the Ethereum plugin builds inside the tests/ethereum_build as mentioned in the README file inside the tests folder. After that just run the command 'Build' in the Ledger extension and then 'Run tests'.

Loading on a physical device

This step will vary slightly depending on your platform.

ℹ️ Your physical device must be connected, unlocked and the screen showing the dashboard (not inside an application).

Linux (Ubuntu)

First make sure you have the proper udev rules added on your host :

# Run these commands on your host, from the app's source folder.
sudo cp .vscode/20-ledger.ledgerblue.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger

Then once you have opened a terminal in the app-builder image and built the app for the device you want, run the following command :

# Run this command from the app-builder container terminal.
make load    # load the app on a Nano S by default

Setting the BOLOS_SDK environment variable will allow you to load on whichever supported device you want.

macOS / Windows (with PowerShell)

ℹ️ It is assumed you have Python installed on your computer.

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

  • macOS : source ledger/bin/activate
  • Windows : .\ledger\Scripts\Activate.ps1
# 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 52.1%
  • Python 37.7%
  • CMake 6.8%
  • Makefile 2.1%
  • Other 1.3%