@onekeyfe/hd-shared 1.0.25 → 1.0.26

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.
@@ -32,6 +32,7 @@ export declare const HardwareErrorCode: {
32
32
  readonly DeviceOpenedPassphrase: 114;
33
33
  readonly DeviceDetectInBootloaderMode: 115;
34
34
  readonly NotAllowInBootloaderMode: 116;
35
+ readonly DeviceBusy: 117;
35
36
  readonly NotInitialized: 200;
36
37
  readonly IFrameNotInitialized: 300;
37
38
  readonly IFrameAleradyInitialized: 301;
@@ -76,6 +77,9 @@ export declare const HardwareErrorCode: {
76
77
  readonly BleDeviceBondError: 715;
77
78
  readonly BleCharacteristicNotifyChangeFailure: 716;
78
79
  readonly BleTransportCallCanceled: 717;
80
+ readonly BleDeviceBondedCanceled: 718;
81
+ readonly BlePeerRemovedPairingInformation: 719;
82
+ readonly BleDeviceDisconnected: 720;
79
83
  readonly RuntimeError: 800;
80
84
  readonly PinInvalid: 801;
81
85
  readonly PinCancelled: 802;
@@ -1 +1 @@
1
- {"version":3,"file":"HardwareError.d.ts","sourceRoot":"","sources":["../src/HardwareError.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE5C,KAAK,+BAA+B,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,OAAO,iBAAiB,CAAC,GAAG,MAAM;CAAE,CAAC;AAE5F,KAAK,cAAc,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAOxD,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAS,EAAE,cAAc,CAAkC;IAE3D,OAAO,SAAM;IAEb,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C,GAAG,MAAM;CAAE,CAAC;AAE5F,KAAK,cAAc,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAOxD,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAS,EAAE,cAAc,CAAkC;IAE3D,OAAO,SAAM;IAEb,MAAM,EAAE,GAAG,CAAM;gBAEL,aAAa,EAAE,cAAc,GAAG,MAAM;CAmBnD;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4WpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BAiI7B,CAAC;AAEX,eAAO,MAAM,UAAU,kBACN,cAAc,GAAG,MAAM,YAC5B,MAAM,WACP,GAAG,kBAMb,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,GAAG,QAe1C,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,aAOtD,CAAC;AAEF,QAAA,MAAM,uCAAuC,mBAAoB,MAAM,kBAAkB,MAAM,kBAK5F,CAAC;AAEJ,QAAA,MAAM,sCAAsC,mBAAoB,MAAM,kBAAkB,MAAM,kBAK3F,CAAC;AAEJ,QAAA,MAAM,yCAAyC,cAClC,MAAM,GAAG,SAAS,YACnB,MAAM,GAAG,SAAS,kBAM3B,CAAC;AAEJ,QAAA,MAAM,6BAA6B,mBAAoB,MAAM,qBAAqB,MAAM,kBAKrF,CAAC;AAEJ,OAAO,EACL,uCAAuC,EACvC,sCAAsC,EACtC,yCAAyC,EACzC,6BAA6B,GAC9B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -46,6 +46,7 @@ declare const HardwareErrorCode: {
46
46
  readonly DeviceOpenedPassphrase: 114;
47
47
  readonly DeviceDetectInBootloaderMode: 115;
48
48
  readonly NotAllowInBootloaderMode: 116;
49
+ readonly DeviceBusy: 117;
49
50
  readonly NotInitialized: 200;
50
51
  readonly IFrameNotInitialized: 300;
51
52
  readonly IFrameAleradyInitialized: 301;
@@ -90,6 +91,9 @@ declare const HardwareErrorCode: {
90
91
  readonly BleDeviceBondError: 715;
91
92
  readonly BleCharacteristicNotifyChangeFailure: 716;
92
93
  readonly BleTransportCallCanceled: 717;
94
+ readonly BleDeviceBondedCanceled: 718;
95
+ readonly BlePeerRemovedPairingInformation: 719;
96
+ readonly BleDeviceDisconnected: 720;
93
97
  readonly RuntimeError: 800;
94
98
  readonly PinInvalid: 801;
95
99
  readonly PinCancelled: 802;
package/dist/index.js CHANGED
@@ -113,6 +113,7 @@ const HardwareErrorCode = {
113
113
  DeviceOpenedPassphrase: 114,
114
114
  DeviceDetectInBootloaderMode: 115,
115
115
  NotAllowInBootloaderMode: 116,
116
+ DeviceBusy: 117,
116
117
  NotInitialized: 200,
117
118
  IFrameNotInitialized: 300,
118
119
  IFrameAleradyInitialized: 301,
@@ -157,6 +158,9 @@ const HardwareErrorCode = {
157
158
  BleDeviceBondError: 715,
158
159
  BleCharacteristicNotifyChangeFailure: 716,
159
160
  BleTransportCallCanceled: 717,
161
+ BleDeviceBondedCanceled: 718,
162
+ BlePeerRemovedPairingInformation: 719,
163
+ BleDeviceDisconnected: 720,
160
164
  RuntimeError: 800,
161
165
  PinInvalid: 801,
162
166
  PinCancelled: 802,
@@ -199,6 +203,7 @@ const HardwareErrorCodeMessage = {
199
203
  [HardwareErrorCode.DeviceOpenedPassphrase]: 'Device opened passphrase',
200
204
  [HardwareErrorCode.DeviceDetectInBootloaderMode]: 'Device in bootloader mode',
201
205
  [HardwareErrorCode.NotAllowInBootloaderMode]: 'Device not allow in bootloader mode',
206
+ [HardwareErrorCode.DeviceBusy]: 'Device is busy',
202
207
  [HardwareErrorCode.NotInitialized]: 'Not initialized',
203
208
  [HardwareErrorCode.IFrameNotInitialized]: 'IFrame not initialized',
204
209
  [HardwareErrorCode.IFrameAleradyInitialized]: 'IFrame alerady initialized',
@@ -231,6 +236,8 @@ const HardwareErrorCodeMessage = {
231
236
  [HardwareErrorCode.BleRequiredUUID]: 'uuid is required',
232
237
  [HardwareErrorCode.BleConnectedError]: 'connected error is always runtime error',
233
238
  [HardwareErrorCode.BleDeviceNotBonded]: 'device is not bonded',
239
+ [HardwareErrorCode.BleDeviceBondedCanceled]: 'device is canceled bonding',
240
+ [HardwareErrorCode.BlePeerRemovedPairingInformation]: 'need to delete pairing information',
234
241
  [HardwareErrorCode.BleServiceNotFound]: 'BLEServiceNotFound: service not found',
235
242
  [HardwareErrorCode.BleCharacteristicNotFound]: 'BLEServiceNotFound: service not found',
236
243
  [HardwareErrorCode.BleMonitorError]: 'Monitor Error: characteristic not found',
@@ -243,6 +250,7 @@ const HardwareErrorCodeMessage = {
243
250
  [HardwareErrorCode.BleDeviceBondError]: 'Bluetooth pairing failed',
244
251
  [HardwareErrorCode.BleCharacteristicNotifyChangeFailure]: 'Characteristic Notify Change Failure',
245
252
  [HardwareErrorCode.BleTransportCallCanceled]: 'Ble Transport call canceled',
253
+ [HardwareErrorCode.BleDeviceDisconnected]: 'Device disconnected',
246
254
  [HardwareErrorCode.RuntimeError]: 'Runtime error',
247
255
  [HardwareErrorCode.PinInvalid]: 'Pin invalid',
248
256
  [HardwareErrorCode.PinCancelled]: 'Pin cancelled',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-shared",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Hardware SDK's shared tool library",
5
5
  "keywords": [
6
6
  "Hardware-SDK",
@@ -25,5 +25,5 @@
25
25
  "lint": "eslint .",
26
26
  "lint:fix": "eslint . --fix"
27
27
  },
28
- "gitHead": "25ac0d0194328afee6da6430c72895523e576302"
28
+ "gitHead": "080a3afa4360f2bc04368567e73ed30ba82ff2d7"
29
29
  }
@@ -131,6 +131,11 @@ export const HardwareErrorCode = {
131
131
  */
132
132
  NotAllowInBootloaderMode: 116,
133
133
 
134
+ /**
135
+ * Device is busy
136
+ */
137
+ DeviceBusy: 117,
138
+
134
139
  /**
135
140
  * Not initialized
136
141
  */
@@ -286,6 +291,9 @@ export const HardwareErrorCode = {
286
291
  BleDeviceBondError: 715,
287
292
  BleCharacteristicNotifyChangeFailure: 716,
288
293
  BleTransportCallCanceled: 717,
294
+ BleDeviceBondedCanceled: 718,
295
+ BlePeerRemovedPairingInformation: 719,
296
+ BleDeviceDisconnected: 720,
289
297
 
290
298
  /**
291
299
  * Hardware runtiome errors
@@ -423,6 +431,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
423
431
  [HardwareErrorCode.DeviceOpenedPassphrase]: 'Device opened passphrase',
424
432
  [HardwareErrorCode.DeviceDetectInBootloaderMode]: 'Device in bootloader mode',
425
433
  [HardwareErrorCode.NotAllowInBootloaderMode]: 'Device not allow in bootloader mode',
434
+ [HardwareErrorCode.DeviceBusy]: 'Device is busy',
426
435
  /**
427
436
  * Node Errors
428
437
  */
@@ -481,6 +490,8 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
481
490
  [HardwareErrorCode.BleRequiredUUID]: 'uuid is required',
482
491
  [HardwareErrorCode.BleConnectedError]: 'connected error is always runtime error',
483
492
  [HardwareErrorCode.BleDeviceNotBonded]: 'device is not bonded',
493
+ [HardwareErrorCode.BleDeviceBondedCanceled]: 'device is canceled bonding',
494
+ [HardwareErrorCode.BlePeerRemovedPairingInformation]: 'need to delete pairing information',
484
495
  [HardwareErrorCode.BleServiceNotFound]: 'BLEServiceNotFound: service not found',
485
496
  [HardwareErrorCode.BleCharacteristicNotFound]: 'BLEServiceNotFound: service not found',
486
497
  [HardwareErrorCode.BleMonitorError]: 'Monitor Error: characteristic not found',
@@ -493,6 +504,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
493
504
  [HardwareErrorCode.BleDeviceBondError]: 'Bluetooth pairing failed',
494
505
  [HardwareErrorCode.BleCharacteristicNotifyChangeFailure]: 'Characteristic Notify Change Failure',
495
506
  [HardwareErrorCode.BleTransportCallCanceled]: 'Ble Transport call canceled',
507
+ [HardwareErrorCode.BleDeviceDisconnected]: 'Device disconnected',
496
508
 
497
509
  /**
498
510
  * Runtime Error