@onekeyfe/hd-shared 1.2.0-alpha.24 → 1.2.0-alpha.26
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 +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/src/HardwareError.test.ts +9 -0
- package/src/HardwareError.ts +5 -5
package/dist/HardwareError.d.ts
CHANGED
|
@@ -115,8 +115,8 @@ export declare const HardwareErrorCode: {
|
|
|
115
115
|
readonly DeviceSettingsLanguageNotSupport: 826;
|
|
116
116
|
readonly TooManyInputs: 827;
|
|
117
117
|
readonly PinMismatch: 828;
|
|
118
|
-
readonly
|
|
119
|
-
readonly
|
|
118
|
+
readonly KaspaPrevTxIdMismatch: 829;
|
|
119
|
+
readonly DeviceLocked: 830;
|
|
120
120
|
readonly WalletSessionInvalid: 831;
|
|
121
121
|
readonly LowlevelTrasnportConnectError: 900;
|
|
122
122
|
readonly WebDeviceNotFoundOrNeedsPermission: 901;
|
package/dist/index.d.ts
CHANGED
|
@@ -415,14 +415,14 @@ declare const HardwareErrorCode: {
|
|
|
415
415
|
*/
|
|
416
416
|
readonly PinMismatch: 828;
|
|
417
417
|
/**
|
|
418
|
-
*
|
|
419
|
-
* @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
|
|
418
|
+
* Device refused to sign: refTxs don't match the spent input's outpoint
|
|
420
419
|
*/
|
|
421
|
-
readonly
|
|
420
|
+
readonly KaspaPrevTxIdMismatch: 829;
|
|
422
421
|
/**
|
|
423
|
-
*
|
|
422
|
+
* Protocol V2 device must be unlocked before the requested operation.
|
|
423
|
+
* @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
|
|
424
424
|
*/
|
|
425
|
-
readonly
|
|
425
|
+
readonly DeviceLocked: 830;
|
|
426
426
|
/**
|
|
427
427
|
* The cached wallet session is invalid or has expired.
|
|
428
428
|
* @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
|
package/dist/index.js
CHANGED
|
@@ -164,8 +164,8 @@ const HardwareErrorCode = {
|
|
|
164
164
|
DeviceSettingsLanguageNotSupport: 826,
|
|
165
165
|
TooManyInputs: 827,
|
|
166
166
|
PinMismatch: 828,
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
KaspaPrevTxIdMismatch: 829,
|
|
168
|
+
DeviceLocked: 830,
|
|
169
169
|
WalletSessionInvalid: 831,
|
|
170
170
|
LowlevelTrasnportConnectError: 900,
|
|
171
171
|
WebDeviceNotFoundOrNeedsPermission: 901,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-shared",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.26",
|
|
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": "1401fef3eb93f5a83ed5e8375b99181b7aaa6054"
|
|
29
29
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HardwareErrorCode } from './HardwareError';
|
|
2
|
+
|
|
3
|
+
describe('HardwareErrorCode compatibility', () => {
|
|
4
|
+
test('preserves published values when adding Protocol V2 errors', () => {
|
|
5
|
+
expect(HardwareErrorCode.KaspaPrevTxIdMismatch).toBe(829);
|
|
6
|
+
expect(HardwareErrorCode.DeviceLocked).toBe(830);
|
|
7
|
+
expect(HardwareErrorCode.WalletSessionInvalid).toBe(831);
|
|
8
|
+
});
|
|
9
|
+
});
|
package/src/HardwareError.ts
CHANGED
|
@@ -485,15 +485,15 @@ export const HardwareErrorCode = {
|
|
|
485
485
|
PinMismatch: 828,
|
|
486
486
|
|
|
487
487
|
/**
|
|
488
|
-
*
|
|
489
|
-
* @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
|
|
488
|
+
* Device refused to sign: refTxs don't match the spent input's outpoint
|
|
490
489
|
*/
|
|
491
|
-
|
|
490
|
+
KaspaPrevTxIdMismatch: 829,
|
|
492
491
|
|
|
493
492
|
/**
|
|
494
|
-
*
|
|
493
|
+
* Protocol V2 device must be unlocked before the requested operation.
|
|
494
|
+
* @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
|
|
495
495
|
*/
|
|
496
|
-
|
|
496
|
+
DeviceLocked: 830,
|
|
497
497
|
|
|
498
498
|
/**
|
|
499
499
|
* The cached wallet session is invalid or has expired.
|