@onekeyfe/hd-core 0.2.21 → 0.2.23

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.
@@ -8,6 +8,9 @@ export default class CosmosGetAddress extends BaseMethod<HardwareCosmosGetAddres
8
8
  model_mini: {
9
9
  min: string;
10
10
  };
11
+ model_touch: {
12
+ min: string;
13
+ };
11
14
  };
12
15
  run(): Promise<CosmosAddress | CosmosAddress[]>;
13
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CosmosGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/cosmos/CosmosGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAA0B,MAAM,aAAa,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,wBAAwB,EAAE,CAAC;IAClF,SAAS,UAAS;IAElB,IAAI;IAgCJ,eAAe;;;;;IAQT,GAAG;CAoBV"}
1
+ {"version":3,"file":"CosmosGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/cosmos/CosmosGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAA0B,MAAM,aAAa,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,wBAAwB,EAAE,CAAC;IAClF,SAAS,UAAS;IAElB,IAAI;IAgCJ,eAAe;;;;;;;;IAWT,GAAG;CAoBV"}
@@ -6,6 +6,9 @@ export default class CosmosGetPublicKey extends BaseMethod<any> {
6
6
  model_mini: {
7
7
  min: string;
8
8
  };
9
+ model_touch: {
10
+ min: string;
11
+ };
9
12
  };
10
13
  run(): Promise<{
11
14
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CosmosGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/api/cosmos/CosmosGetPublicKey.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,GAAG,CAAC;IAC7D,SAAS,UAAS;IAElB,IAAI;IAwCJ,eAAe;;;;;IAQT,GAAG;;;;;;;CAaV"}
1
+ {"version":3,"file":"CosmosGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/api/cosmos/CosmosGetPublicKey.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,GAAG,CAAC;IAC7D,SAAS,UAAS;IAElB,IAAI;IAwCJ,eAAe;;;;;;;;IAWT,GAAG;;;;;;;CAaV"}
@@ -7,6 +7,9 @@ export default class CosmosSignTransaction extends BaseMethod<HardwareCosmosSign
7
7
  model_mini: {
8
8
  min: string;
9
9
  };
10
+ model_touch: {
11
+ min: string;
12
+ };
10
13
  };
11
14
  run(): Promise<{
12
15
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CosmosSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/cosmos/CosmosSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,UAAU,CAAC,oBAAoB,CAAC;IACjF,SAAS,UAAS;IAElB,IAAI;IAoBJ,eAAe;;;;;IAQT,GAAG;;;;CAYV"}
1
+ {"version":3,"file":"CosmosSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/cosmos/CosmosSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,UAAU,CAAC,oBAAoB,CAAC;IACjF,SAAS,UAAS;IAElB,IAAI;IAoBJ,eAAe;;;;;;;;IAWT,GAAG;;;;CAYV"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceCommands.d.ts","sourceRoot":"","sources":["../../src/device/DeviceCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAe,MAAM,wBAAwB,CAAC;AAK/E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC,aAAK,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;AACxC,aAAK,UAAU,GAAG,MAAM,WAAW,CAAC;AACpC,oBAAY,oBAAoB,CAAC,CAAC,SAAS,UAAU,IAAI;IACvD,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;CACzB,CAAC;AACF,aAAK,oBAAoB,GAAG;KACzB,CAAC,IAAI,MAAM,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC;CAClD,CAAC;AACF,oBAAY,sBAAsB,GAAG,oBAAoB,CAAC,MAAM,WAAW,CAAC,CAAC;AAE7E,oBAAY,wBAAwB,GAAG;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAcF,qBAAa,cAAc;IACzB,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,SAAS,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ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AE,CAAC,EACV,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3C,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,UAAU,EAClD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,EACV,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAuC7B,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC;IAK3E,kBAAkB,CAChB,GAAG,EAAE,sBAAsB,EAC3B,QAAQ,EAAE,UAAU,GACnB,OAAO,CAAC,sBAAsB,CAAC;IAqHlC,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,oBAAoB;IAwB/C,iBAAiB;CA2BlB;AAED,oBAAY,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -11784,8 +11784,13 @@ class DeviceCommands {
11784
11784
  if (code === 'Failure_PinCancelled') {
11785
11785
  error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.PinCancelled);
11786
11786
  }
11787
- if (code === 'Failure_DataError' && message === 'Please confirm the BlindSign enabled') {
11788
- error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BlindSignDisabled);
11787
+ if (code === 'Failure_DataError') {
11788
+ if (message === 'Please confirm the BlindSign enabled') {
11789
+ error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BlindSignDisabled);
11790
+ }
11791
+ if (message === 'File already exists') {
11792
+ error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.FileAlreadyExists);
11793
+ }
11789
11794
  }
