@onekeyfe/hd-shared 0.1.45 → 0.1.47

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.
@@ -59,6 +59,7 @@ export declare const HardwareErrorCode: {
59
59
  readonly BleCharacteristicNotifyError: 709;
60
60
  readonly BleWriteCharacteristicError: 710;
61
61
  readonly BleAlreadyConnected: 711;
62
+ readonly BleLocationServicesDisabled: 712;
62
63
  readonly RuntimeError: 800;
63
64
  readonly PinInvalid: 801;
64
65
  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,aAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE5C,aAAK,+BAA+B,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,OAAO,iBAAiB,CAAC,GAAG,MAAM;CAAE,CAAC;AAE5F,aAAK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgPpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BAwF7B,CAAC;AAEX,eAAO,MAAM,UAAU,kBACN,cAAc,GAAG,MAAM,yCAE7B,GAAG,kBAMb,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,GAAG,QAY1C,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,aAOtD,CAAC"}
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,aAAK,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE5C,aAAK,+BAA+B,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,OAAO,iBAAiB,CAAC,GAAG,MAAM;CAAE,CAAC;AAE5F,aAAK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiPpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BA0F7B,CAAC;AAEX,eAAO,MAAM,UAAU,kBACN,cAAc,GAAG,MAAM,yCAE7B,GAAG,kBAMb,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,GAAG,QAY1C,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,aAOtD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -68,6 +68,7 @@ declare const HardwareErrorCode: {
68
68
  readonly BleCharacteristicNotifyError: 709;
69
69
  readonly BleWriteCharacteristicError: 710;
70
70
  readonly BleAlreadyConnected: 711;
71
+ readonly BleLocationServicesDisabled: 712;
71
72
  readonly RuntimeError: 800;
72
73
  readonly PinInvalid: 801;
73
74
  readonly PinCancelled: 802;
package/dist/index.js CHANGED
@@ -128,6 +128,7 @@ const HardwareErrorCode = {
128
128
  BleCharacteristicNotifyError: 709,
129
129
  BleWriteCharacteristicError: 710,
130
130
  BleAlreadyConnected: 711,
131
+ BleLocationServicesDisabled: 712,
131
132
  RuntimeError: 800,
132
133
  PinInvalid: 801,
133
134
  PinCancelled: 802,
@@ -176,7 +177,7 @@ const HardwareErrorCodeMessage = {
176
177
  [HardwareErrorCode.TransportInvalidProtobuf]: 'Transport invalid protobuf',
177
178
  [HardwareErrorCode.BleScanError]: 'BLE scan error',
178
179
  [HardwareErrorCode.BlePermissionError]: 'Bluetooth required to be turned on',
179
- [HardwareErrorCode.BleLocationError]: 'Device is not authorized to use BluetoothLE',
180
+ [HardwareErrorCode.BleLocationError]: 'Location permissions for the application are not available',
180
181
  [HardwareErrorCode.BleRequiredUUID]: 'uuid is required',
181
182
  [HardwareErrorCode.BleConnectedError]: 'connected error is always runtime error',
182
183
  [HardwareErrorCode.BleDeviceNotBonded]: 'device is not bonded',
@@ -186,6 +187,7 @@ const HardwareErrorCodeMessage = {
186
187
  [HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
187
188
  [HardwareErrorCode.BleWriteCharacteristicError]: 'Write Characteristic Error',
188
189
  [HardwareErrorCode.BleAlreadyConnected]: 'Already connected to device',
190
+ [HardwareErrorCode.BleLocationServicesDisabled]: 'Location Services disabled',
189
191
  [HardwareErrorCode.RuntimeError]: 'Runtime error',
190
192
  [HardwareErrorCode.PinInvalid]: 'Pin invalid',
191
193
  [HardwareErrorCode.PinCancelled]: 'Pin cancelled',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-shared",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
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": "0436f8ff26494933124c1c6f4586d4aeb5526c30"
28
+ "gitHead": "66d6a45a4b761292ca21ddf8e0d1c192d3756529"
29
29
  }
@@ -223,6 +223,7 @@ export const HardwareErrorCode = {
223
223
  BleCharacteristicNotifyError: 709,
224
224
  BleWriteCharacteristicError: 710,
225
225
  BleAlreadyConnected: 711,
226
+ BleLocationServicesDisabled: 712,
226
227
 
227
228
  /**
228
229
  * Hardware runtiome errors
@@ -347,7 +348,8 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
347
348
  */
348
349
  [HardwareErrorCode.BleScanError]: 'BLE scan error',
349
350
  [HardwareErrorCode.BlePermissionError]: 'Bluetooth required to be turned on',
350
- [HardwareErrorCode.BleLocationError]: 'Device is not authorized to use BluetoothLE',
351
+ [HardwareErrorCode.BleLocationError]:
352
+ 'Location permissions for the application are not available',
351
353
  [HardwareErrorCode.BleRequiredUUID]: 'uuid is required',
352
354
  [HardwareErrorCode.BleConnectedError]: 'connected error is always runtime error',
353
355
  [HardwareErrorCode.BleDeviceNotBonded]: 'device is not bonded',
@@ -357,6 +359,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
357
359
  [HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
358
360
  [HardwareErrorCode.BleWriteCharacteristicError]: 'Write Characteristic Error',
359
361
  [HardwareErrorCode.BleAlreadyConnected]: 'Already connected to device',
362
+ [HardwareErrorCode.BleLocationServicesDisabled]: 'Location Services disabled',
360
363
 
361
364
  /**
362
365
  * Runtime Error