Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trezor-link

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trezor-link

Trezor Link

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
92
increased by8.24%
Maintainers
1
Weekly downloads
 
Created
Source

A library for communication with TREZOR via various means.

Trezor-link only works on a "low level"; it only sends messages to TREZOR and receives messages back, and parses them from and to JSON.

For more "high-level" access, you should use trezor.js.

The long-term plan is to merge trezor.js and trezor-link, so that we don't have two distinct libraries. But so far, we have trezor-link for "low-level" access and trezor.js for "high level" access.

trezor-link uses plugins for various transports. So far, we have two transports - one for communicating via Chrome HID API in extensions, and one for communicating via node-hid in Node.js environment (for use in Electron apps, or regular node apps).

How to use

Use like this (in node):

var Link = require('trezor-link');
var nodeTransport = require('trezor-link-node-hid'); // in npm

var link = new Link(hidTransport);
link.enumerate().then(function (devices) {
  return link.acquire(devices[0].path);
}).then(function (session) {
  return link.call(session, 'GetFeatures', {}).then(function (features) {
    console.log(features);
    return link.release(session);
  });
}).catch(function (error) {
  console.error(error);
});

Similarly with chrome and its module.

Flow

If you want to use flow for typechecking, just include the file as normally, it will automatically use the included flow file. However, you need to add flowtype/bitcoinjs-libs.js to your [libs] (or copy it yourself from flow-typed repository), and probably other libs from

I myself recommend 100% using Flow, but it can be a pain to set up, so it's on you.

License

LGPLv3

  • (C) 2015 Karel Bilek (SatoshiLabs) kb@karelbilek.com
  • (C) 2014 Mike Tsao mike@sowbug.com
  • (C) 2014 Liz Fong-Jones lizf@google.com
  • (C) 2015 William Wolf throughnothing@gmail.com

FAQs

Package last updated on 23 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc