@onekeyfe/hd-core 0.3.40-alpha.4 → 0.3.40

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.
Files changed (63) hide show
  1. package/dist/api/btc/BTCGetAddress.d.ts +0 -11
  2. package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
  3. package/dist/api/btc/BTCGetPublicKey.d.ts +0 -11
  4. package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
  5. package/dist/api/btc/BTCSignMessage.d.ts +0 -11
  6. package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
  7. package/dist/api/btc/BTCSignTransaction.d.ts +0 -11
  8. package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
  9. package/dist/api/btc/BTCVerifyMessage.d.ts +0 -11
  10. package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
  11. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  12. package/dist/api/index.d.ts +0 -2
  13. package/dist/api/index.d.ts.map +1 -1
  14. package/dist/api/sui/SuiSignTransaction.d.ts +3 -6
  15. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  16. package/dist/data-manager/DataManager.d.ts +1 -1
  17. package/dist/index.d.ts +6 -32
  18. package/dist/index.js +156 -202
  19. package/dist/inject.d.ts.map +1 -1
  20. package/dist/types/api/deviceUpdateBootloader.d.ts +1 -1
  21. package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
  22. package/dist/types/api/export.d.ts +0 -2
  23. package/dist/types/api/export.d.ts.map +1 -1
  24. package/dist/types/api/index.d.ts +0 -4
  25. package/dist/types/api/index.d.ts.map +1 -1
  26. package/dist/types/settings.d.ts +1 -1
  27. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  28. package/dist/utils/homescreen.d.ts +7 -232
  29. package/dist/utils/homescreen.d.ts.map +1 -1
  30. package/package.json +4 -4
  31. package/src/api/btc/BTCGetAddress.ts +0 -5
  32. package/src/api/btc/BTCGetPublicKey.ts +0 -5
  33. package/src/api/btc/BTCSignMessage.ts +0 -5
  34. package/src/api/btc/BTCSignTransaction.ts +0 -5
  35. package/src/api/btc/BTCVerifyMessage.ts +0 -5
  36. package/src/api/firmware/getBinary.ts +6 -7
  37. package/src/api/index.ts +0 -4
  38. package/src/api/sui/SuiSignTransaction.ts +11 -12
  39. package/src/data/coins/bitcoin.json +1 -2
  40. package/src/data/messages/messages.json +113 -4
  41. package/src/data-manager/DataManager.ts +1 -1
  42. package/src/inject.ts +0 -5
  43. package/src/types/api/deviceUpdateBootloader.ts +1 -1
  44. package/src/types/api/export.ts +0 -3
  45. package/src/types/api/index.ts +0 -8
  46. package/src/types/settings.ts +1 -1
  47. package/src/utils/deviceFeaturesUtils.ts +10 -8
  48. package/src/utils/homescreen.ts +21 -4
  49. package/dist/api/btc/helpers/versionLimit.d.ts +0 -12
  50. package/dist/api/btc/helpers/versionLimit.d.ts.map +0 -1
  51. package/dist/api/nervos/NervosGetAddress.d.ts +0 -17
  52. package/dist/api/nervos/NervosGetAddress.d.ts.map +0 -1
  53. package/dist/api/nervos/NervosSignTransaction.d.ts +0 -25
  54. package/dist/api/nervos/NervosSignTransaction.d.ts.map +0 -1
  55. package/dist/types/api/nervosGetAddress.d.ts +0 -15
  56. package/dist/types/api/nervosGetAddress.d.ts.map +0 -1
  57. package/dist/types/api/nervosSignTransaction.d.ts +0 -13
  58. package/dist/types/api/nervosSignTransaction.d.ts.map +0 -1
  59. package/src/api/btc/helpers/versionLimit.ts +0 -25
  60. package/src/api/nervos/NervosGetAddress.ts +0 -76
  61. package/src/api/nervos/NervosSignTransaction.ts +0 -113
  62. package/src/types/api/nervosGetAddress.ts +0 -24
  63. package/src/types/api/nervosSignTransaction.ts +0 -19
@@ -1,235 +1,10 @@
1
1
  import type { IDeviceType } from '../types';
