@ledgerhq/devices
Advanced tools
Comparing version 4.46.0 to 4.47.0
@@ -104,2 +104,7 @@ "use strict"; | ||
*/ | ||
/** | ||
* | ||
*/ | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ledgerhq/devices", | ||
"version": "4.46.0", | ||
"version": "4.47.0", | ||
"description": "Ledger devices", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "c2e02f504eebb93e4a4a4fd9ff318fab7f531480" | ||
"gitHead": "0ca948f6288cb55b676dc1070eb9e1eef342cfc8" | ||
} |
@@ -23,2 +23,3 @@ <img src="https://user-images.githubusercontent.com/211411/34776833-6f1ef4da-f618-11e7-8b13-f0697901d6a8.png" height="100" /> | ||
- [Parameters](#parameters-3) | ||
- [DeviceModelId](#devicemodelid) | ||
- [DeviceModel](#devicemodel) | ||
@@ -44,3 +45,3 @@ - [Properties](#properties) | ||
- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `id` **[DeviceModelId](#devicemodelid)** | ||
@@ -67,9 +68,38 @@ Returns **[DeviceModel](#devicemodel)** | ||
### DeviceModelId | ||
Type: $Keys<any> | ||
### DeviceModel | ||
Type: {id: [DeviceModelId](#devicemodelid), productName: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), usbProductId: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), usbOnly: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean), bluetoothSpec: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{serviceUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), writeUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), notifyUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>?} | ||
#### Properties | ||
- `id` **[DeviceModelId](#devicemodelid)** | ||
- `productName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `usbProductId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | ||
- `usbOnly` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | ||
- `bluetoothSpec` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{serviceUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), writeUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), notifyUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>?** | ||
### BluetoothInfos | ||
Type: {deviceModel: [DeviceModel](#devicemodel), serviceUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), writeUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), notifyUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)} | ||
#### Properties | ||
- `deviceModel` **[DeviceModel](#devicemodel)** | ||
- `serviceUuid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `writeUuid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `notifyUuid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
# Type: {id: [DeviceModelId](#devicemodelid), productName: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), usbProductId: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), bluetoothSpec: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{serviceUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), writeUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), notifyUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>?} | ||
Type: {id: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), productName: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), usbProductId: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), usbOnly: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean), bluetoothSpec: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{serviceUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), writeUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), notifyUuid: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>?} | ||
> > > > > > > master | ||
#### Properties | ||
- `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `id` **[DeviceModelId](#devicemodelid)** | ||
- `productName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
@@ -76,0 +106,0 @@ - `usbProductId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** |
// @flow | ||
const devices: { [id: string]: DeviceModel } = { | ||
const devices = { | ||
blue: { | ||
@@ -48,3 +48,3 @@ id: "blue", | ||
*/ | ||
export const getDeviceModel = (id: string): DeviceModel => { | ||
export const getDeviceModel = (id: DeviceModelId): DeviceModel => { | ||
const info = devices[id]; | ||
@@ -92,4 +92,9 @@ if (!info) throw new Error("device '" + id + "' does not exist"); | ||
*/ | ||
export type DeviceModelId = $Keys<typeof devices>; | ||
/** | ||
* | ||
*/ | ||
export type DeviceModel = { | ||
id: string, | ||
id: DeviceModelId, | ||
productName: string, | ||
@@ -96,0 +101,0 @@ usbProductId: number, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
483167
368
117