@onekeyfe/hd-shared 0.1.50 → 0.1.51
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 +3 -0
package/dist/HardwareError.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export declare const HardwareErrorCode: {
|
|
|
72
72
|
readonly PollingTimeout: 809;
|
|
73
73
|
readonly PollingStop: 810;
|
|
74
74
|
readonly BlindSignDisabled: 811;
|
|
75
|
+
readonly UnexpectPassphrase: 812;
|
|
75
76
|
};
|
|
76
77
|
export declare const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping;
|
|
77
78
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmPpB,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,+BA2F7B,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
|
@@ -81,6 +81,7 @@ declare const HardwareErrorCode: {
|
|
|
81
81
|
readonly PollingTimeout: 809;
|
|
82
82
|
readonly PollingStop: 810;
|
|
83
83
|
readonly BlindSignDisabled: 811;
|
|
84
|
+
readonly UnexpectPassphrase: 812;
|
|
84
85
|
};
|
|
85
86
|
declare const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping;
|
|
86
87
|
declare const TypedError: (hardwareError: ErrorCodeUnion | string, message?: string | undefined, params?: any) => HardwareError;
|
package/dist/index.js
CHANGED
|
@@ -141,6 +141,7 @@ const HardwareErrorCode = {
|
|
|
141
141
|
PollingTimeout: 809,
|
|
142
142
|
PollingStop: 810,
|
|
143
143
|
BlindSignDisabled: 811,
|
|
144
|
+
UnexpectPassphrase: 812,
|
|
144
145
|
};
|
|
145
146
|
const HardwareErrorCodeMessage = {
|
|
146
147
|
[HardwareErrorCode.UnknownError]: 'Unknown error occurred. Check message property.',
|
|
@@ -200,6 +201,7 @@ const HardwareErrorCodeMessage = {
|
|
|
200
201
|
[HardwareErrorCode.PollingTimeout]: 'Polling timeout',
|
|
201
202
|
[HardwareErrorCode.PollingStop]: 'Polling stop',
|
|
202
203
|
[HardwareErrorCode.BlindSignDisabled]: 'Please confirm the BlindSign enabled',
|
|
204
|
+
[HardwareErrorCode.UnexpectPassphrase]: 'Unexpect passphrase',
|
|
203
205
|
};
|
|
204
206
|
const TypedError = (hardwareError, message, params) => {
|
|
205
207
|
if (typeof hardwareError === 'string') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
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": "0bc84671cf1fabb0f50339407dd43ad82ff096b8"
|
|
29
29
|
}
|
package/src/HardwareError.ts
CHANGED
|
@@ -284,6 +284,8 @@ export const HardwareErrorCode = {
|
|
|
284
284
|
* Device does not open blid sign
|
|
285
285
|
*/
|
|
286
286
|
BlindSignDisabled: 811,
|
|
287
|
+
|
|
288
|
+
UnexpectPassphrase: 812,
|
|
287
289
|
} as const;
|
|
288
290
|
|
|
289
291
|
export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
@@ -376,6 +378,7 @@ export const HardwareErrorCodeMessage: HardwareErrorCodeMessageMapping = {
|
|
|
376
378
|
[HardwareErrorCode.PollingTimeout]: 'Polling timeout',
|
|
377
379
|
[HardwareErrorCode.PollingStop]: 'Polling stop',
|
|
378
380
|
[HardwareErrorCode.BlindSignDisabled]: 'Please confirm the BlindSign enabled',
|
|
381
|
+
[HardwareErrorCode.UnexpectPassphrase]: 'Unexpect passphrase',
|
|
379
382
|
} as const;
|
|
380
383
|
|
|
381
384
|
export const TypedError = (
|