@onekeyfe/hd-shared 0.2.42 → 0.2.44
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
|
@@ -83,6 +83,7 @@ export declare const HardwareErrorCode: {
|
|
|
83
83
|
readonly UnexpectPassphrase: 812;
|
|
84
84
|
readonly FileAlreadyExists: 813;
|
|
85
85
|
readonly CheckDownloadFileError: 814;
|
|
86
|
+
readonly NotInSigningMode: 815;
|
|
86
87
|
};
|
|
87
88
|
export declare const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping;
|
|
88
89
|
export declare const TypedError: (hardwareError: ErrorCodeUnion | string, message?: string | undefined, params?: any) => HardwareError;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoSpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BAyG7B,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
|
@@ -92,6 +92,7 @@ declare const HardwareErrorCode: {
|
|
|
92
92
|
readonly UnexpectPassphrase: 812;
|
|
93
93
|
readonly FileAlreadyExists: 813;
|
|
94
94
|
readonly CheckDownloadFileError: 814;
|
|
95
|
+
readonly NotInSigningMode: 815;
|
|
95
96
|
};
|
|
96
97
|
declare const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping;
|
|
97
98
|
declare const TypedError: (hardwareError: ErrorCodeUnion | string, message?: string | undefined, params?: any) => HardwareError;
|
package/dist/index.js
CHANGED
|
@@ -152,6 +152,7 @@ const HardwareErrorCode = {
|
|
|
152
152
|
UnexpectPassphrase: 812,
|
|
153
153
|
FileAlreadyExists: 813,
|
|
154
154
|
CheckDownloadFileError: 814,
|
|
155
|
+
NotInSigningMode: 815,
|
|
155
156
|
};
|
|
156
157
|
const HardwareErrorCodeMessage = {
|
|
157
158
|
[HardwareErrorCode.UnknownError]: 'Unknown error occurred. Check message property.',
|
|
@@ -222,6 +223,7 @@ const HardwareErrorCodeMessage = {
|
|
|
222
223
|
[HardwareErrorCode.UnexpectPassphrase]: 'Unexpect passphrase',
|
|
223
224
|
[HardwareErrorCode.FileAlreadyExists]: 'File already exists',
|
|
224
225
|
[HardwareErrorCode.CheckDownloadFileError]: 'Check download file error',
|
|
226
|
+
[HardwareErrorCode.NotInSigningMode]: 'not in signing mode',
|
|
225
227
|
};
|
|
226
228
|
const TypedError = (hardwareError, message, params) => {
|
|
227
229
|
if (typeof hardwareError === 'string') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-shared",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.44",
|
|
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": "dae6e809970f54643948117040e35c9c14c437f9"
|
|
29
29
|
}
|
package/src/HardwareError.ts
CHANGED
|
@@ -330,6 +330,11 @@ export const HardwareErrorCode = {
|
|
|
330
330
|
* check file length error
|
|
331
331
|
*/
|
|
332
332
|
CheckDownloadFileError: 814,
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* not in signing mode
|
|
336
|
+
*/
|
|
337
|
+
NotInSigningMode: 815,
|
|
333
338
|
} as const;
|
|
334
339
|
|
|
335
340
|
export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
@@ -436,6 +441,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
436
441
|
[HardwareErrorCode.UnexpectPassphrase]: 'Unexpect passphrase',
|
|
437
442
|
[HardwareErrorCode.FileAlreadyExists]: 'File already exists',
|
|
438
443
|
[HardwareErrorCode.CheckDownloadFileError]: 'Check download file error',
|
|
444
|
+
[HardwareErrorCode.NotInSigningMode]: 'not in signing mode',
|
|
439
445
|
} as const;
|
|
440
446
|
|
|
441
447
|
export const TypedError = (
|