11790
11795
  if (code === 'Failure_UnexpectedMessage' && callType === 'PassphraseAck') {
11791
11796
  error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.UnexpectPassphrase);
@@ -16468,7 +16473,10 @@ class CosmosGetAddress extends BaseMethod {
16468
16473
  getVersionRange() {
16469
16474
  return {
16470
16475
  model_mini: {
16471
- min: '2.6.0',
16476
+ min: '2.10.0',
16477
+ },
16478
+ model_touch: {
16479
+ min: '4.0.0',
16472
16480
  },
16473
16481
  };
16474
16482
  }
@@ -16528,7 +16536,10 @@ class CosmosGetPublicKey extends BaseMethod {
16528
16536
  getVersionRange() {
16529
16537
  return {
16530
16538
  model_mini: {
16531
- min: '2.6.0',
16539
+ min: '2.10.0',
16540
+ },
16541
+ model_touch: {
16542
+ min: '4.0.0',
16532
16543
  },
16533
16544
  };
16534
16545
  }
@@ -16569,7 +16580,10 @@ class CosmosSignTransaction extends BaseMethod {
16569
16580
  getVersionRange() {
16570
16581
  return {
16571
16582
  model_mini: {
16572
- min: '2.6.0',
16583
+ min: '2.10.0',
16584
+ },
16585
+ model_touch: {
16586
+ min: '4.0.0',
16573
16587
  },
16574
16588
  };
16575
16589
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-core",
3
- "version": "0.2.21",
3
+ "version": "0.2.23",
4
4
  "description": "> TODO: description",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -24,8 +24,8 @@
24
24
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
25
25
  },
26
26
  "dependencies": {
27
- "@onekeyfe/hd-shared": "^0.2.21",
28
- "@onekeyfe/hd-transport": "^0.2.21",
27
+ "@onekeyfe/hd-shared": "^0.2.23",
28
+ "@onekeyfe/hd-transport": "^0.2.23",
29
29
  "axios": "^0.27.2",
30
30
  "bignumber.js": "^9.0.2",
31
31
  "jszip": "^3.10.1",
@@ -42,5 +42,5 @@
42
42
  "@types/semver": "^7.3.9",
43
43
  "ripple-keypairs": "^1.1.4"
44
44
  },
45
- "gitHead": "9c6e7dbad51e7133b18c8fcb5ff6bd1427bf1765"
45
+ "gitHead": "b8a1f2f6b0fdfff9166bc8dc121e0e5d97b42970"
46
46
  }
@@ -43,7 +43,10 @@ export default class CosmosGetAddress extends BaseMethod<HardwareCosmosGetAddres
43
43
  getVersionRange() {
44
44
  return {
45
45
  model_mini: {
46
- min: '2.6.0',
46
+ min: '2.10.0',
47
+ },
48
+ model_touch: {
49
+ min: '4.0.0',
47
50
  },
48
51
  };
49
52
  }
@@ -50,7 +50,10 @@ export default class CosmosGetPublicKey extends BaseMethod<any> {
50
50
  getVersionRange() {
51
51
  return {
52
52
  model_mini: {
53
- min: '2.6.0',
53
+ min: '2.10.0',
54
+ },
55
+ model_touch: {
56
+ min: '4.0.0',
54
57
  },
55
58
  };
56
59
  }
@@ -31,7 +31,10 @@ export default class CosmosSignTransaction extends BaseMethod<HardwareCosmosSign
31
31
  getVersionRange() {
32
32
  return {
33
33
  model_mini: {
34
- min: '2.6.0',
34
+ min: '2.10.0',
35
+ },
36
+ model_touch: {
37
+ min: '4.0.0',
35
38
  },
36
39
  };
37
40
  }
@@ -177,8 +177,13 @@ export class DeviceCommands {
177
177
  error = ERRORS.TypedError(HardwareErrorCode.PinCancelled);
178
178
  }
179
179
 
180
- if (code === 'Failure_DataError' && message === 'Please confirm the BlindSign enabled') {
181
- error = ERRORS.TypedError(HardwareErrorCode.BlindSignDisabled);
180
+ if (code === 'Failure_DataError') {
181
+ if (message === 'Please confirm the BlindSign enabled') {
182
+ error = ERRORS.TypedError(HardwareErrorCode.BlindSignDisabled);
183
+ }
184
+ if (message === 'File already exists') {
185
+ error = ERRORS.TypedError(HardwareErrorCode.FileAlreadyExists);
186
+ }
182
187
  }
183
188
 
184
189
  if (code === 'Failure_UnexpectedMessage' && callType === 'PassphraseAck') {