@ledgerhq/react-native-hid 6.24.2-monorepo.0 → 6.24.2-monorepo.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ @ledgerhq/react-native-hid:build: cache hit, replaying output e1b7118bbb892416
2
+ @ledgerhq/react-native-hid:build:
3
+ @ledgerhq/react-native-hid:build: > @ledgerhq/react-native-hid@6.24.2-monorepo.4 build /home/runner/work/ledger-live/ledger-live/libs/ledgerjs/packages/react-native-hid
4
+ @ledgerhq/react-native-hid:build: > bash ../../script/build.sh
5
+ @ledgerhq/react-native-hid:build:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @ledgerhq/react-native-hid
2
2
 
3
+ ## 6.24.2-monorepo.4
4
+
5
+ ### Patch Changes
6
+
7
+ - f6cb87454: test prerelease
8
+ - Updated dependencies [f6cb87454]
9
+ - @ledgerhq/devices@6.24.2-monorepo.4
10
+ - @ledgerhq/errors@6.10.1-monorepo.4
11
+ - @ledgerhq/hw-transport@6.24.2-monorepo.4
12
+ - @ledgerhq/logs@6.10.1-monorepo.4
13
+
14
+ ## 6.24.2-monorepo.3
15
+
16
+ ### Patch Changes
17
+
18
+ - 7f4a91716: clean pnpm-lock file
19
+ - Updated dependencies [7f4a91716]
20
+ - @ledgerhq/devices@6.24.2-monorepo.3
21
+ - @ledgerhq/errors@6.10.1-monorepo.3
22
+ - @ledgerhq/hw-transport@6.24.2-monorepo.3
23
+ - @ledgerhq/logs@6.10.1-monorepo.3
24
+
25
+ ## 6.24.2-monorepo.2
26
+
27
+ ### Patch Changes
28
+
29
+ - a439963a7: test prerelease
30
+ - Updated dependencies [a439963a7]
31
+ - @ledgerhq/devices@6.24.2-monorepo.2
32
+ - @ledgerhq/errors@6.10.1-monorepo.2
33
+ - @ledgerhq/hw-transport@6.24.2-monorepo.2
34
+ - @ledgerhq/logs@6.10.1-monorepo.2
35
+
36
+ ## 6.24.2-monorepo.1
37
+
38
+ ### Patch Changes
39
+
40
+ - 1b6fec9db: monorepo prelease 2
41
+ - Updated dependencies [1b6fec9db]
42
+ - @ledgerhq/devices@6.24.2-monorepo.1
43
+ - @ledgerhq/errors@6.10.1-monorepo.1
44
+ - @ledgerhq/hw-transport@6.24.2-monorepo.1
45
+ - @ledgerhq/logs@6.10.1-monorepo.1
46
+
3
47
  ## 6.24.2-monorepo.0
4
48
 
5
49
  ### Patch Changes
