@onekeyfe/hd-shared 0.1.37 → 0.1.38
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 +3 -0
- package/dist/HardwareError.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/package.json +2 -2
- package/src/HardwareError.ts +19 -0
package/dist/HardwareError.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export declare const HardwareErrorCode: {
|
|
|
27
27
|
readonly DeviceInterruptedFromUser: 109;
|
|
28
28
|
readonly DeviceCheckDeviceIdError: 110;
|
|
29
29
|
readonly DeviceNotSupportPassphrase: 111;
|
|
30
|
+
readonly DeviceCheckPassphraseStateError: 112;
|
|
31
|
+
readonly DeviceNotOpenedPassphrase: 113;
|
|
32
|
+
readonly DeviceOpenedPassphrase: 114;
|
|
30
33
|
readonly NotInitialized: 200;
|
|
31
34
|
readonly IFrameNotInitialized: 300;
|
|
32
35
|
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;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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2OpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BAuF7B,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
|
@@ -36,6 +36,9 @@ declare const HardwareErrorCode: {
|
|
|
36
36
|
readonly DeviceInterruptedFromUser: 109;
|
|
37
37
|
readonly DeviceCheckDeviceIdError: 110;
|
|
38
38
|
readonly DeviceNotSupportPassphrase: 111;
|
|
39
|
+
readonly DeviceCheckPassphraseStateError: 112;
|
|
40
|
+
readonly DeviceNotOpenedPassphrase: 113;
|
|
41
|
+
readonly DeviceOpenedPassphrase: 114;
|
|
39
42
|
readonly NotInitialized: 200;
|
|
40
43
|
readonly IFrameNotInitialized: 300;
|
|
41
44
|
readonly IFrameAleradyInitialized: 301;
|
package/dist/index.js
CHANGED
|
@@ -96,6 +96,9 @@ const HardwareErrorCode = {
|
|
|
96
96
|
DeviceInterruptedFromUser: 109,
|
|
97
97
|
DeviceCheckDeviceIdError: 110,
|
|
98
98
|
DeviceNotSupportPassphrase: 111,
|
|
99
|
+
DeviceCheckPassphraseStateError: 112,
|
|
100
|
+
DeviceNotOpenedPassphrase: 113,
|
|
101
|
+
DeviceOpenedPassphrase: 114,
|
|
99
102
|
NotInitialized: 200,
|
|
100
103
|
IFrameNotInitialized: 300,
|
|
101
104
|
IFrameAleradyInitialized: 301,
|
|
@@ -150,6 +153,9 @@ const HardwareErrorCodeMessage = {
|
|
|
150
153
|
[HardwareErrorCode.DeviceUnexpectedBootloaderMode]: 'Device should be in bootloader mode',
|
|
151
154
|
[HardwareErrorCode.DeviceCheckDeviceIdError]: 'Device Id in the features is not same.',
|
|
152
155
|
[HardwareErrorCode.DeviceNotSupportPassphrase]: 'Device not support passphrase',
|
|
156
|
+
[HardwareErrorCode.DeviceCheckPassphraseStateError]: 'Device passphrase state error',
|
|
157
|
+
[HardwareErrorCode.DeviceNotOpenedPassphrase]: 'Device not opened passphrase',
|
|
158
|
+
[HardwareErrorCode.DeviceOpenedPassphrase]: 'Device opened passphrase',
|
|
153
159
|
[HardwareErrorCode.NotInitialized]: 'Not initialized',
|
|
154
160
|
[HardwareErrorCode.IFrameNotInitialized]: 'IFrame not initialized',
|
|
155
161
|
[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.38",
|
|
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": "5828c78b10fca8604e158ef425a8c7314ece2bbf"
|
|
29
29
|
}
|
package/src/HardwareError.ts
CHANGED
|
@@ -102,9 +102,25 @@ export const HardwareErrorCode = {
|
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Do not support passphrase
|
|
105
|
+
* @params: { require: string }
|
|
105
106
|
*/
|
|
106
107
|
DeviceNotSupportPassphrase: 111,
|
|
107
108
|
|
|
109
|
+
/*
|
|
110
|
+
* Device passphrase state error
|
|
111
|
+
*/
|
|
112
|
+
DeviceCheckPassphraseStateError: 112,
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* use passphrase, but passphrase is not opened
|
|
116
|
+
*/
|
|
117
|
+
DeviceNotOpenedPassphrase: 113,
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* not use passphrase, but passphrase is opened
|
|
121
|
+
*/
|
|
122
|
+
DeviceOpenedPassphrase: 114,
|
|
123
|
+
|
|
108
124
|
/**
|
|
109
125
|
* Not initialized
|
|
110
126
|
*/
|
|
@@ -281,6 +297,9 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
281
297
|
[HardwareErrorCode.DeviceUnexpectedBootloaderMode]: 'Device should be in bootloader mode',
|
|
282
298
|
[HardwareErrorCode.DeviceCheckDeviceIdError]: 'Device Id in the features is not same.',
|
|
283
299
|
[HardwareErrorCode.DeviceNotSupportPassphrase]: 'Device not support passphrase',
|
|
300
|
+
[HardwareErrorCode.DeviceCheckPassphraseStateError]: 'Device passphrase state error',
|
|
301
|
+
[HardwareErrorCode.DeviceNotOpenedPassphrase]: 'Device not opened passphrase',
|
|
302
|
+
[HardwareErrorCode.DeviceOpenedPassphrase]: 'Device opened passphrase',
|
|
284
303
|
|
|
285
304
|
/**
|
|
286
305
|
* Node Errors
|