Git Product home page Git Product logo

ledger-js's Introduction

ledger-js

License CI test status

This package provides a basic client library to communicate with the Oasis apps running on a Ledger Nano S/X.

We recommend using the npmjs package in order to receive updates/fixes.

Example

ledger-js's People

Contributors

chcmedeiros avatar codefactor-io[bot] avatar dependabot[bot] avatar jleni avatar kostko avatar lukaw3d avatar matevz avatar peterjgilbert avatar pro-wh avatar rllola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ledger-js's Issues

Setup release process

We should set up a release process, similar to the oasis-core and oasis-core-ledger repositories.

getVersion gives misleading return code when app is not open

oh ok the error handling code (error-disregarding, I should say) in serializePath (in ledger-js lib) is wildly twisting the facts

that code reads as follows:

  async serializePath(path) {
    this.versionResponse = await getVersion(this.transport);
    switch (this.versionResponse.major) {
      case 0:
      case 1:
      case 2:
        return serializePathv1(path);
      default:
        return {
          return_code: 0x6400,
          error_message: "App Version is not supported",
        };
    }
  }

and the this.versionResponse we get when the app is not open is:
image

Originally posted by @pro-wh in oasisprotocol/oasis-wallet-web#376 (comment)

Prevent use with app versions <1.8.0

We should make sure all method calls fail in case for Ledger app versions <1.8.0 as those versions have a broken address derivation implementation.

code duplication from ledger-oasis repo

Looking at source code in files in src/ in this repo and source code in files in js/src/ in Ledger Oasis app repo, there is a lot of copying/duplication.
What would be the best way to avoid that?

I didn't know about there being a copy of this module in the repo of the app itself. Is this intended? How did the two copies com to be?

I also don't know the genesis of this ๐Ÿ™‚.

Can you open an issue in this repo to track this unusual code duplication and we can tackle that separately from this PR?

Originally posted by @tjanez in #270 (comment)

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.