@ledgerhq/devices
Advanced tools
Comparing version 5.13.1 to 5.15.0
{ | ||
"name": "@ledgerhq/devices", | ||
"version": "5.13.1", | ||
"version": "5.15.0", | ||
"description": "Ledger devices", | ||
@@ -23,7 +23,7 @@ "keywords": [ | ||
"devDependencies": { | ||
"flow-bin": "^0.123.0" | ||
"flow-bin": "^0.124.0" | ||
}, | ||
"dependencies": { | ||
"@ledgerhq/errors": "^5.13.1", | ||
"@ledgerhq/logs": "^5.13.1", | ||
"@ledgerhq/errors": "^5.15.0", | ||
"@ledgerhq/logs": "^5.15.0", | ||
"rxjs": "^6.5.5" | ||
@@ -38,3 +38,3 @@ }, | ||
}, | ||
"gitHead": "7d2f04f2f3ffc3eb8e8399c8d970569e4fa38326" | ||
"gitHead": "819ae5151465d5980c75ff6a356afe1ff6731e11" | ||
} |
@@ -13,3 +13,3 @@ // @flow | ||
): Observable<Buffer> => | ||
Observable.create(o => { | ||
Observable.create((o) => { | ||
let notifiedIndex = 0; | ||
@@ -24,3 +24,3 @@ let notifiedDataLength = 0; | ||
}, | ||
error: e => { | ||
error: (e) => { | ||
log("ble-error", "in receiveAPDU " + String(e)); | ||
@@ -30,3 +30,3 @@ o.error(e); | ||
}, | ||
next: value => { | ||
next: (value) => { | ||
const tag = value.readUInt8(0); | ||
@@ -79,3 +79,3 @@ const index = value.readUInt16BE(1); | ||
} | ||
} | ||
}, | ||
}); | ||
@@ -82,0 +82,0 @@ |
@@ -10,3 +10,3 @@ // @flow | ||
buffer: Buffer, | ||
sizeForIndex: number => number | ||
sizeForIndex: (number) => number | ||
): Array<Buffer> { | ||
@@ -25,7 +25,7 @@ const chunks = []; | ||
export const sendAPDU = ( | ||
write: Buffer => Promise<void>, | ||
write: (Buffer) => Promise<void>, | ||
apdu: Buffer, | ||
mtuSize: number | ||
): Observable<void> => { | ||
const chunks = chunkBuffer(apdu, i => mtuSize - (i === 0 ? 5 : 3)).map( | ||
const chunks = chunkBuffer(apdu, (i) => mtuSize - (i === 0 ? 5 : 3)).map( | ||
(buffer, i) => { | ||
@@ -42,3 +42,3 @@ const head = Buffer.alloc(i === 0 ? 5 : 3); | ||
return Observable.create(o => { | ||
return Observable.create((o) => { | ||
let terminated = false; | ||
@@ -58,3 +58,3 @@ | ||
}, | ||
e => { | ||
(e) => { | ||
terminated = true; | ||
@@ -61,0 +61,0 @@ log("ble-error", "sendAPDU failure " + String(e)); |
@@ -8,3 +8,3 @@ // @flow | ||
dataLength: number, | ||
sequence: number | ||
sequence: number, | ||
}; | ||
@@ -23,3 +23,3 @@ | ||
dataLength: 0, | ||
sequence: 0 | ||
sequence: 0, | ||
}; | ||
@@ -38,3 +38,3 @@ | ||
data, // fill data with padding | ||
Buffer.alloc(nbBlocks * blockSize - data.length + 1).fill(0) | ||
Buffer.alloc(nbBlocks * blockSize - data.length + 1).fill(0), | ||
]); | ||
@@ -80,3 +80,3 @@ | ||
dataLength, | ||
sequence | ||
sequence, | ||
}; | ||
@@ -89,3 +89,3 @@ }, | ||
} | ||
} | ||
}, | ||
}; | ||
@@ -92,0 +92,0 @@ }; |
@@ -33,3 +33,3 @@ // @flow | ||
memorySize: 480 * 1024, | ||
blockSize: 4 * 1024 | ||
blockSize: 4 * 1024, | ||
}, | ||
@@ -43,3 +43,3 @@ nanoS: { | ||
memorySize: 320 * 1024, | ||
blockSize: 4 * 1024 | ||
blockSize: 4 * 1024, | ||
}, | ||
@@ -59,3 +59,3 @@ nanoX: { | ||
notifyUuid: "d973f2e1-b19e-11e2-9e96-0800200c9a66", | ||
writeUuid: "d973f2e2-b19e-11e2-9e96-0800200c9a66" | ||
writeUuid: "d973f2e2-b19e-11e2-9e96-0800200c9a66", | ||
}, | ||
@@ -65,6 +65,6 @@ { | ||
notifyUuid: "13d63400-2c97-0004-0001-4c6564676572", | ||
writeUuid: "13d63400-2c97-0004-0002-4c6564676572" | ||
} | ||
] | ||
} | ||
writeUuid: "13d63400-2c97-0004-0002-4c6564676572", | ||
}, | ||
], | ||
}, | ||
}; | ||
@@ -75,3 +75,3 @@ | ||
"Nano S": "nanoS", | ||
"Nano X": "nanoX" | ||
"Nano X": "nanoX", | ||
}; | ||
@@ -100,7 +100,7 @@ | ||
export const identifyUSBProductId = (usbProductId: number): ?DeviceModel => { | ||
const legacy = devicesList.find(d => d.legacyUsbProductId === usbProductId); | ||
const legacy = devicesList.find((d) => d.legacyUsbProductId === usbProductId); | ||
if (legacy) return legacy; | ||
const mm = usbProductId >> 8; | ||
const deviceModel = devicesList.find(d => d.productIdMM === mm); | ||
const deviceModel = devicesList.find((d) => d.productIdMM === mm); | ||
return deviceModel; | ||
@@ -111,3 +111,3 @@ }; | ||
const productId = productMap[productName]; | ||
const deviceModel = devicesList.find(d => d.id === productId); | ||
const deviceModel = devicesList.find((d) => d.id === productId); | ||
@@ -119,3 +119,3 @@ return deviceModel; | ||
const serviceUuidToInfos: { | ||
[_: string]: BluetoothInfos | ||
[_: string]: BluetoothInfos, | ||
} = {}; | ||
@@ -167,4 +167,4 @@ | ||
writeUuid: string, | ||
notifyUuid: string | ||
}> | ||
notifyUuid: string, | ||
}>, | ||
}; | ||
@@ -179,3 +179,3 @@ | ||
writeUuid: string, | ||
notifyUuid: string | ||
notifyUuid: string, | ||
}; |
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
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
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
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
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
114529
Updated@ledgerhq/errors@^5.15.0
Updated@ledgerhq/logs@^5.15.0