Giter Site home page Giter Site logo

ledger-app-hive's Introduction

Build License

Hive Application for the Ledger Nano S/X Hardware Wallet

hive+ledger image credit (@thepeakstudio)


Hive wallet application framework for Ledger Nano S/X

When installed on a Ledger Nano S/X device, this application will deserialize transactions and display them on the hardware wallet for secure validation by the user. If the user accepts the transaction, this application will then sign the transaction with the key specified by the user.

There is a pre-compiled binary available in the bin/ folder and attached to each public Github release. However, you may optionally choose to compile the Hive Ledger Nano S/X application manually with help of the provided run script. Usage instructions and examples are contained within this README as well as in the test/ folder.

Latest Stable Release

https://github.com/netuoso/ledger-app-hive/releases/tag/v1.0.0

Building the Development Version

  • Clone this repository
    • git clone https://github.com/netuoso/ledger-app-hive
  • Install Docker if not already installed
    • ./run.sh install_docker
  • Pull the latest ledger-app-hive docker image
    • ./run.sh update
  • Start the Docker container
    • ./run.sh start
  • Build the ledger-app-hive application
    • ./run.sh build VERSION # replace VERSION with 1.4,1.5,1.6 based on your Ledger Nano S firmware

Loading the Compiled Development App on a Ledger Nano S

  • Connect the Ledger Nano S to your computer
  • Install the Ledger python3 module
    • pip install ledgerblue
  • Load the application onto the Ledger Nano S
    • ./run.sh load VERSION # replace VERSION with 1.4,1.5,1.6 based on your Ledger Nano S firmware

Building and loading the App with Ledger-Vagrant

This works only for Ledger Nano S with 1.6.x Firmware installed. To use it, you will need Vagrant and VirtualBox. For USB passthrough, VirtualBox Extension Pack should also be installed.

git clone https://github.com/christophersanborn/ledger-vagrant
cd ledger-vagrant
vagrant up

You can now connect with

vagrant ssh

You need the following packages

sudo apt-get install libsecp256k1-dev  libffi-dev automake libgmp-dev  build-essential libtool python3-pkgconfig
SECP_BUNDLED_EXPERIMENTAL=1 python3 -m pip --no-cache-dir install --no-binary secp256k1 secp256k1
pip3 install ledgerblue

Clone the source code with:

cd apps/
git clone https://github.com/netuoso/ledger-app-hive

and compile it with:

cd apps/ledger-app-hive
make clean
make

Connect your Nano S and enter your pin. Now you can upload the app with:

make load

A make delete removes it again. The following shuts down the machine (from the host)

vagrant halt

Testing the Application

  • Navigate to the test directory
    • cd test
  • Run the getPublicKey.py script python3 required
    • python getPublicKey.py
  • Run the signTransaction.py script python2 required
    • python signTransaction.py

Example Testing Output

  • getPublicKey:
Public key compressed 03d3ead6a886a5896dd05f546704761228c14d6b8d306fa7b0945f75df678b6193
Calculated from public key: Address STM8SZg3gBcuAEkz9xGKVMnwJHWESHcXFYWDbRcSBCz322dH6jPwy
Received from ledger: Address STM8SZg3gBcuAEkz9xGKVMnwJHWESHcXFYWDbRcSBCz322dH6jPwy
  • signTransaction:
HID => d40400007205800000308000000d8000000080000000800000000420000000000000000000000000000000000000000000000000000000000000000004021b88040485342c6304048164b85e040101042302086e65747479626f74076e6574756f736f010000000000000003535445454d000000040100
HID <= 1f636611993e469a3ad201fbe40df36e8c2be55378a3ca338654f3844d80ce2d6d32a27448c4e5d5e63707f1b9164b42e8cf29f052ae72bd12609182c9d8c88c389000
1f636611993e469a3ad201fbe40df36e8c2be55378a3ca338654f3844d80ce2d6d32a27448c4e5d5e63707f1b9164b42e8cf29f052ae72bd12609182c9d8c88c38

Technical Application Spec

Contributing

If you are interested in contributing the to ledger-app-hive repository, you will need a Github account. Ensure that you have compiled the application, have it installed on your Ledger Nano S/X, and/or throughly read this README and visited the relevant links before filing an issue.

Bug Reports

If you encounter an issue while using the ledger-app-hive application on a Ledger Nano S/X Device, visit the issues pages and leave a detailed issue with all necessary information to assist with debugging.


image credit (@doze)

ledger-app-hive's People

Contributors

holgern avatar netuoso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ledger-app-hive's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.