Coder Social home page Coder Social logo

btchip-js-api's Introduction

btchip-js-api

BTChip JavaScript APIs

Only available for Chrome / Chromium browsers with the following extensions installed :

Using :

btchip-js-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btchip-js-api's Issues

Serialization of variable length datastructure

I'm not sure to post this issue here or on https://github.com/LedgerHQ/btchip-doc, but you don't document how you are encoding "variable length" structures.

I see from the code, that you seems to prepend the length of the data, which make sense, but have the disadvantage to crash if such data is more than 255 bytes long...

return this.card.sendApdu_async(0xe0, 0x46, outputType, p2, data, [0x9000]).then(function (outData) {
489 var result = {};
490 var scriptDataLength = outData.byteAt(0);
491 result['scriptData'] = outData.bytes(1, scriptDataLength);
492 result['authorizationRequired'] = (outData.byteAt(1 + scriptDataLength) == 0x01);
493 return result;
494 });

I'm not sure yes if that is a problem, but should I consider that every "var" data structure in https://ledgerhq.github.io/btchip-doc/bitcoin-technical.html
should be formatted as such, unless specified otherwise ? (data prepent by 1 byte length ?)

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.