Socket
Socket
Sign inDemoInstall

@ledgerhq/hw-transport-node-hid

Package Overview
Dependencies
Maintainers
7
Versions
399
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/hw-transport-node-hid - npm Package Compare versions

Comparing version 4.22.0-beta.ae6f5c51 to 4.22.0

9

lib/getDevices.js

@@ -12,11 +12,10 @@ "use strict";

var _isLedgerDevice = require("./isLedgerDevice");
var _isLedgerDevice2 = _interopRequireDefault(_isLedgerDevice);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var filterInterface = function filterInterface(device) {
return ["win32", "darwin"].includes(process.platform) ? device.usagePage === 0xffa0 : device.interface === 0;
};
function getDevices() {
return _nodeHid2.default.devices().filter(_isLedgerDevice2.default);
return _nodeHid2.default.devices(0x2c97, 0x0).filter(filterInterface);
}
//# sourceMappingURL=getDevices.js.map

@@ -73,3 +73,3 @@ "use strict";

var listenDevicesPollingInterval = 500;
var listenDevicesDebounce = 500;
var listenDevicesPollingSkip = function listenDevicesPollingSkip() {

@@ -416,4 +416,4 @@ return false;

TransportNodeHid.setListenDevicesPollingInterval = function (delay) {
listenDevicesPollingInterval = delay;
TransportNodeHid.setListenDevicesDebounce = function (delay) {
listenDevicesDebounce = delay;
};

@@ -470,3 +470,3 @@

var _listenDevices = (0, _listenDevices3.default)(listenDevicesPollingInterval, listenDevicesPollingSkip, listenDevicesDebug),
var _listenDevices = (0, _listenDevices3.default)(listenDevicesDebounce, listenDevicesPollingSkip, listenDevicesDebug),
events = _listenDevices.events,

@@ -473,0 +473,0 @@ stop = _listenDevices.stop;

{
"name": "@ledgerhq/hw-transport-node-hid",
"version": "4.22.0-beta.ae6f5c51",
"version": "4.22.0",
"description": "Ledger Hardware Wallet Node implementation of the communication layer, using node-hid",

@@ -28,3 +28,3 @@ "keywords": [

"dependencies": {
"@ledgerhq/hw-transport": "^4.22.0-beta.ae6f5c51",
"@ledgerhq/hw-transport": "^4.21.0",
"lodash": "^4.17.10",

@@ -31,0 +31,0 @@ "node-hid": "^0.7.2",

// @flow
import HID from "node-hid";
import isLedgerDevice from "./isLedgerDevice";
const filterInterface = device =>
["win32", "darwin"].includes(process.platform)
? device.usagePage === 0xffa0
: device.interface === 0;
export default function getDevices(): Array<*> {
return HID.devices().filter(isLedgerDevice);
return HID.devices(0x2c97, 0x0).filter(filterInterface);
}

@@ -29,3 +29,3 @@ //@flow

let listenDevicesPollingInterval = 500;
let listenDevicesDebounce = 500;
let listenDevicesPollingSkip = () => false;

@@ -65,4 +65,4 @@ let listenDevicesDebug = () => {};

static setListenDevicesPollingInterval = (delay: number) => {
listenDevicesPollingInterval = delay;
static setListenDevicesDebounce = (delay: number) => {
listenDevicesDebounce = delay;
};

@@ -99,3 +99,3 @@

const { events, stop } = listenDevices(
listenDevicesPollingInterval,
listenDevicesDebounce,
listenDevicesPollingSkip,

@@ -102,0 +102,0 @@ listenDevicesDebug

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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