package/lib/index.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ /// <reference types="node" />
2
+ import type { DeviceModel } from "@ledgerhq/devices";
3
+ import Transport from "@ledgerhq/hw-transport";
4
+ declare type DeviceObj = {
5
+ vendorId: number;
6
+ productId: number;
7
+ };
8
+ /**
9
+ * Ledger's React Native HID Transport implementation
10
+ * @example
11
+ * import TransportHID from "@ledgerhq/react-native-hid";
12
+ * ...
13
+ * TransportHID.create().then(transport => ...)
14
+ */
15
+ export default class HIDTransport extends Transport {
16
+ id: number;
17
+ deviceModel: DeviceModel | null | undefined;
18
+ constructor(nativeId: number, productId: number);
19
+ /**
20
+ * Check if the transport is supported (basically true on Android)
21
+ */
22
+ static isSupported: () => Promise<boolean>;
23
+ /**
24
+ * List currently connected devices.
25
+ * @returns Promise of devices
26
+ */
27
+ static list(): Promise<any[]>;
28
+ /**
29
+ * Listen to ledger devices events
30
+ */
31
+ static listen(observer: any): any;
32
+ /**
33
+ * Open a the transport with a Ledger device
34
+ */
35
+ static open(deviceObj: DeviceObj): Promise<HIDTransport>;
36
+ /**
37
+ * @param {*} apdu input value
38
+ * @returns Promise of apdu response
39
+ */
40
+ exchange(apdu: Buffer): Promise<any>;
41
+ /**
42
+ * Close the transport
43
+ * @returns Promise
44
+ */
45
+ close(): Promise<any>;
46
+ setScrambleKey(): void;
47
+ }
48
+ export {};
49
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAI/C,aAAK,SAAS,GAAG;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+BF;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;gBAEhC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAM/C;;OAEG;IACH,MAAM,CAAC,WAAW,QAAO,QAAQ,OAAO,CAAC,CACF;IAEvC;;;OAGG;WACU,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAKnC;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG;IAqBjC;;OAEG;WACU,IAAI,CAAC,SAAS,EAAE,SAAS;IAatC;;;OAGG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAoB1C;;;OAGG;IACG,KAAK;IAKX,cAAc;CACf"}
package/lib/index.js ADDED
@@ -0,0 +1,236 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (_) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ var __importDefault = (this && this.__importDefault) || function (mod) {
54
+ return (mod && mod.__esModule) ? mod : { "default": mod };
55
+ };
56
+ exports.__esModule = true;
57
+ var react_native_1 = require("react-native");
58
+ var devices_1 = require("@ledgerhq/devices");
59
+ var errors_1 = require("@ledgerhq/errors");
60
+ var logs_1 = require("@ledgerhq/logs");
61
+ var hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport"));
62
+ var rxjs_1 = require("rxjs");
63
+ var operators_1 = require("rxjs/operators");
64
+ var disconnectedErrors = [
65
+ "I/O error",
66
+ "Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getDeviceClass()' on a null object reference",
67
+ ];
68
+ var listLedgerDevices = function () { return __awaiter(void 0, void 0, void 0, function () {
69
+ var devices;
70
+ return __generator(this, function (_a) {
71
+ switch (_a.label) {
72
+ case 0: return [4 /*yield*/, react_native_1.NativeModules.HID.getDeviceList()];
73
+ case 1:
74
+ devices = _a.sent();
75
+ return [2 /*return*/, devices.filter(function (d) { return d.vendorId === devices_1.ledgerUSBVendorId; })];
76
+ }
77
+ });
78
+ }); };
79
+ var liveDeviceEventsSubject = new rxjs_1.Subject();
80
+ react_native_1.DeviceEventEmitter.addListener("onDeviceConnect", function (device) {
81
+ if (device.vendorId !== devices_1.ledgerUSBVendorId)
82
+ return;
83
+ var deviceModel = (0, devices_1.identifyUSBProductId)(device.productId);
84
+ liveDeviceEventsSubject.next({
85
+ type: "add",
86
+ descriptor: device,
87
+ deviceModel: deviceModel
88
+ });
89
+ });
90
+ react_native_1.DeviceEventEmitter.addListener("onDeviceDisconnect", function (device) {
91
+ if (device.vendorId !== devices_1.ledgerUSBVendorId)
92
+ return;
93
+ var deviceModel = (0, devices_1.identifyUSBProductId)(device.productId);
94
+ liveDeviceEventsSubject.next({
95
+ type: "remove",
96
+ descriptor: device,
97
+ deviceModel: deviceModel
98
+ });
99
+ });
100
+ var liveDeviceEvents = liveDeviceEventsSubject;
101
+ /**
102
+ * Ledger's React Native HID Transport implementation
103
+ * @example
104
+ * import TransportHID from "@ledgerhq/react-native-hid";
105
+ * ...
106
+ * TransportHID.create().then(transport => ...)
107
+ */
108
+ var HIDTransport = /** @class */ (function (_super) {
109
+ __extends(HIDTransport, _super);
110
+ function HIDTransport(nativeId, productId) {
111
+ var _this = _super.call(this) || this;
112
+ _this.id = nativeId;
113
+ _this.deviceModel = (0, devices_1.identifyUSBProductId)(productId);
114
+ return _this;
115
+ }
116
+ /**
117
+ * List currently connected devices.
118
+ * @returns Promise of devices
119
+ */
120
+ HIDTransport.list = function () {
121
+ return __awaiter(this, void 0, void 0, function () {
122
+ return __generator(this, function (_a) {
123
+ switch (_a.label) {
124
+ case 0:
125
+ if (!react_native_1.NativeModules.HID)
126
+ return [2 /*return*/, Promise.resolve([])];
127
+ return [4 /*yield*/, listLedgerDevices()];
128
+ case 1: return [2 /*return*/, _a.sent()];
129
+ }
130
+ });
131
+ });
132
+ };
133
+ /**
134
+ * Listen to ledger devices events
135
+ */
136
+ HIDTransport.listen = function (observer) {
137
+ if (!react_native_1.NativeModules.HID)
138
+ return {
139
+ unsubscribe: function () { }
140
+ };
141
+ return (0, rxjs_1.concat)((0, rxjs_1.from)(listLedgerDevices()).pipe((0, operators_1.mergeMap)(function (devices) {
142
+ return (0, rxjs_1.from)(devices.map(function (device) { return ({
143
+ type: "add",
144
+ descriptor: device,
145
+ deviceModel: (0, devices_1.identifyUSBProductId)(device.productId)
146
+ }); }));
147
+ })), liveDeviceEvents).subscribe(observer);
148
+ };
149
+ /**
150
+ * Open a the transport with a Ledger device
151
+ */
152
+ HIDTransport.open = function (deviceObj) {
153
+ return __awaiter(this, void 0, void 0, function () {
154
+ var nativeObj, error_1;
155
+ return __generator(this, function (_a) {
156
+ switch (_a.label) {
157
+ case 0:
158
+ _a.trys.push([0, 2, , 3]);
159
+ return [4 /*yield*/, react_native_1.NativeModules.HID.openDevice(deviceObj)];
160
+ case 1:
161
+ nativeObj = _a.sent();
162
+ return [2 /*return*/, new HIDTransport(nativeObj.id, deviceObj.productId)];
163
+ case 2:
164
+ error_1 = _a.sent();
165
+ if (disconnectedErrors.includes(error_1.message)) {
166
+ throw new errors_1.DisconnectedDevice(error_1.message);
167
+ }
168
+ throw error_1;
169
+ case 3: return [2 /*return*/];
170
+ }
171
+ });
172
+ });
173
+ };
174
+ /**
175
+ * @param {*} apdu input value
176
+ * @returns Promise of apdu response
177
+ */
178
+ HIDTransport.prototype.exchange = function (apdu) {
179
+ return __awaiter(this, void 0, void 0, function () {
180
+ var _this = this;
181
+ return __generator(this, function (_a) {
182
+ return [2 /*return*/, this.exchangeAtomicImpl(function () { return __awaiter(_this, void 0, void 0, function () {
183
+ var apduHex, resultHex, res, error_2;
184
+ return __generator(this, function (_a) {
185
+ switch (_a.label) {
186
+ case 0:
187
+ _a.trys.push([0, 2, , 3]);
188
+ apduHex = apdu.toString("hex");
189
+ (0, logs_1.log)("apdu", "=> " + apduHex);
190
+ return [4 /*yield*/, react_native_1.NativeModules.HID.exchange(this.id, apduHex)];
191
+ case 1:
192
+ resultHex = _a.sent();
193
+ res = Buffer.from(resultHex, "hex");
194
+ (0, logs_1.log)("apdu", "<= " + resultHex);
195
+ return [2 /*return*/, res];
196
+ case 2:
197
+ error_2 = _a.sent();
198
+ if (disconnectedErrors.includes(error_2.message)) {
199
+ this.emit("disconnect", error_2);
200
+ throw new errors_1.DisconnectedDeviceDuringOperation(error_2.message);
201
+ }
202
+ throw error_2;
203
+ case 3: return [2 /*return*/];
204
+ }
205
+ });
206
+ }); })];
207
+ });
208
+ });
209
+ };
210
+ /**
211
+ * Close the transport
212
+ * @returns Promise
213
+ */
214
+ HIDTransport.prototype.close = function () {
215
+ return __awaiter(this, void 0, void 0, function () {
216
+ return __generator(this, function (_a) {
217
+ switch (_a.label) {
218
+ case 0: return [4 /*yield*/, this.exchangeBusyPromise];
219
+ case 1:
220
+ _a.sent();
221
+ return [2 /*return*/, react_native_1.NativeModules.HID.closeDevice(this.id)];
222
+ }
223
+ });
224
+ });
225
+ };
226
+ HIDTransport.prototype.setScrambleKey = function () { };
227
+ /**
228
+ * Check if the transport is supported (basically true on Android)
229
+ */
230
+ HIDTransport.isSupported = function () {
231
+ return Promise.resolve(!!react_native_1.NativeModules.HID);
232
+ };
233
+ return HIDTransport;
234
+ }(hw_transport_1["default"]));
235
+ exports["default"] = HIDTransport;
236
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAiE;AACjE,6CAA4E;AAE5E,2CAG0B;AAC1B,uCAAqC;AACrC,wEAA+C;AAE/C,6BAA6C;AAC7C,4CAA0C;AAK1C,IAAM,kBAAkB,GAAG;IACzB,WAAW;IACX,mHAAmH;CACpH,CAAC;AAEF,IAAM,iBAAiB,GAAG;;;;oBACR,qBAAM,4BAAa,CAAC,GAAG,CAAC,aAAa,EAAE,EAAA;;gBAAjD,OAAO,GAAG,SAAuC;gBACvD,sBAAO,OAAO,CAAC,MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,KAAK,2BAAiB,EAAhC,CAAgC,CAAC,EAAC;;;KAChE,CAAC;AAEF,IAAM,uBAAuB,GAAkC,IAAI,cAAO,EAAE,CAAC;AAC7E,iCAAkB,CAAC,WAAW,CAAC,iBAAiB,EAAE,UAAC,MAAW;IAC5D,IAAI,MAAM,CAAC,QAAQ,KAAK,2BAAiB;QAAE,OAAO;IAClD,IAAM,WAAW,GAAG,IAAA,8BAAoB,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC3D,uBAAuB,CAAC,IAAI,CAA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,CAAC,OAAK,CAAC,OAAO,CAAC,EAAE;wCAC9C,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAK,CAAC,CAAC;wCAC/B,MAAM,IAAI,0CAAiC,CAAC,OAAK,CAAC,OAAO,CAAC,CAAC;qCAC5D;oCAED,MAAM,OAAK,CAAC;;;;yBAEf,CAAC,EAAC;;;KACJ;IAED;;;OAGG;IACG,4BAAK,GAAX;;;;4BACE,qBAAM,IAAI,CAAC,mBAAmB,EAAA;;wBAA9B,SAA8B,CAAC;wBAC/B,sBAAO,4BAAa,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,EAAC;;;;KAC/C;IAED,qCAAc,GAAd,cAAkB,CAAC;IAxFnB;;OAEG;IACI,wBAAW,GAAG;QACnB,OAAA,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,4BAAa,CAAC,GAAG,CAAC;IAApC,CAAoC,CAAC;IAqFzC,mBAAC;CAAA,AAnGD,CAA0C,yBAAS,GAmGlD;qBAnGoB,YAAY"}
@@ -0,0 +1,49 @@
1
+ /// <reference types="node" />
2
+ import type { DeviceModel } from "@ledgerhq/devices";
3
+ import Transport from "@ledgerhq/hw-transport";
4
+ declare type DeviceObj = {
5
+ vendorId: number;
6
+ productId: number;
7
+ };
8
+ /**
9
+ * Ledger's React Native HID Transport implementation
10
+ * @example
11
+ * import TransportHID from "@ledgerhq/react-native-hid";
12
+ * ...
13
+ * TransportHID.create().then(transport => ...)
14
+ */
15
+ export default class HIDTransport extends Transport {
16
+ id: number;
17
+ deviceModel: DeviceModel | null | undefined;
18
+ constructor(nativeId: number, productId: number);
19
+ /**
20
+ * Check if the transport is supported (basically true on Android)
21
+ */
22
+ static isSupported: () => Promise<boolean>;
23
+ /**
24
+ * List currently connected devices.
25
+ * @returns Promise of devices
26
+ */
27
+ static list(): Promise<any[]>;
28
+ /**
29
+ * Listen to ledger devices events
30
+ */
31
+ static listen(observer: any): any;
32
+ /**
33
+ * Open a the transport with a Ledger device
34
+ */
35
+ static open(deviceObj: DeviceObj): Promise<HIDTransport>;
36
+ /**
37
+ * @param {*} apdu input value
38
+ * @returns Promise of apdu response
39
+ */
40
+ exchange(apdu: Buffer): Promise<any>;
41
+ /**
42
+ * Close the transport
43
+ * @returns Promise
44
+ */
45
+ close(): Promise<any>;
46
+ setScrambleKey(): void;
47
+ }
48
+ export {};
49
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAI/C,aAAK,SAAS,GAAG;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA+BF;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;gBAEhC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAM/C;;OAEG;IACH,MAAM,CAAC,WAAW,QAAO,QAAQ,OAAO,CAAC,CACF;IAEvC;;;OAGG;WACU,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAKnC;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG;IAqBjC;;OAEG;WACU,IAAI,CAAC,SAAS,EAAE,SAAS;IAatC;;;OAGG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAoB1C;;;OAGG;IACG,KAAK;IAKX,cAAc;CACf"}
@@ -0,0 +1,231 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __generator = (this && this.__generator) || function (thisArg, body) {
26
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
27
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ function verb(n) { return function (v) { return step([n, v]); }; }
29
+ function step(op) {
30
+ if (f) throw new TypeError("Generator is already executing.");
31
+ while (_) try {
32
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
33
+ if (y = 0, t) op = [op[0] & 2, t.value];
34
+ switch (op[0]) {
35
+ case 0: case 1: t = op; break;
36
+ case 4: _.label++; return { value: op[1], done: false };
37
+ case 5: _.label++; y = op[1]; op = [0]; continue;
38
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
+ default:
40
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
+ if (t[2]) _.ops.pop();
45
+ _.trys.pop(); continue;
46
+ }
47
+ op = body.call(thisArg, _);
48
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
+ }
51
+ };
52
+ import { NativeModules, DeviceEventEmitter } from "react-native";
53
+ import { ledgerUSBVendorId, identifyUSBProductId } from "@ledgerhq/devices";
54
+ import { DisconnectedDeviceDuringOperation, DisconnectedDevice, } from "@ledgerhq/errors";
55
+ import { log } from "@ledgerhq/logs";
56
+ import Transport from "@ledgerhq/hw-transport";
57
+ import { Subject, from, concat } from "rxjs";
58
+ import { mergeMap } from "rxjs/operators";
59
+ var disconnectedErrors = [
60
+ "I/O error",
61
+ "Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getDeviceClass()' on a null object reference",
62
+ ];
63
+ var listLedgerDevices = function () { return __awaiter(void 0, void 0, void 0, function () {
64
+ var devices;
65
+ return __generator(this, function (_a) {
66
+ switch (_a.label) {
67
+ case 0: return [4 /*yield*/, NativeModules.HID.getDeviceList()];
68
+ case 1:
69
+ devices = _a.sent();
70
+ return [2 /*return*/, devices.filter(function (d) { return d.vendorId === ledgerUSBVendorId; })];
71
+ }
72
+ });
73
+ }); };
74
+ var liveDeviceEventsSubject = new Subject();
75
+ DeviceEventEmitter.addListener("onDeviceConnect", function (device) {
76
+ if (device.vendorId !== ledgerUSBVendorId)
77
+ return;
78
+ var deviceModel = identifyUSBProductId(device.productId);
79
+ liveDeviceEventsSubject.next({
80
+ type: "add",
81
+ descriptor: device,
82
+ deviceModel: deviceModel
83
+ });
84
+ });
85
+ DeviceEventEmitter.addListener("onDeviceDisconnect", function (device) {
86
+ if (device.vendorId !== ledgerUSBVendorId)
87
+ return;
88
+ var deviceModel = identifyUSBProductId(device.productId);
89
+ liveDeviceEventsSubject.next({
90
+ type: "remove",
91
+ descriptor: device,
92
+ deviceModel: deviceModel
93
+ });
94
+ });
95
+ var liveDeviceEvents = liveDeviceEventsSubject;
96
+ /**
97
+ * Ledger's React Native HID Transport implementation
98
+ * @example
99
+ * import TransportHID from "@ledgerhq/react-native-hid";
100
+ * ...
101
+ * TransportHID.create().then(transport => ...)
102
+ */
103
+ var HIDTransport = /** @class */ (function (_super) {
104
+ __extends(HIDTransport, _super);
105
+ function HIDTransport(nativeId, productId) {
106
+ var _this = _super.call(this) || this;
107
+ _this.id = nativeId;
108
+ _this.deviceModel = identifyUSBProductId(productId);
109
+ return _this;
110
+ }
111
+ /**
112
+ * List currently connected devices.
113
+ * @returns Promise of devices
114
+ */
115
+ HIDTransport.list = function () {
116
+ return __awaiter(this, void 0, void 0, function () {
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0:
120
+ if (!NativeModules.HID)
121
+ return [2 /*return*/, Promise.resolve([])];
122
+ return [4 /*yield*/, listLedgerDevices()];
123
+ case 1: return [2 /*return*/, _a.sent()];
124
+ }
125
+ });
126
+ });
127
+ };
128
+ /**
129
+ * Listen to ledger devices events
130
+ */
131
+ HIDTransport.listen = function (observer) {
132
+ if (!NativeModules.HID)
133
+ return {
134
+ unsubscribe: function () { }
135
+ };
136
+ return concat(from(listLedgerDevices()).pipe(mergeMap(function (devices) {
137
+ return from(devices.map(function (device) { return ({
138
+ type: "add",
139
+ descriptor: device,
140
+ deviceModel: identifyUSBProductId(device.productId)
141
+ }); }));
142
+ })), liveDeviceEvents).subscribe(observer);
143
+ };
144
+ /**
145
+ * Open a the transport with a Ledger device
146
+ */
147
+ HIDTransport.open = function (deviceObj) {
148
+ return __awaiter(this, void 0, void 0, function () {
149
+ var nativeObj, error_1;
150
+ return __generator(this, function (_a) {
151
+ switch (_a.label) {
152
+ case 0:
153
+ _a.trys.push([0, 2, , 3]);
154
+ return [4 /*yield*/, NativeModules.HID.openDevice(deviceObj)];
155
+ case 1:
156
+ nativeObj = _a.sent();
157
+ return [2 /*return*/, new HIDTransport(nativeObj.id, deviceObj.productId)];
158
+ case 2:
159
+ error_1 = _a.sent();
160
+ if (disconnectedErrors.includes(error_1.message)) {
161
+ throw new DisconnectedDevice(error_1.message);
162
+ }
163
+ throw error_1;
164
+ case 3: return [2 /*return*/];
165
+ }
166
+ });
167
+ });
168
+ };
169
+ /**
170
+ * @param {*} apdu input value
171
+ * @returns Promise of apdu response
172
+ */
173
+ HIDTransport.prototype.exchange = function (apdu) {
174
+ return __awaiter(this, void 0, void 0, function () {
175
+ var _this = this;
176
+ return __generator(this, function (_a) {
177
+ return [2 /*return*/, this.exchangeAtomicImpl(function () { return __awaiter(_this, void 0, void 0, function () {
178
+ var apduHex, resultHex, res, error_2;
179
+ return __generator(this, function (_a) {
180
+ switch (_a.label) {
181
+ case 0:
182
+ _a.trys.push([0, 2, , 3]);
183
+ apduHex = apdu.toString("hex");
184
+ log("apdu", "=> " + apduHex);
185
+ return [4 /*yield*/, NativeModules.HID.exchange(this.id, apduHex)];
186
+ case 1:
187
+ resultHex = _a.sent();
188
+ res = Buffer.from(resultHex, "hex");
189
+ log("apdu", "<= " + resultHex);
190
+ return [2 /*return*/, res];
191
+ case 2:
192
+ error_2 = _a.sent();
193
+ if (disconnectedErrors.includes(error_2.message)) {
194
+ this.emit("disconnect", error_2);
195
+ throw new DisconnectedDeviceDuringOperation(error_2.message);
196
+ }
197
+ throw error_2;
198
+ case 3: return [2 /*return*/];
199
+ }
200
+ });
201
+ }); })];
202
+ });
203
+ });
204
+ };
205
+ /**
206
+ * Close the transport
207
+ * @returns Promise
208
+ */
209
+ HIDTransport.prototype.close = function () {
210
+ return __awaiter(this, void 0, void 0, function () {
211
+ return __generator(this, function (_a) {
212
+ switch (_a.label) {
213
+ case 0: return [4 /*yield*/, this.exchangeBusyPromise];
214
+ case 1:
215
+ _a.sent();
216
+ return [2 /*return*/, NativeModules.HID.closeDevice(this.id)];
217
+ }
218
+ });
219
+ });
220
+ };
221
+ HIDTransport.prototype.setScrambleKey = function () { };
222
+ /**
223
+ * Check if the transport is supported (basically true on Android)
224
+ */
225
+ HIDTransport.isSupported = function () {
226
+ return Promise.resolve(!!NativeModules.HID);
227
+ };
228
+ return HIDTransport;
229
+ }(Transport));
230
+ export default HIDTransport;
231
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EACL,iCAAiC,EACjC,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK1C,IAAM,kBAAkB,GAAG;IACzB,WAAW;IACX,mHAAmH;CACpH,CAAC;AAEF,IAAM,iBAAiB,GAAG;;;;oBACR,qBAAM,aAAa,CAAC,GAAG,CAAC,aAAa,EAAE,EAAA;;gBAAjD,OAAO,GAAG,SAAuC;gBACvD,sBAAO,OAAO,CAAC,MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,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,CAAC,EAAE,EAAE,OAAO,CAAC,EAAA;;oCAA9D,SAAS,GAAG,SAAkD;oCAC9D,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;oCAC1C,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,CAAC,CAAC;oCAC/B,sBAAO,GAAG,EAAC;;;oCAEX,IAAI,kBAAkB,CAAC,QAAQ,CAAC,OAAK,CAAC,OAAO,CAAC,EAAE;wCAC9C,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAK,CAAC,CAAC;wCAC/B,MAAM,IAAI,iCAAiC,CAAC,OAAK,CAAC,OAAO,CAAC,CAAC;qCAC5D;oCAED,MAAM,OAAK,CAAC;;;;yBAEf,CAAC,EAAC;;;KACJ;IAED;;;OAGG;IACG,4BAAK,GAAX;;;;4BACE,qBAAM,IAAI,CAAC,mBAAmB,EAAA;;wBAA9B,SAA8B,CAAC;wBAC/B,sBAAO,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,EAAC;;;;KAC/C;IAED,qCAAc,GAAd,cAAkB,CAAC;IAxFnB;;OAEG;IACI,wBAAW,GAAG;QACnB,OAAA,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC;IAApC,CAAoC,CAAC;IAqFzC,mBAAC;CAAA,AAnGD,CAA0C,SAAS,GAmGlD;eAnGoB,YAAY"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/react-native-hid",
3
- "version": "6.24.2-monorepo.0",
3
+ "version": "6.24.2-monorepo.4",
4
4
  "nativePackage": true,
5
5
  "description": "Ledger Hardware Wallet Web implementation of the communication layer, using U2F api",
6
6
  "keywords": [
@@ -29,10 +29,10 @@
29
29
  "types": "lib/index.d.ts",
30
30
  "license": "Apache-2.0",
31
31
  "dependencies": {
32
- "@ledgerhq/devices": "^6.24.2-monorepo.0",
33
- "@ledgerhq/errors": "^6.10.1-monorepo.0",
34
- "@ledgerhq/hw-transport": "^6.24.2-monorepo.0",
35
- "@ledgerhq/logs": "^6.10.1-monorepo.0",
32
+ "@ledgerhq/devices": "^6.24.2-monorepo.4",
33
+ "@ledgerhq/errors": "^6.10.1-monorepo.4",
34
+ "@ledgerhq/hw-transport": "^6.24.2-monorepo.4",
35
+ "@ledgerhq/logs": "^6.10.1-monorepo.4",
36
36
  "rxjs": "6"
37
37
  },
38
38
  "devDependencies": {