2
- export declare const getT1Data: () => {
3
- default: {
4
- name: string;
5
- hex: string;
6
- };
7
- original: {
8
- name: string;
9
- hex: string;
10
- };
11
- circleweb: {
12
- name: string;
13
- hex: string;
14
- };
15
- circuit: {
16
- name: string;
17
- hex: string;
18
- };
19
- starweb: {
20
- name: string;
21
- hex: string;
22
- };
23
- stars: {
24
- name: string;
25
- hex: string;
26
- };
27
- bitcoin_b2: {
28
- name: string;
29
- hex: string;
30
- };
31
- bitcoin_shade: {
32
- name: string;
33
- hex: string;
34
- };
35
- bitcoin_b: {
36
- name: string;
37
- hex: string;
38
- };
39
- bitcoin_full: {
40
- name: string;
41
- hex: string;
42
- };
43
- bitcat: {
44
- name: string;
45
- hex: string;
46
- };
47
- nyancat: {
48
- name: string;
49
- hex: string;
50
- };
51
- coffee: {
52
- name: string;
53
- hex: string;
54
- };
55
- flower: {
56
- name: string;
57
- hex: string;
58
- };
59
- saturn: {
60
- name: string;
61
- hex: string;
62
- };
63
- jupiter: {
64
- name: string;
65
- hex: string;
66
- };
67
- einstein: {
68
- name: string;
69
- hex: string;
70
- };
71
- piggy: {
72
- name: string;
73
- hex: string;
74
- };
75
- honeybadger: {
76
- name: string;
77
- hex: string;
78
- };
79
- dragon: {
80
- name: string;
81
- hex: string;
82
- };
83
- narwal: {
84
- name: string;
85
- hex: string;
86
- };
87
- rabbit: {
88
- name: string;
89
- hex: string;
90
- };
91
- bunny: {
92
- name: string;
93
- hex: string;
94
- };
95
- rooster: {
96
- name: string;
97
- hex: string;
98
- };
99
- genesis: {
100
- name: string;
101
- hex: string;
102
- };
103
- my_bank: {
104
- name: string;
105
- hex: string;
106
- };
107
- candle: {
108
- name: string;
109
- hex: string;
110
- };
111
- ancap: {
112
- name: string;
113
- hex: string;
114
- };
115
- anonymous: {
116
- name: string;
117
- hex: string;
118
- };
119
- mushroom: {
120
- name: string;
121
- hex: string;
122
- };
123
- invader: {
124
- name: string;
125
- hex: string;
126
- };
127
- mtgox: {
128
- name: string;
129
- hex: string;
130
- };
131
- electrum: {
132
- name: string;
133
- hex: string;
134
- };
135
- mycelium: {
136
- name: string;
137
- hex: string;
138
- };
139
- ethereum: {
140
- name: string;
141
- hex: string;
142
- };
143
- litecoin: {
144
- name: string;
145
- hex: string;
146
- };
147
- myetherwallet: {
148
- name: string;
149
- hex: string;
150
- };
151
- zcash: {
152
- name: string;
153
- hex: string;
154
- };
155
- dash: {
156
- name: string;
157
- hex: string;
158
- };
159
- bitcoin_cash: {
160
- name: string;
161
- hex: string;
162
- };
163
- bitcoin_gold: {
164
- name: string;
165
- hex: string;
166
- };
167
- vertcoin: {
168
- name: string;
169
- hex: string;
170
- };
171
- namecoin: {
172
- name: string;
173
- hex: string;
174
- };
175
- monacoin: {
176
- name: string;
177
- hex: string;
178
- };
179
- doge: {
180
- name: string;
181
- hex: string;
182
- };
183
- digibyte: {
184
- name: string;
185
- hex: string;
186
- };
187
- decred: {
188
- name: string;
189
- hex: string;
190
- };
191
- multibit: {
192
- name: string;
193
- hex: string;
194
- };
195
- reddit: {
196
- name: string;
197
- hex: string;
198
- };
199
- hacker: {
200
- name: string;
201
- hex: string;
202
- };
203
- polis: {
204
- name: string;
205
- hex: string;
206
- };
207
- carlos: {
208
- name: string;
209
- hex: string;
210
- };
211
- xrc: {
212
- name: string;
213
- hex: string;
214
- };
2
+ type IScreenData = {
3
+ name: string;
4
+ hex: string;
215
5
  };
216
- export declare const getTouchData: () => {
217
- 'wallpaper-1': {
218
- name: string;
219
- hex: string;
220
- };
221
- 'wallpaper-2': {
222
- name: string;
223
- hex: string;
224
- };
225
- 'wallpaper-3': {
226
- name: string;
227
- hex: string;
228
- };
229
- 'wallpaper-4': {
230
- name: string;
231
- hex: string;
232
- };
233
- };
234
- export declare const getHomeScreenHex: (deviceType: IDeviceType, name: string) => any;
6
+ export declare const getT1Data: () => Record<string, IScreenData>;
7
+ export declare const getTouchData: () => Record<string, IScreenData>;
8
+ export declare const getHomeScreenHex: (deviceType: IDeviceType, name: string) => string;
9
+ export {};
235
10
  //# sourceMappingURL=homescreen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"homescreen.d.ts","sourceRoot":"","sources":["../../src/utils/homescreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqNpB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAiBvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,eAAgB,WAAW,QAAQ,MAAM,QAIrE,CAAC"}
1
+ {"version":3,"file":"homescreen.d.ts","sourceRoot":"","sources":["../../src/utils/homescreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,eAAO,MAAM,SAAS,QAAO,OAAO,MAAM,EAAE,WAAW,CAqNrD,CAAC;AAEH,eAAO,MAAM,YAAY,QAAO,OAAO,MAAM,EAAE,WAAW,CAiBxD,CAAC;AAEH,eAAO,MAAM,gBAAgB,eAAgB,WAAW,QAAQ,MAAM,WAmBrE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-core",
3
- "version": "0.3.40-alpha.4",
3
+ "version": "0.3.40",
4
4
  "description": "> TODO: description",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@onekeyfe/hd-shared": "^0.3.40-alpha.4",
29
- "@onekeyfe/hd-transport": "^0.3.40-alpha.4",
28
+ "@onekeyfe/hd-shared": "^0.3.40",
29
+ "@onekeyfe/hd-transport": "^0.3.40",
30
30
  "axios": "^0.27.2",
31
31
  "bignumber.js": "^9.0.2",
32
32
  "bytebuffer": "^5.0.1",
@@ -44,5 +44,5 @@
44
44
  "@types/semver": "^7.3.9",
45
45
  "ripple-keypairs": "^1.1.4"
46
46
  },
47
- "gitHead": "ca121236c3c500bf59b8ee1908268410e40bc135"
47
+ "gitHead": "52d3d532c27cfb63cb9e05a5d472a68d10b02e78"
48
48
  }
@@ -5,7 +5,6 @@ import { BaseMethod } from '../BaseMethod';
5
5
  import { validateParams } from '../helpers/paramsValidator';
6
6
  import { BTCAddress, BTCGetAddressParams } from '../../types/api/btcGetAddress';
7
7
  import { getCoinInfo } from './helpers/btcParamsUtils';
8
- import { getBitcoinForkVersionRange } from './helpers/versionLimit';
9
8
 
10
9
  export default class BTCGetAddress extends BaseMethod<GetAddress[]> {
11
10
  hasBundle = false;
@@ -55,10 +54,6 @@ export default class BTCGetAddress extends BaseMethod<GetAddress[]> {
55
54
  });
56
55
  }
