@onekeyfe/hd-shared 0.1.6 → 0.1.9
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.
- package/dist/HardwareError.d.ts +2 -0
- package/dist/HardwareError.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/package.json +2 -2
- package/src/HardwareError.ts +8 -0
package/dist/HardwareError.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const HardwareErrorCode: {
|
|
|
21
21
|
readonly DeviceNotFound: 105;
|
|
22
22
|
readonly DeviceInitializeFailed: 106;
|
|
23
23
|
readonly DeviceInterruptedFromOutside: 107;
|
|
24
|
+
readonly DeviceUnexpectedBootloaderMode: 108;
|
|
24
25
|
readonly NotInitialized: 200;
|
|
25
26
|
readonly IFrameNotInitialized: 300;
|
|
26
27
|
readonly IFrameAleradyInitialized: 301;
|
|
@@ -45,6 +46,7 @@ export declare const HardwareErrorCode: {
|
|
|
45
46
|
readonly BleServiceNotFound: 706;
|
|
46
47
|
readonly BleCharacteristicNotFound: 707;
|
|
47
48
|
readonly BleMonitorError: 708;
|
|
49
|
+
readonly BleCharacteristicNotifyError: 709;
|
|
48
50
|
readonly RuntimeError: 800;
|
|
49
51
|
readonly PinInvalid: 801;
|
|
50
52
|
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;CAClB;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;AAMxD,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAS,EAAE,cAAc,CAAkC;IAE3D,OAAO,SAAM;gBAED,aAAa,EAAE,cAAc,GAAG,MAAM;CAkBnD;AAED,eAAO,MAAM,iBAAiB
|
|
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;CAClB;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;AAMxD,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAS,EAAE,cAAc,CAAkC;IAE3D,OAAO,SAAM;gBAED,aAAa,EAAE,cAAc,GAAG,MAAM;CAkBnD;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgKpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BAuE7B,CAAC;AAEX,eAAO,MAAM,UAAU,kBAAmB,cAAc,GAAG,MAAM,gDAKhE,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,GAAG,QAQ1C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare const HardwareErrorCode: {
|
|
|
30
30
|
readonly DeviceNotFound: 105;
|
|
31
31
|
readonly DeviceInitializeFailed: 106;
|
|
32
32
|
readonly DeviceInterruptedFromOutside: 107;
|
|
33
|
+
readonly DeviceUnexpectedBootloaderMode: 108;
|
|
33
34
|
readonly NotInitialized: 200;
|
|
34
35
|
readonly IFrameNotInitialized: 300;
|
|
35
36
|
readonly IFrameAleradyInitialized: 301;
|
|
@@ -54,6 +55,7 @@ declare const HardwareErrorCode: {
|
|
|
54
55
|
readonly BleServiceNotFound: 706;
|
|
55
56
|
readonly BleCharacteristicNotFound: 707;
|
|
56
57
|
readonly BleMonitorError: 708;
|
|
58
|
+
readonly BleCharacteristicNotifyError: 709;
|
|
57
59
|
readonly RuntimeError: 800;
|
|
58
60
|
readonly PinInvalid: 801;
|
|
59
61
|
readonly PinCancelled: 802;
|
package/dist/index.js
CHANGED
|
@@ -88,6 +88,7 @@ const HardwareErrorCode = {
|
|
|
88
88
|
DeviceNotFound: 105,
|
|
89
89
|
DeviceInitializeFailed: 106,
|
|
90
90
|
DeviceInterruptedFromOutside: 107,
|
|
91
|
+
DeviceUnexpectedBootloaderMode: 108,
|
|
91
92
|
NotInitialized: 200,
|
|
92
93
|
IFrameNotInitialized: 300,
|
|
93
94
|
IFrameAleradyInitialized: 301,
|
|
@@ -112,6 +113,7 @@ const HardwareErrorCode = {
|
|
|
112
113
|
BleServiceNotFound: 706,
|
|
113
114
|
BleCharacteristicNotFound: 707,
|
|
114
115
|
BleMonitorError: 708,
|
|
116
|
+
BleCharacteristicNotifyError: 709,
|
|
115
117
|
RuntimeError: 800,
|
|
116
118
|
PinInvalid: 801,
|
|
117
119
|
PinCancelled: 802,
|
|
@@ -127,6 +129,7 @@ const HardwareErrorCodeMessage = {
|
|
|
127
129
|
[HardwareErrorCode.DeviceNotFound]: 'Device not found',
|
|
128
130
|
[HardwareErrorCode.DeviceInitializeFailed]: 'Device initialization failed',
|
|
129
131
|
[HardwareErrorCode.DeviceInterruptedFromOutside]: 'Device interrupted',
|
|
132
|
+
[HardwareErrorCode.DeviceUnexpectedBootloaderMode]: 'Device should be in bootloader mode',
|
|
130
133
|
[HardwareErrorCode.NotInitialized]: 'Not initialized',
|
|
131
134
|
[HardwareErrorCode.IFrameNotInitialized]: 'IFrame not initialized',
|
|
132
135
|
[HardwareErrorCode.IFrameAleradyInitialized]: 'IFrame alerady initialized',
|
|
@@ -151,6 +154,7 @@ const HardwareErrorCodeMessage = {
|
|
|
151
154
|
[HardwareErrorCode.BleServiceNotFound]: 'BLEServiceNotFound: service not found',
|
|
152
155
|
[HardwareErrorCode.BleCharacteristicNotFound]: 'BLEServiceNotFound: service not found',
|
|
153
156
|
[HardwareErrorCode.BleMonitorError]: 'Monitor Error: characteristic not found',
|
|
157
|
+
[HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
|
|
154
158
|
[HardwareErrorCode.RuntimeError]: 'Runtime error',
|
|
155
159
|
[HardwareErrorCode.PinInvalid]: 'Pin invalid',
|
|
156
160
|
[HardwareErrorCode.PinCancelled]: 'Pin cancelled',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
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": "
|
|
28
|
+
"gitHead": "6abdc58c1614920bf941d7e56f2768aa76f56932"
|
|
29
29
|
}
|
package/src/HardwareError.ts
CHANGED
|
@@ -80,6 +80,11 @@ export const HardwareErrorCode = {
|
|
|
80
80
|
*/
|
|
81
81
|
DeviceInterruptedFromOutside: 107,
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Device is not in bootloader mode
|
|
85
|
+
*/
|
|
86
|
+
DeviceUnexpectedBootloaderMode: 108,
|
|
87
|
+
|
|
83
88
|
/**
|
|
84
89
|
* Not initialized
|
|
85
90
|
*/
|
|
@@ -167,6 +172,7 @@ export const HardwareErrorCode = {
|
|
|
167
172
|
BleServiceNotFound: 706,
|
|
168
173
|
BleCharacteristicNotFound: 707,
|
|
169
174
|
BleMonitorError: 708,
|
|
175
|
+
BleCharacteristicNotifyError: 709,
|
|
170
176
|
|
|
171
177
|
/**
|
|
172
178
|
* Hardware runtiome errors
|
|
@@ -207,6 +213,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
207
213
|
[HardwareErrorCode.DeviceNotFound]: 'Device not found',
|
|
208
214
|
[HardwareErrorCode.DeviceInitializeFailed]: 'Device initialization failed',
|
|
209
215
|
[HardwareErrorCode.DeviceInterruptedFromOutside]: 'Device interrupted',
|
|
216
|
+
[HardwareErrorCode.DeviceUnexpectedBootloaderMode]: 'Device should be in bootloader mode',
|
|
210
217
|
|
|
211
218
|
/**
|
|
212
219
|
* Node Errors
|
|
@@ -254,6 +261,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
254
261
|
[HardwareErrorCode.BleServiceNotFound]: 'BLEServiceNotFound: service not found',
|
|
255
262
|
[HardwareErrorCode.BleCharacteristicNotFound]: 'BLEServiceNotFound: service not found',
|
|
256
263
|
[HardwareErrorCode.BleMonitorError]: 'Monitor Error: characteristic not found',
|
|
264
|
+
[HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
|
|
257
265
|
|
|
258
266
|
/**
|
|
259
267
|
* Runtime Error
|