@onekeyfe/hd-shared 0.1.7 → 0.1.10
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 +1 -0
- package/dist/HardwareError.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/package.json +2 -2
- package/src/HardwareError.ts +6 -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;
|
|
@@ -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;
|
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,
|
|
@@ -128,6 +129,7 @@ const HardwareErrorCodeMessage = {
|
|
|
128
129
|
[HardwareErrorCode.DeviceNotFound]: 'Device not found',
|
|
129
130
|
[HardwareErrorCode.DeviceInitializeFailed]: 'Device initialization failed',
|
|
130
131
|
[HardwareErrorCode.DeviceInterruptedFromOutside]: 'Device interrupted',
|
|
132
|
+
[HardwareErrorCode.DeviceUnexpectedBootloaderMode]: 'Device should be in bootloader mode',
|
|
131
133
|
[HardwareErrorCode.NotInitialized]: 'Not initialized',
|
|
132
134
|
[HardwareErrorCode.IFrameNotInitialized]: 'IFrame not initialized',
|
|
133
135
|
[HardwareErrorCode.IFrameAleradyInitialized]: 'IFrame alerady initialized',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
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": "fa01be1b49324153bd7767759902ebd46a6b9c68"
|
|
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
|
*/
|
|
@@ -208,6 +213,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
208
213
|
[HardwareErrorCode.DeviceNotFound]: 'Device not found',
|
|
209
214
|
[HardwareErrorCode.DeviceInitializeFailed]: 'Device initialization failed',
|
|
210
215
|
[HardwareErrorCode.DeviceInterruptedFromOutside]: 'Device interrupted',
|
|
216
|
+
[HardwareErrorCode.DeviceUnexpectedBootloaderMode]: 'Device should be in bootloader mode',
|
|
211
217
|
|
|
212
218
|
/**
|
|
213
219
|
* Node Errors
|