Package Exports
- @ledgerhq/devices
- @ledgerhq/devices/lib/ble/receiveAPDU
- @ledgerhq/devices/lib/ble/sendAPDU
- @ledgerhq/devices/lib/hid-framing
- @ledgerhq/devices/lib/scrambling
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/devices) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme

@ledgerhq/devices
Logic for all Ledger devices.
API
Table of Contents
- createHIDframing
- IIGenericHID
- ledgerUSBVendorId
- getDeviceModel
- identifyTargetId
- identifyUSBProductId
- getBluetoothServiceUuids
- getInfosForServiceUuid
- DeviceModel
- BluetoothInfos
createHIDframing
Parameters
IIGenericHID
The USB product IDs will be defined as MMII, encoding a model (MM) and an interface bitfield (II)
Model Ledger Nano S : 0x10 Ledger Blue : 0x00 Ledger Nano X : 0x40
Interface support bitfield Generic HID : 0x01 Keyboard HID : 0x02 U2F : 0x04 CCID : 0x08 WebUSB : 0x10
Type: number
ledgerUSBVendorId
Type: number
getDeviceModel
Parameters
id
DeviceModelId
Returns DeviceModel
identifyTargetId
Given a targetId
, return the deviceModel associated to it,
based on the first two bytes.
Parameters
targetId
number
Returns (DeviceModel | null | undefined)
identifyUSBProductId
Parameters
usbProductId
number
Returns (DeviceModel | null | undefined)
getBluetoothServiceUuids
getInfosForServiceUuid
Parameters
uuid
string
Returns (BluetoothInfos | undefined)
DeviceModel
BluetoothInfos
<<<<<<< HEAD
Properties
id
DeviceModelIdproductName
stringproductIdMM
numberlegacyUsbProductId
numberusbOnly
booleanmemorySize
numbermasks
Array<number>getBlockSize
function (firmwareVersion: string): numberbluetoothSpec
Array<{serviceUuid: string, writeUuid: string, notifyUuid: string}>?
7184a62c3469949743efa3c4fc2b93293add5e04
BluetoothInfos
Type: {id: DeviceModelId, productName: string, usbProductId: number, bluetoothSpec: Array<{serviceUuid: string, writeUuid: string, notifyUuid: string}>?}
Type: {id: string, productName: string, usbProductId: number, usbOnly: boolean, bluetoothSpec: Array<{serviceUuid: string, writeUuid: string, notifyUuid: string}>?}
master
Properties
id
DeviceModelIdproductName
stringusbProductId
numberusbOnly
booleanbluetoothSpec
Array<{serviceUuid: string, writeUuid: string, notifyUuid: string}>?
BluetoothInfos
Type: {deviceModel: DeviceModel, serviceUuid: string, writeUuid: string, notifyUuid: string}
Properties
deviceModel
DeviceModelserviceUuid
stringwriteUuid
stringnotifyUuid
string