57
56
 
58
- getVersionRange() {
59
- return getBitcoinForkVersionRange(this.params.map(param => param.coin_name));
60
- }
61
-
62
57
  async run() {
63
58
  const responses: BTCAddress[] = [];
64
59
 
@@ -6,7 +6,6 @@ import { validateParams } from '../helpers/paramsValidator';
6
6
  import { BTCGetAddressParams } from '../../types/api/btcGetAddress';
7
7
  import { getCoinInfo } from './helpers/btcParamsUtils';
8
8
  import { BTCPublicKey } from '../../types/api/btcGetPublicKey';
9
- import { getBitcoinForkVersionRange } from './helpers/versionLimit';
10
9
 
11
10
  export default class BTCGetPublicKey extends BaseMethod<GetPublicKey[]> {
12
11
  hasBundle = false;
@@ -59,10 +58,6 @@ export default class BTCGetPublicKey extends BaseMethod<GetPublicKey[]> {
59
58
  return param.coin_name === 'Testnet' || param.coin_name === 'Bitcoin';
60
59
  }
61
60
 
62
- getVersionRange() {
63
- return getBitcoinForkVersionRange(this.params.map(param => param.coin_name));
64
- }
65
-
66
61
  async run() {
67
62
  const responses: BTCPublicKey[] = [];
68
63
 
@@ -5,7 +5,6 @@ import { BaseMethod } from '../BaseMethod';
5
5
  import { validateParams } from '../helpers/paramsValidator';
6
6
  import { formatAnyHex } from '../helpers/hexUtils';
7
7
  import { getCoinAndScriptType } from './helpers/btcParamsUtils';
8
- import { getBitcoinForkVersionRange } from './helpers/versionLimit';
9
8
 
10
9
  export default class BTCSignMessage extends BaseMethod<SignMessage> {
11
10
  init() {
@@ -34,10 +33,6 @@ export default class BTCSignMessage extends BaseMethod<SignMessage> {
34
33
  };
35
34
  }
36
35
 
37
- getVersionRange() {
38
- return getBitcoinForkVersionRange([this.params.coin_name]);
39
- }
40
-
41
36
  async run() {
42
37
  const res = await this.device.commands.typedCall('SignMessage', 'MessageSignature', {
43
38
  ...this.params,
@@ -14,7 +14,6 @@ import {
14
14
  import signtx from './helpers/signtx';
15
15
  import signtxLegacy from './helpers/signtxLegacy';
16
16
  import { getCoinInfo } from './helpers/btcParamsUtils';
17
- import { getBitcoinForkVersionRange } from './helpers/versionLimit';
18
17
 
19
18
  type Params = {
20
19
  inputs: TxInputType[];
@@ -121,10 +120,6 @@ export default class BTCSignTransaction extends BaseMethod<Params> {
121
120
  };
122
121
  }
123
122
 
124
- getVersionRange() {
125
- return getBitcoinForkVersionRange([this.params.coinName]);
126
- }
127
-
128
123
  async run() {
129
124
  const { device, params } = this;
130
125
 
@@ -5,7 +5,6 @@ import { BaseMethod } from '../BaseMethod';
5
5
  import { validateParams } from '../helpers/paramsValidator';
6
6
  import { formatAnyHex } from '../helpers/hexUtils';
7
7
  import { getCoinInfo } from './helpers/btcParamsUtils';
8
- import { getBitcoinForkVersionRange } from './helpers/versionLimit';
9
8
 
10
9
  export default class BTCVerifyMessage extends BaseMethod<VerifyMessage> {
11
10
  init() {
@@ -32,10 +31,6 @@ export default class BTCVerifyMessage extends BaseMethod<VerifyMessage> {
32
31
  };
33
32
  }
34
33
 
35
- getVersionRange() {
36
- return getBitcoinForkVersionRange([this.params.coin_name]);
37
- }
38
-
39
34
  async run() {
40
35
  const res = await this.device.commands.typedCall('VerifyMessage', 'Success', {
41
36
  ...this.params,
@@ -30,13 +30,12 @@ export const getBinary = async ({
30
30
  throw ERRORS.TypedError(HardwareErrorCode.RuntimeError, 'no firmware found for this device');
31
31
  }
32
32
 
33
- // temporary disable version check
34
- // if (version && !semver.eq(releaseInfo.version.join('.'), version.join('.'))) {
35
- // const touchWithoutVersion = getDeviceType(features) === 'touch' && !features.onekey_version;
36
- // if (!touchWithoutVersion) {
37
- // throw ERRORS.TypedError(HardwareErrorCode.RuntimeError, 'firmware version mismatch');
38
- // }
39
- // }
33
+ if (version && !semver.eq(releaseInfo.version.join('.'), version.join('.'))) {
34
+ const touchWithoutVersion = getDeviceType(features) === 'touch' && !features.onekey_version;
35
+ if (!touchWithoutVersion) {
36
+ throw ERRORS.TypedError(HardwareErrorCode.RuntimeError, 'firmware version mismatch');
37
+ }
38
+ }
40
39
 
41
40
  const url =
42
41
  // eslint-disable-next-line no-nested-ternary
package/src/api/index.ts CHANGED
@@ -113,8 +113,4 @@ export { default as nostrSignEvent } from './nostr/NostrSignEvent';
113
113
  export { default as nostrEncryptMessage } from './nostr/NostrEncryptMessage';
114
114
  export { default as nostrDecryptMessage } from './nostr/NostrDecryptMessage';
115
115
  export { default as nostrSignSchnorr } from './nostr/NostrSignSchnorr';
116
-
117
116
  export { default as lnurlAuth } from './lightning/LnurlAuth';
118
-
119
- export { default as nervosGetAddress } from './nervos/NervosGetAddress';
120
- export { default as nervosSignTransaction } from './nervos/NervosSignTransaction';
@@ -9,9 +9,7 @@ import { getDeviceFirmwareVersion, getDeviceType } from '../../utils/deviceFeatu
9
9
  import { DeviceModelToTypes } from '../../types';
10
10
  import type { TypedResponseMessage } from '../../device/DeviceCommands';
11
11
 
12
- type SuiSignTx = Omit<HardwareSuiSignTx, 'data_initial_chunk' | 'data_length'> & HardwareSuiSignTx;
13
-
14
- export default class SuiSignTransaction extends BaseMethod<SuiSignTx> {
12
+ export default class SuiSignTransaction extends BaseMethod<HardwareSuiSignTx> {
15
13
  init() {
16
14
  this.checkDeviceId = true;
17
15
  this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
@@ -61,12 +59,12 @@ export default class SuiSignTransaction extends BaseMethod<SuiSignTx> {
61
59
  return false;
62
60
  }
63
61
 
64
- chunkByteSize = 1024;
62
+ chunkSize = 1024;
65
63
 
66
64
  processTxRequest = async (
67
65
  typedCall: TypedCall,
68
66
  res: TypedResponseMessage<'SuiSignedTx'> | TypedResponseMessage<'SuiTxRequest'>,
69
- data: Buffer,
67
+ data: string,
70
68
  offset = 0
71
69
  ): Promise<SuiSignedTx> => {
72
70
  if (res.type === 'SuiSignedTx') {
@@ -80,10 +78,10 @@ export default class SuiSignTransaction extends BaseMethod<SuiSignTx> {
80
78
  return res.message;
81
79
  }
82
80
 
83
- const payload = data.subarray(offset, offset + data_length);
81
+ const payload = data.slice(offset, offset + data_length * 2);
84
82
  const newOffset = offset + payload.length;
85
83
  const resourceAckParams = {
86
- data_chunk: payload.toString('hex'),
84
+ data_chunk: payload,
87
85
  };
88
86
 
89
87
  const response = await typedCall('SuiTxAck', ['SuiSignedTx', 'SuiTxRequest'], {
@@ -95,17 +93,18 @@ export default class SuiSignTransaction extends BaseMethod<SuiSignTx> {
95
93
 
96
94
  async run() {
97
95
  const typedCall = this.device.getCommands().typedCall.bind(this.device.getCommands());
96
+ const dataLength = this.params.raw_tx.length / 2;
98
97
  let offset = 0;
99
- let data: Buffer;
98
+ let data = '';
100
99
 
101
100
  if (this.supportChunkTransfer()) {
102
- offset = this.chunkByteSize;
103
- data = Buffer.from(this.params.raw_tx, 'hex');
101
+ offset = this.chunkSize;
102
+ data = this.params.raw_tx;
104
103
  this.params = {
105
104
  address_n: this.params.address_n,
106
105
  raw_tx: '',
107
- data_initial_chunk: data.subarray(0, this.chunkByteSize).toString('hex'),
108
- data_length: data.length,
106
+ data_initial_chunk: this.params.raw_tx.slice(0, this.chunkSize * 2),
107
+ data_length: dataLength,
109
108
  };
110
109
  }
111
110
 
@@ -39,6 +39,5 @@
39
39
  { "name": "Viacoin", "label": "VIA", "slip44": 14 },
40
40
  { "name": "ZCore", "label": "ZCR", "slip44": 428 },
41
41
  { "name": "Zcash", "label": "ZEC", "slip44": 133 },
42
- { "name": "Zcash Testnet", "label": "TAZ", "slip44": 1 },
43
- { "name": "Neurai", "label": "XNA", "slip44": 1900 }
42
+ { "name": "Zcash Testnet", "label": "TAZ", "slip44": 1 }
44
43
  ]
@@ -5686,15 +5686,15 @@
5686
5686
  "type": "bytes",
5687
5687
  "id": 605
5688
5688
  },
5689
- "onekey_se_version": {
5689
+ "onekey_se01_version": {
5690
5690
  "type": "string",
5691
5691
  "id": 606
5692
5692
  },
5693
- "onekey_se_hash": {
5693
+ "onekey_se01_hash": {
5694
5694
  "type": "bytes",
5695
5695
  "id": 607
5696
5696
  },
5697
- "onekey_se_build_id": {
5697
+ "onekey_se01_build_id": {
5698
5698
  "type": "string",
5699
5699
  "id": 608
5700
5700
  },
@@ -5733,6 +5733,110 @@
5733
5733
  "onekey_ble_hash": {
5734
5734
  "type": "bytes",
5735
5735
  "id": 617
5736
+ },
5737
+ "onekey_board_build_id": {
5738
+ "type": "string",
5739
+ "id": 618
5740
+ },
5741
+ "onekey_se01_boot_version": {
5742
+ "type": "string",
5743
+ "id": 619
5744
+ },
5745
+ "onekey_se01_boot_hash": {
5746
+ "type": "bytes",
5747
+ "id": 620
5748
+ },
5749
+ "onekey_se01_boot_build_id": {
5750
+ "type": "string",
5751
+ "id": 621
5752
+ },
5753
+ "onekey_se02_version": {
5754
+ "type": "string",
5755
+ "id": 622
5756
+ },
5757
+ "onekey_se02_hash": {
5758
+ "type": "bytes",
5759
+ "id": 623
5760
+ },
5761
+ "onekey_se02_build_id": {
5762
+ "type": "string",
5763
+ "id": 624
5764
+ },
5765
+ "onekey_se02_boot_version": {
5766
+ "type": "string",
5767
+ "id": 625
5768
+ },
5769
+ "onekey_se02_boot_hash": {
5770
+ "type": "bytes",
5771
+ "id": 626
5772
+ },
5773
+ "onekey_se02_boot_build_id": {
5774
+ "type": "string",
5775
+ "id": 627
5776
+ },
5777
+ "onekey_se03_version": {
5778
+ "type": "string",
5779
+ "id": 628
5780
+ },
5781
+ "onekey_se03_hash": {
5782
+ "type": "bytes",
5783
+ "id": 629
5784
+ },
5785
+ "onekey_se03_build_id": {
5786
+ "type": "string",
5787
+ "id": 630
5788
+ },
5789
+ "onekey_se03_boot_version": {
5790
+ "type": "string",
5791
+ "id": 631
5792
+ },
5793
+ "onekey_se03_boot_hash": {
5794
+ "type": "bytes",
5795
+ "id": 632
5796
+ },
5797
+ "onekey_se03_boot_build_id": {
5798
+ "type": "string",
5799
+ "id": 633
5800
+ },
5801
+ "onekey_se04_version": {
5802
+ "type": "string",
5803
+ "id": 634
5804
+ },
5805
+ "onekey_se04_hash": {
5806
+ "type": "bytes",
5807
+ "id": 635
5808
+ },
5809
+ "onekey_se04_build_id": {
5810
+ "type": "string",
5811
+ "id": 636
5812
+ },
5813
+ "onekey_se04_boot_version": {
5814
+ "type": "string",
5815
+ "id": 637
5816
+ },
5817
+ "onekey_se04_boot_hash": {
5818
+ "type": "bytes",
5819
+ "id": 638
5820
+ },
5821
+ "onekey_se04_boot_build_id": {
5822
+ "type": "string",
5823
+ "id": 639
5824
+ },
5825
+ "onekey_se01_state": {
5826
+ "type": "OneKeySEState",
5827
+ "id": 640
5828
+ },
5829
+ "onekey_se02_state": {
5830
+ "type": "OneKeySEState",
5831
+ "id": 641
5832
+ },
5833
+ "onekey_se03_state": {
5834
+ "type": "OneKeySEState",
5835
+ "id": 642
5836
+ },
5837
+ "onekey_se04_state": {
5838
+ "type": "OneKeySEState",
5839
+ "id": 643
5736
5840
  }
5737
5841
  },
5738
5842
  "nested": {
@@ -5766,7 +5870,6 @@
5766
5870
  "CLASSIC1S": 1,
5767
5871
  "MINI": 2,
5768
5872
  "TOUCH": 3,
5769
- "TOUCH_PRO": 4,
5770
5873
  "PRO": 5
5771
5874
  }
5772
5875
  },
@@ -5775,6 +5878,12 @@
5775
5878
  "THD89": 0,
5776
5879
  "SE608A": 1
5777
5880
  }
5881
+ },
5882
+ "OneKeySEState": {
5883
+ "values": {
5884
+ "BOOT": 0,
5885
+ "APP": 1
5886
+ }
5778
5887
  }
5779
5888
  }
5780
5889
  },
@@ -24,7 +24,7 @@ import type {
24
24
  import { DeviceModelToTypes } from '../types';
25
25
  import { findLatestRelease, getReleaseChangelog, getReleaseStatus } from '../utils/release';
26
26
 
27
- export type FirmwareField = 'firmware' | 'firmware-v2' | 'firmware-v4';
27
+ export type FirmwareField = 'firmware' | 'firmware-v2' | 'firmware-v5';
28
28
 
29
29
  export type MessageVersion = 'latest' | 'v1';
30
30
 
package/src/inject.ts CHANGED
@@ -282,9 +282,4 @@ export const createCoreApi = (
282
282
  call({ ...params, connectId, deviceId, method: 'nostrSignSchnorr' }),
283
283
  lnurlAuth: (connectId, deviceId, params) =>
284
284
  call({ ...params, connectId, deviceId, method: 'lnurlAuth' }),
285
-
286
- nervosGetAddress: (connectId, deviceId, params) =>
287
- call({ ...params, connectId, deviceId, method: 'nervosGetAddress' }),
288
- nervosSignTransaction: (connectId, deviceId, params) =>
289
- call({ ...params, connectId, deviceId, method: 'nervosSignTransaction' }),
290
285
  });
@@ -3,7 +3,7 @@ import type { Response } from '../params';
3
3
 
4
4
  export declare function deviceUpdateBootloader(
5
5
  connectId: string,
6
- params?: {
6
+ params: {
7
7
  binary?: ArrayBuffer;
8
8
  }
9
9
  ): Response<Success>;
@@ -146,6 +146,3 @@ export type {
146
146
  NexaSignInputParams,
147
147
  NexaSignOutputParams,
148
148
  } from './nexaSignTransaction';
149
-
150
- export type { NervosAddress, NervosGetAddressParams } from './nervosGetAddress';
151
- export type { NervosSignedTx, NervosSignTransactionParams } from './nervosSignTransaction';
@@ -119,8 +119,6 @@ import { nostrDecryptMessage } from './nostrDecryptMessage';
119
119
  import { nostrSignSchnorr } from './nostrSignSchnorr';
120
120
 
121
121
  import { lnurlAuth } from './lnurlAuth';
122
- import { nervosGetAddress } from './nervosGetAddress';
123
- import { nervosSignTransaction } from './nervosSignTransaction';
124
122
 
125
123
  export * from './export';
126
124
 
@@ -325,10 +323,4 @@ export type CoreApi = {
325
323
  * Lightning Network
326
324
  */
327
325
  lnurlAuth: typeof lnurlAuth;
328
-
329
- /**
330
- * Nervos Network
331
- */
332
- nervosGetAddress: typeof nervosGetAddress;
333
- nervosSignTransaction: typeof nervosSignTransaction;
334
326
  };