Allows to communicate with Ledger Hardware Wallets.
[Node]/Electron (HID) – uses node-hid
and usb-detection
. Keep transport opened and re-use it as a singleton, one device at a time on a computer but more robust implementation.
Extends TransportNodeHidNoEvents
node-hid Transport implementation
import TransportNodeHid from "@ledgerhq/hw-transport-node-hid-singleton";
...
TransportNodeHid.create().then(transport => ...)
Exchange with the device using APDU protocol.
apdu
Buffer
Returns Promise<Buffer> a promise of apdu response
observer
Observer<DescriptorEvent<any>>
Returns Subscription
convenience wrapper for auto-disconnect logic
Returns void
globally disconnect the transport singleton
if path="" is not provided, the library will take the first device
Returns Promise<TransportNodeHidSingleton>