Coder Social home page Coder Social logo

ledgerhq / app-waves Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wavesplatform/ledger-app-waves

4.0 6.0 3.0 655 KB

Waves wallet application for Ledger Nano S

License: MIT License

Makefile 0.71% Python 7.13% C 84.78% Shell 0.11% Dockerfile 0.41% C++ 6.86%

app-waves's Introduction

ledger-app-waves πŸ”· Build Status

Introduction πŸ”

This is a Ledger devices wallet app for Waves platform.

Special thanks to Jean Passot, CΓ©dric Mesnil, and Oto from the Ledger team, Jake Bordens from the Ledger/Birst community for their support and advices. Thanks to the Waves community for trusting the tokens on this application.

For app APDU protocol and an integration manual please take a look at this.

Building πŸ‘·

Also there're ledger docker image, you can use it to build it.

Nano S

rm -rf bin/ debug/ dep/ obj/ app.hex src/glyphs.c src/glyphs.h && make BOLOS_ENV=/opt/ledger/ BOLOS_SDK=/home/nanos-secure-sdk

Nano X

rm -rf bin/ debug/ dep/ obj/ app.hex src/glyphs.c src/glyphs.h && make BOLOS_ENV=/opt/ledger/ BOLOS_SDK=/home/ledger/sdk-nanox-1.2.4-1.3

Nano S plus

rm -rf bin/ debug/ dep/ obj/ app.hex src/glyphs.c src/glyphs.h && make BOLOS_ENV=/opt/ledger/ BOLOS_SDK=/home/nanosplus-secure-sdk/

Installation πŸ“²

You can download the official version of this application, signed and verified by the Ledger team, from the official Ledger Live application.

Building and installing from the source code is usually required in order to develop or customize the application. In addition, you will receive a warning that this application was received from an unreliable source. Try to avoid this, it may be unsafe.

If you build the app not in the Docker, but in your host OS then just call make load. Note that you should have the python env with ledgerblue installed. If you can't install ledgerblue, try install the dependencies into your system. There're some more details also.

If you use Docker to build the app, then call this from app root on you host OS:

Nano S

python -m ledgerblue.loadApp --appFlags 0x240 --path "44'/5741564'" --curve secp256k1 --curve ed25519 --tlv --targetId 0x31100004 --delete --fileName bin/app.hex --appName Waves --appVersion 1.1.0 --dataSize 64 --icon 010000000000ffffffffffffff7ffe3ffc1ff80ff007e003c003c007e00ff01ff83ffc7ffeffffffff

Nano X (Only with developer firmware)

Note that at the time of publication of this manual (March 2020), the installation of your applications is possible only on special devices for developers.

python -m ledgerblue.loadApp --appFlags 0x240 --path "44'/5741564'" --curve secp256k1 --curve ed25519 --tlv --targetId 0x33000004 --delete --fileName bin/app.hex --appName "Waves" --appVersion 1.1.0 --dataSize 256 --icon 010000000000ffffff000030001ec00ff807ffe3fff97ffc0ffe013f8007c0000000

Nano S plus

python -m ledgerblue.loadApp --appFlags 0x240 --path "44'/5741564'" --curve secp256k1 --curve ed25519 --tlv --targetId 0x33100004 --targetVersion="1.0.2" --delete --fileName bin/app.hex --appName "Waves" --appVersion 1.1.4 --dataSize $((0x`cat debug/app.map |grep _envram_data | tr -s ' ' | cut -f2 -d' '|cut -f2 -d'x'` - 0x`cat debug/app.map |grep _nvram_data | tr -s ' ' | cut -f2 -d' '|cut -f2 -d'x'`))

If you want to build under nano x, you need to do it via this.

Debugging πŸ™‡

To simplify the development and debugging process, it is recommended to follow the Ledger debugging instructions and try to find a solution of your problem here. All this has been tested only with the Ledger Nano S.

  1. Install a debug firmware (according to the instructions above)
  2. Install a custom CA for PIN bypass (according to the instructions above)
  3. Build and use USBTool (according to the instructions above).

Hint: before that on Mac OS X you should install a libusb-compat package: brew install libusb-compat, then just call make clean && make from the app root

  1. Change debug flag in Makefile to DEBUG = 1
  2. Build and install the app adding the --rootPrivateKey key from the second step

Now the device should ask you only one confirmation instead of several! Take care of your buttons, fingers and time 😊

  1. Start usbtool on the PC, then your app on Ledger device, send some APDU and look at the debug output in usbtool stdout!
  2. Check the Ledger device emulator, but at the time of writing (March 2020), it does not support most system calls. For now it perhaps only suitable for debugging an app UI on Ubuntu.

Happy hacking!

app-waves's People

Contributors

fbeutin-ledger avatar jake-b avatar nazeim avatar sgliner-ledger avatar tamtamhero avatar tolsi avatar xchapron-ledger avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

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.