@onekeyfe/hd-shared 0.2.35 → 0.2.37
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
|
@@ -81,6 +81,7 @@ export declare const HardwareErrorCode: {
|
|
|
81
81
|
readonly BlindSignDisabled: 811;
|
|
82
82
|
readonly UnexpectPassphrase: 812;
|
|
83
83
|
readonly FileAlreadyExists: 813;
|
|
84
|
+
readonly CheckDownloadFileError: 814;
|
|
84
85
|
};
|
|
85
86
|
export declare const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping;
|
|
86
87
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyRpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BAuG7B,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
|
@@ -90,6 +90,7 @@ declare const HardwareErrorCode: {
|
|
|
90
90
|
readonly BlindSignDisabled: 811;
|
|
91
91
|
readonly UnexpectPassphrase: 812;
|
|
92
92
|
readonly FileAlreadyExists: 813;
|
|
93
|
+
readonly CheckDownloadFileError: 814;
|
|
93
94
|
};
|
|
94
95
|
declare const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping;
|
|
95
96
|
declare const TypedError: (hardwareError: ErrorCodeUnion | string, message?: string | undefined, params?: any) => HardwareError;
|
package/dist/index.js
CHANGED
|
@@ -150,6 +150,7 @@ const HardwareErrorCode = {
|
|
|
150
150
|
BlindSignDisabled: 811,
|
|
151
151
|
UnexpectPassphrase: 812,
|
|
152
152
|
FileAlreadyExists: 813,
|
|
153
|
+
CheckDownloadFileError: 814,
|
|
153
154
|
};
|
|
154
155
|
const HardwareErrorCodeMessage = {
|
|
155
156
|
[HardwareErrorCode.UnknownError]: 'Unknown error occurred. Check message property.',
|
|
@@ -218,6 +219,7 @@ const HardwareErrorCodeMessage = {
|
|
|
218
219
|
[HardwareErrorCode.BlindSignDisabled]: 'Please confirm the BlindSign enabled',
|
|
219
220
|
[HardwareErrorCode.UnexpectPassphrase]: 'Unexpect passphrase',
|
|
220
221
|
[HardwareErrorCode.FileAlreadyExists]: 'File already exists',
|
|
222
|
+
[HardwareErrorCode.CheckDownloadFileError]: 'Check download file error',
|
|
221
223
|
};
|
|
222
224
|
const TypedError = (hardwareError, message, params) => {
|
|
223
225
|
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.37",
|
|
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": "5d80d2bdb1f7e5863286c3e59064c858b245b3ca"
|
|
29
29
|
}
|
package/src/HardwareError.ts
CHANGED
|
@@ -319,6 +319,11 @@ export const HardwareErrorCode = {
|
|
|
319
319
|
* NFT file already exists
|
|
320
320
|
*/
|
|
321
321
|
FileAlreadyExists: 813,
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* check file length error
|
|
325
|
+
*/
|
|
326
|
+
CheckDownloadFileError: 814,
|
|
322
327
|
} as const;
|
|
323
328
|
|
|
324
329
|
export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
@@ -423,6 +428,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
423
428
|
[HardwareErrorCode.BlindSignDisabled]: 'Please confirm the BlindSign enabled',
|
|
424
429
|
[HardwareErrorCode.UnexpectPassphrase]: 'Unexpect passphrase',
|
|
425
430
|
[HardwareErrorCode.FileAlreadyExists]: 'File already exists',
|
|
431
|
+
[HardwareErrorCode.CheckDownloadFileError]: 'Check download file error',
|
|
426
432
|
} as const;
|
|
427
433
|
|
|
428
434
|
export const TypedError = (
|