JSPM

@ledgerhq/hw-transport-node-hid-singleton

6.28.6-protect.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18011
  • Score
    100M100P100Q172025F
  • License Apache-2.0

Ledger Hardware Wallet Node implementation of the communication layer, using node-hid and node-usb

Package Exports

  • @ledgerhq/hw-transport-node-hid-singleton
  • @ledgerhq/hw-transport-node-hid-singleton/lib-es/TransportNodeHid.js
  • @ledgerhq/hw-transport-node-hid-singleton/lib/TransportNodeHid.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ledgerhq/hw-transport-node-hid-singleton) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GitHub, Ledger Devs Discord, Developer Portal

@ledgerhq/hw-transport-node-hid-singleton

Allows to communicate with Ledger Hardware Wallets.

[Node]/Electron (HID) – uses node-hid and node-usb. Keep transport opened and re-use it as a singleton, one device at a time on a computer but more robust implementation.


Are you adding Ledger support to your software wallet?

You may be using this package to open a USB connection between your desktop application and the device.

For a smooth and quick integration:

  • See the developers’ documentation on the Developer Portal and
  • Go on Discord to chat with developer support and the developer community.

API

Table of Contents

TransportNodeHidSingleton

Extends TransportNodeHidNoEvents

node-hid Transport implementation

Examples

import TransportNodeHid from "@ledgerhq/hw-transport-node-hid-singleton";
...
TransportNodeHid.create().then(transport => ...)

exchange

Exchange with the device using APDU protocol.

Parameters

Returns Promise<Buffer> a promise of apdu response

isSupported

list

listen

Parameters
  • observer Observer<ListenDescriptorEvent>

Returns Subscription

autoDisconnect

convenience wrapper for auto-disconnect logic

Returns Promise<void>

disconnect

globally disconnect the transport singleton

open

if path="" is not provided, the library will take the first device

Returns Promise<TransportNodeHidSingleton>