@onekeyfe/hd-core 1.1.26-alpha.2 → 1.1.26-alpha.30
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/__tests__/protocol-v2.test.ts +912 -0
- package/dist/api/DirList.d.ts +10 -0
- package/dist/api/DirList.d.ts.map +1 -0
- package/dist/api/DirMake.d.ts +9 -0
- package/dist/api/DirMake.d.ts.map +1 -0
- package/dist/api/DirRemove.d.ts +9 -0
- package/dist/api/DirRemove.d.ts.map +1 -0
- package/dist/api/FileDelete.d.ts +9 -0
- package/dist/api/FileDelete.d.ts.map +1 -0
- package/dist/api/FileRead.d.ts +19 -0
- package/dist/api/FileRead.d.ts.map +1 -0
- package/dist/api/FileWrite.d.ts +23 -0
- package/dist/api/FileWrite.d.ts.map +1 -0
- package/dist/api/FirmwareUpdateV3.d.ts +1 -0
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +32 -0
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -0
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/PathInfo.d.ts +9 -0
- package/dist/api/PathInfo.d.ts.map +1 -0
- package/dist/api/SearchDevices.d.ts +2 -1
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +10 -2
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/index.d.ts +27 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/protocol-v2/DevFirmwareUpdate.d.ts +7 -0
- package/dist/api/protocol-v2/DevFirmwareUpdate.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevGetDeviceInfo.d.ts +7 -0
- package/dist/api/protocol-v2/DevGetDeviceInfo.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevGetFirmwareUpdateStatus.d.ts +6 -0
- package/dist/api/protocol-v2/DevGetFirmwareUpdateStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevGetOnboardingStatus.d.ts +6 -0
- package/dist/api/protocol-v2/DevGetOnboardingStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevReboot.d.ts +7 -0
- package/dist/api/protocol-v2/DevReboot.d.ts.map +1 -0
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +7 -0
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +1 -0
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +6 -0
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts +6 -0
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts +6 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -0
- package/dist/api/protocol-v2/GetProtoVersion.d.ts +6 -0
- package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +1 -0
- package/dist/api/protocol-v2/Ping.d.ts +8 -0
- package/dist/api/protocol-v2/Ping.d.ts.map +1 -0
- package/dist/api/protocol-v2/helpers.d.ts +49 -0
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -0
- package/dist/api/ton/TonSignData.d.ts +7 -0
- package/dist/api/ton/TonSignData.d.ts.map +1 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +4 -2
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/TransportManager.d.ts +2 -1
- package/dist/data-manager/TransportManager.d.ts.map +1 -1
- package/dist/device/Device.d.ts +5 -3
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +12 -12
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts +2 -1
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +8 -0
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +207 -23
- package/dist/index.js +2815 -182
- package/dist/inject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/features.d.ts +56 -0
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/firmware.d.ts +12 -0
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/index.d.ts +3 -0
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -0
- package/dist/types/api/export.d.ts +2 -1
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +7 -0
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +30 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +123 -0
- package/dist/types/api/protocolV2.d.ts.map +1 -0
- package/dist/types/api/searchDevices.d.ts +2 -2
- package/dist/types/api/searchDevices.d.ts.map +1 -1
- package/dist/types/api/tonSignData.d.ts +18 -0
- package/dist/types/api/tonSignData.d.ts.map +1 -0
- package/dist/types/device.d.ts +1 -1
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +2 -0
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +1 -1
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/dist/utils/versionUtils.d.ts +1 -1
- package/package.json +5 -5
- package/src/api/DirList.ts +25 -0
- package/src/api/DirMake.ts +20 -0
- package/src/api/DirRemove.ts +20 -0
- package/src/api/FileDelete.ts +20 -0
- package/src/api/FileRead.ts +161 -0
- package/src/api/FileWrite.ts +191 -0
- package/src/api/FirmwareUpdateV3.ts +21 -4
- package/src/api/FirmwareUpdateV4.ts +810 -0
- package/src/api/GetOnekeyFeatures.ts +75 -3
- package/src/api/PathInfo.ts +24 -0
- package/src/api/SearchDevices.ts +7 -2
- package/src/api/alephium/AlephiumSignTransaction.ts +6 -5
- package/src/api/device/DeviceRebootToBoardloader.ts +10 -1
- package/src/api/device/DeviceRebootToBootloader.ts +10 -1
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +27 -4
- package/src/api/index.ts +29 -0
- package/src/api/protocol-v2/DevFirmwareUpdate.ts +33 -0
- package/src/api/protocol-v2/DevGetDeviceInfo.ts +35 -0
- package/src/api/protocol-v2/DevGetFirmwareUpdateStatus.ts +18 -0
- package/src/api/protocol-v2/DevGetOnboardingStatus.ts +18 -0
- package/src/api/protocol-v2/DevReboot.ts +22 -0
- package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +27 -0
- package/src/api/protocol-v2/FactoryGetDeviceInfo.ts +18 -0
- package/src/api/protocol-v2/FilesystemFixPermission.ts +14 -0
- package/src/api/protocol-v2/FilesystemFormat.ts +14 -0
- package/src/api/protocol-v2/GetProtoVersion.ts +14 -0
- package/src/api/protocol-v2/Ping.ts +16 -0
- package/src/api/protocol-v2/helpers.ts +140 -0
- package/src/api/ton/TonSignData.ts +60 -0
- package/src/constants/index.ts +1 -1
- package/src/core/index.ts +19 -2
- package/src/data/messages/messages-pro2.json +733 -0
- package/src/data/messages/messages.json +98 -0
- package/src/data-manager/DataManager.ts +6 -2
- package/src/data-manager/TransportManager.ts +29 -3
- package/src/device/Device.ts +66 -8
- package/src/device/DeviceCommands.ts +160 -26
- package/src/device/DeviceConnector.ts +29 -4
- package/src/device/DevicePool.ts +1 -1
- package/src/events/ui-request.ts +8 -0
- package/src/inject.ts +45 -1
- package/src/protocols/protocol-v2/features.ts +259 -0
- package/src/protocols/protocol-v2/firmware.ts +26 -0
- package/src/protocols/protocol-v2/index.ts +2 -0
- package/src/types/api/export.ts +2 -0
- package/src/types/api/firmwareUpdate.ts +12 -0
- package/src/types/api/index.ts +65 -1
- package/src/types/api/protocolV2.ts +221 -0
- package/src/types/api/searchDevices.ts +2 -2
- package/src/types/api/tonSignData.ts +29 -0
- package/src/types/device.ts +3 -1
- package/src/types/params.ts +7 -0
- package/src/types/settings.ts +1 -1
- package/src/utils/deviceInfoUtils.ts +9 -5
|
@@ -0,0 +1,733 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nested": {
|
|
3
|
+
"GetProtoVersion": {
|
|
4
|
+
"fields": {}
|
|
5
|
+
},
|
|
6
|
+
"ProtoVersion": {
|
|
7
|
+
"fields": {
|
|
8
|
+
"proto_version": {
|
|
9
|
+
"rule": "required",
|
|
10
|
+
"type": "uint32",
|
|
11
|
+
"id": 1
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"Ping": {
|
|
16
|
+
"fields": {
|
|
17
|
+
"message": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"id": 1,
|
|
20
|
+
"options": {
|
|
21
|
+
"default": ""
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"Success": {
|
|
27
|
+
"fields": {
|
|
28
|
+
"message": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"id": 1,
|
|
31
|
+
"options": {
|
|
32
|
+
"default": ""
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"Failure": {
|
|
38
|
+
"fields": {
|
|
39
|
+
"code": {
|
|
40
|
+
"type": "FailureType",
|
|
41
|
+
"id": 1
|
|
42
|
+
},
|
|
43
|
+
"message": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"id": 2
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"nested": {
|
|
49
|
+
"FailureType": {
|
|
50
|
+
"values": {
|
|
51
|
+
"Failure_UnexpectedMessage": 1,
|
|
52
|
+
"Failure_ButtonExpected": 2,
|
|
53
|
+
"Failure_DataError": 3,
|
|
54
|
+
"Failure_ActionCancelled": 4,
|
|
55
|
+
"Failure_PinExpected": 5,
|
|
56
|
+
"Failure_PinCancelled": 6,
|
|
57
|
+
"Failure_PinInvalid": 7,
|
|
58
|
+
"Failure_InvalidSignature": 8,
|
|
59
|
+
"Failure_ProcessError": 9,
|
|
60
|
+
"Failure_NotEnoughFunds": 10,
|
|
61
|
+
"Failure_NotInitialized": 11,
|
|
62
|
+
"Failure_PinMismatch": 12,
|
|
63
|
+
"Failure_WipeCodeMismatch": 13,
|
|
64
|
+
"Failure_InvalidSession": 14,
|
|
65
|
+
"Failure_FirmwareError": 99
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"DevRebootType": {
|
|
71
|
+
"values": {
|
|
72
|
+
"Normal": 0,
|
|
73
|
+
"Boardloader": 1,
|
|
74
|
+
"Bootloader": 2
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"DevReboot": {
|
|
78
|
+
"fields": {
|
|
79
|
+
"reboot_type": {
|
|
80
|
+
"rule": "required",
|
|
81
|
+
"type": "DevRebootType",
|
|
82
|
+
"id": 1
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"DeviceType": {
|
|
87
|
+
"values": {
|
|
88
|
+
"CLASSIC1": 0,
|
|
89
|
+
"CLASSIC1S": 1,
|
|
90
|
+
"MINI": 2,
|
|
91
|
+
"TOUCH": 3,
|
|
92
|
+
"PRO": 5,
|
|
93
|
+
"CLASSIC1S_PURE": 6
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"DevSeType": {
|
|
97
|
+
"values": {
|
|
98
|
+
"THD89": 0,
|
|
99
|
+
"SE608A": 1
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"DevSEState": {
|
|
103
|
+
"values": {
|
|
104
|
+
"BOOT": 0,
|
|
105
|
+
"APP_FACTORY": 51,
|
|
106
|
+
"APP": 85
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"DevFirmwareImageInfo": {
|
|
110
|
+
"fields": {
|
|
111
|
+
"version": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"id": 10
|
|
114
|
+
},
|
|
115
|
+
"build_id": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"id": 20
|
|
118
|
+
},
|
|
119
|
+
"hash": {
|
|
120
|
+
"type": "bytes",
|
|
121
|
+
"id": 30
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"DevHardwareInfo": {
|
|
126
|
+
"fields": {
|
|
127
|
+
"device_type": {
|
|
128
|
+
"type": "DeviceType",
|
|
129
|
+
"id": 10
|
|
130
|
+
},
|
|
131
|
+
"serial_no": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"id": 11
|
|
134
|
+
},
|
|
135
|
+
"hardware_version": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"id": 100
|
|
138
|
+
},
|
|
139
|
+
"hardware_version_raw_adc": {
|
|
140
|
+
"type": "uint32",
|
|
141
|
+
"id": 101
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"DevMainMcuInfo": {
|
|
146
|
+
"fields": {
|
|
147
|
+
"board": {
|
|
148
|
+
"type": "DevFirmwareImageInfo",
|
|
149
|
+
"id": 10
|
|
150
|
+
},
|
|
151
|
+
"boot": {
|
|
152
|
+
"type": "DevFirmwareImageInfo",
|
|
153
|
+
"id": 20
|
|
154
|
+
},
|
|
155
|
+
"app": {
|
|
156
|
+
"type": "DevFirmwareImageInfo",
|
|
157
|
+
"id": 30
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"DevBluetoothInfo": {
|
|
162
|
+
"fields": {
|
|
163
|
+
"boot": {
|
|
164
|
+
"type": "DevFirmwareImageInfo",
|
|
165
|
+
"id": 20
|
|
166
|
+
},
|
|
167
|
+
"app": {
|
|
168
|
+
"type": "DevFirmwareImageInfo",
|
|
169
|
+
"id": 30
|
|
170
|
+
},
|
|
171
|
+
"adv_name": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"id": 100
|
|
174
|
+
},
|
|
175
|
+
"mac": {
|
|
176
|
+
"type": "bytes",
|
|
177
|
+
"id": 110
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"DevSEInfo": {
|
|
182
|
+
"fields": {
|
|
183
|
+
"boot": {
|
|
184
|
+
"type": "DevFirmwareImageInfo",
|
|
185
|
+
"id": 20
|
|
186
|
+
},
|
|
187
|
+
"app": {
|
|
188
|
+
"type": "DevFirmwareImageInfo",
|
|
189
|
+
"id": 30
|
|
190
|
+
},
|
|
191
|
+
"type": {
|
|
192
|
+
"type": "DevSeType",
|
|
193
|
+
"id": 100
|
|
194
|
+
},
|
|
195
|
+
"state": {
|
|
196
|
+
"type": "DevSEState",
|
|
197
|
+
"id": 110
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"DevInfoTargets": {
|
|
202
|
+
"fields": {
|
|
203
|
+
"hw": {
|
|
204
|
+
"type": "bool",
|
|
205
|
+
"id": 100
|
|
206
|
+
},
|
|
207
|
+
"fw": {
|
|
208
|
+
"type": "bool",
|
|
209
|
+
"id": 200
|
|
210
|
+
},
|
|
211
|
+
"bt": {
|
|
212
|
+
"type": "bool",
|
|
213
|
+
"id": 300
|
|
214
|
+
},
|
|
215
|
+
"se1": {
|
|
216
|
+
"type": "bool",
|
|
217
|
+
"id": 400
|
|
218
|
+
},
|
|
219
|
+
"se2": {
|
|
220
|
+
"type": "bool",
|
|
221
|
+
"id": 410
|
|
222
|
+
},
|
|
223
|
+
"se3": {
|
|
224
|
+
"type": "bool",
|
|
225
|
+
"id": 420
|
|
226
|
+
},
|
|
227
|
+
"se4": {
|
|
228
|
+
"type": "bool",
|
|
229
|
+
"id": 430
|
|
230
|
+
},
|
|
231
|
+
"status": {
|
|
232
|
+
"type": "bool",
|
|
233
|
+
"id": 10000
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"DevInfoTypes": {
|
|
238
|
+
"fields": {
|
|
239
|
+
"version": {
|
|
240
|
+
"type": "bool",
|
|
241
|
+
"id": 10
|
|
242
|
+
},
|
|
243
|
+
"build_id": {
|
|
244
|
+
"type": "bool",
|
|
245
|
+
"id": 20
|
|
246
|
+
},
|
|
247
|
+
"hash": {
|
|
248
|
+
"type": "bool",
|
|
249
|
+
"id": 30
|
|
250
|
+
},
|
|
251
|
+
"specific": {
|
|
252
|
+
"type": "bool",
|
|
253
|
+
"id": 40
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"DevStatus": {
|
|
258
|
+
"fields": {
|
|
259
|
+
"language": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"id": 100
|
|
262
|
+
},
|
|
263
|
+
"bt_enable": {
|
|
264
|
+
"type": "bool",
|
|
265
|
+
"id": 101
|
|
266
|
+
},
|
|
267
|
+
"init_states": {
|
|
268
|
+
"type": "bool",
|
|
269
|
+
"id": 102
|
|
270
|
+
},
|
|
271
|
+
"backup_required": {
|
|
272
|
+
"type": "bool",
|
|
273
|
+
"id": 200
|
|
274
|
+
},
|
|
275
|
+
"passphrase_protection": {
|
|
276
|
+
"type": "bool",
|
|
277
|
+
"id": 201
|
|
278
|
+
},
|
|
279
|
+
"label": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"id": 300
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"DevGetDeviceInfo": {
|
|
286
|
+
"fields": {
|
|
287
|
+
"targets": {
|
|
288
|
+
"type": "DevInfoTargets",
|
|
289
|
+
"id": 1
|
|
290
|
+
},
|
|
291
|
+
"types": {
|
|
292
|
+
"type": "DevInfoTypes",
|
|
293
|
+
"id": 2
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"DeviceInfo": {
|
|
298
|
+
"fields": {
|
|
299
|
+
"protocol_version": {
|
|
300
|
+
"rule": "required",
|
|
301
|
+
"type": "uint32",
|
|
302
|
+
"id": 1
|
|
303
|
+
},
|
|
304
|
+
"hw": {
|
|
305
|
+
"type": "DevHardwareInfo",
|
|
306
|
+
"id": 100
|
|
307
|
+
},
|
|
308
|
+
"fw": {
|
|
309
|
+
"type": "DevMainMcuInfo",
|
|
310
|
+
"id": 200
|
|
311
|
+
},
|
|
312
|
+
"bt": {
|
|
313
|
+
"type": "DevBluetoothInfo",
|
|
314
|
+
"id": 300
|
|
315
|
+
},
|
|
316
|
+
"se1": {
|
|
317
|
+
"type": "DevSEInfo",
|
|
318
|
+
"id": 400
|
|
319
|
+
},
|
|
320
|
+
"se2": {
|
|
321
|
+
"type": "DevSEInfo",
|
|
322
|
+
"id": 410
|
|
323
|
+
},
|
|
324
|
+
"se3": {
|
|
325
|
+
"type": "DevSEInfo",
|
|
326
|
+
"id": 420
|
|
327
|
+
},
|
|
328
|
+
"se4": {
|
|
329
|
+
"type": "DevSEInfo",
|
|
330
|
+
"id": 430
|
|
331
|
+
},
|
|
332
|
+
"status": {
|
|
333
|
+
"type": "DevStatus",
|
|
334
|
+
"id": 10000
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"DevGetOnboardingStatus": {
|
|
339
|
+
"fields": {}
|
|
340
|
+
},
|
|
341
|
+
"DevOnboardingStatus": {
|
|
342
|
+
"fields": {
|
|
343
|
+
"page_index": {
|
|
344
|
+
"type": "uint32",
|
|
345
|
+
"id": 1
|
|
346
|
+
},
|
|
347
|
+
"page_count": {
|
|
348
|
+
"type": "uint32",
|
|
349
|
+
"id": 2
|
|
350
|
+
},
|
|
351
|
+
"page_name": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"id": 3
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"DevFirmwareTargetType": {
|
|
358
|
+
"values": {
|
|
359
|
+
"TARGET_MAIN_APP": 0,
|
|
360
|
+
"TARGET_MAIN_BOOT": 1,
|
|
361
|
+
"TARGET_BT": 2,
|
|
362
|
+
"TARGET_SE1": 3,
|
|
363
|
+
"TARGET_SE2": 4,
|
|
364
|
+
"TARGET_SE3": 5,
|
|
365
|
+
"TARGET_SE4": 6,
|
|
366
|
+
"TARGET_RESOURCE": 10
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"DevFirmwareTarget": {
|
|
370
|
+
"fields": {
|
|
371
|
+
"target_id": {
|
|
372
|
+
"rule": "required",
|
|
373
|
+
"type": "DevFirmwareTargetType",
|
|
374
|
+
"id": 1
|
|
375
|
+
},
|
|
376
|
+
"path": {
|
|
377
|
+
"rule": "required",
|
|
378
|
+
"type": "string",
|
|
379
|
+
"id": 2
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"DevFirmwareUpdate": {
|
|
384
|
+
"fields": {
|
|
385
|
+
"targets": {
|
|
386
|
+
"rule": "repeated",
|
|
387
|
+
"type": "DevFirmwareTarget",
|
|
388
|
+
"id": 1
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"DevFirmwareInstallProgress": {
|
|
393
|
+
"fields": {
|
|
394
|
+
"target_id": {
|
|
395
|
+
"rule": "required",
|
|
396
|
+
"type": "DevFirmwareTargetType",
|
|
397
|
+
"id": 1
|
|
398
|
+
},
|
|
399
|
+
"progress": {
|
|
400
|
+
"rule": "required",
|
|
401
|
+
"type": "uint32",
|
|
402
|
+
"id": 2
|
|
403
|
+
},
|
|
404
|
+
"stage": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"id": 3
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"DevFirmwareUpdateStatusEntry": {
|
|
411
|
+
"fields": {
|
|
412
|
+
"target_id": {
|
|
413
|
+
"rule": "required",
|
|
414
|
+
"type": "DevFirmwareTargetType",
|
|
415
|
+
"id": 1
|
|
416
|
+
},
|
|
417
|
+
"status": {
|
|
418
|
+
"rule": "required",
|
|
419
|
+
"type": "uint32",
|
|
420
|
+
"id": 2
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"DevGetFirmwareUpdateStatus": {
|
|
425
|
+
"fields": {}
|
|
426
|
+
},
|
|
427
|
+
"DevFirmwareUpdateStatus": {
|
|
428
|
+
"fields": {
|
|
429
|
+
"targets": {
|
|
430
|
+
"rule": "repeated",
|
|
431
|
+
"type": "DevFirmwareUpdateStatusEntry",
|
|
432
|
+
"id": 1
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"FactoryDeviceInfoSettings": {
|
|
437
|
+
"fields": {
|
|
438
|
+
"serial_no": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"id": 1
|
|
441
|
+
},
|
|
442
|
+
"cpu_info": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"id": 2
|
|
445
|
+
},
|
|
446
|
+
"pre_firmware": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"id": 3
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"FactoryGetDeviceInfo": {
|
|
453
|
+
"fields": {}
|
|
454
|
+
},
|
|
455
|
+
"FactoryDeviceInfo": {
|
|
456
|
+
"fields": {
|
|
457
|
+
"serial_no": {
|
|
458
|
+
"type": "string",
|
|
459
|
+
"id": 1
|
|
460
|
+
},
|
|
461
|
+
"spi_flash_info": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"id": 2
|
|
464
|
+
},
|
|
465
|
+
"se_info": {
|
|
466
|
+
"type": "string",
|
|
467
|
+
"id": 3
|
|
468
|
+
},
|
|
469
|
+
"nft_voucher": {
|
|
470
|
+
"type": "bytes",
|
|
471
|
+
"id": 4
|
|
472
|
+
},
|
|
473
|
+
"cpu_info": {
|
|
474
|
+
"type": "string",
|
|
475
|
+
"id": 5
|
|
476
|
+
},
|
|
477
|
+
"pre_firmware": {
|
|
478
|
+
"type": "string",
|
|
479
|
+
"id": 6
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"FilesystemFixPermission": {
|
|
484
|
+
"fields": {}
|
|
485
|
+
},
|
|
486
|
+
"FilesystemPathInfo": {
|
|
487
|
+
"fields": {
|
|
488
|
+
"exist": {
|
|
489
|
+
"rule": "required",
|
|
490
|
+
"type": "bool",
|
|
491
|
+
"id": 1
|
|
492
|
+
},
|
|
493
|
+
"size": {
|
|
494
|
+
"rule": "required",
|
|
495
|
+
"type": "uint64",
|
|
496
|
+
"id": 2
|
|
497
|
+
},
|
|
498
|
+
"year": {
|
|
499
|
+
"rule": "required",
|
|
500
|
+
"type": "uint32",
|
|
501
|
+
"id": 3
|
|
502
|
+
},
|
|
503
|
+
"month": {
|
|
504
|
+
"rule": "required",
|
|
505
|
+
"type": "uint32",
|
|
506
|
+
"id": 4
|
|
507
|
+
},
|
|
508
|
+
"day": {
|
|
509
|
+
"rule": "required",
|
|
510
|
+
"type": "uint32",
|
|
511
|
+
"id": 5
|
|
512
|
+
},
|
|
513
|
+
"hour": {
|
|
514
|
+
"rule": "required",
|
|
515
|
+
"type": "uint32",
|
|
516
|
+
"id": 6
|
|
517
|
+
},
|
|
518
|
+
"minute": {
|
|
519
|
+
"rule": "required",
|
|
520
|
+
"type": "uint32",
|
|
521
|
+
"id": 7
|
|
522
|
+
},
|
|
523
|
+
"second": {
|
|
524
|
+
"rule": "required",
|
|
525
|
+
"type": "uint32",
|
|
526
|
+
"id": 8
|
|
527
|
+
},
|
|
528
|
+
"readonly": {
|
|
529
|
+
"rule": "required",
|
|
530
|
+
"type": "bool",
|
|
531
|
+
"id": 9
|
|
532
|
+
},
|
|
533
|
+
"hidden": {
|
|
534
|
+
"rule": "required",
|
|
535
|
+
"type": "bool",
|
|
536
|
+
"id": 10
|
|
537
|
+
},
|
|
538
|
+
"system": {
|
|
539
|
+
"rule": "required",
|
|
540
|
+
"type": "bool",
|
|
541
|
+
"id": 11
|
|
542
|
+
},
|
|
543
|
+
"archive": {
|
|
544
|
+
"rule": "required",
|
|
545
|
+
"type": "bool",
|
|
546
|
+
"id": 12
|
|
547
|
+
},
|
|
548
|
+
"directory": {
|
|
549
|
+
"rule": "required",
|
|
550
|
+
"type": "bool",
|
|
551
|
+
"id": 13
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"FilesystemPathInfoQuery": {
|
|
556
|
+
"fields": {
|
|
557
|
+
"path": {
|
|
558
|
+
"rule": "required",
|
|
559
|
+
"type": "string",
|
|
560
|
+
"id": 1
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"FilesystemFile": {
|
|
565
|
+
"fields": {
|
|
566
|
+
"path": {
|
|
567
|
+
"rule": "required",
|
|
568
|
+
"type": "string",
|
|
569
|
+
"id": 1
|
|
570
|
+
},
|
|
571
|
+
"offset": {
|
|
572
|
+
"rule": "required",
|
|
573
|
+
"type": "uint32",
|
|
574
|
+
"id": 2
|
|
575
|
+
},
|
|
576
|
+
"total_size": {
|
|
577
|
+
"rule": "required",
|
|
578
|
+
"type": "uint32",
|
|
579
|
+
"id": 3
|
|
580
|
+
},
|
|
581
|
+
"data": {
|
|
582
|
+
"type": "bytes",
|
|
583
|
+
"id": 4
|
|
584
|
+
},
|
|
585
|
+
"data_hash": {
|
|
586
|
+
"type": "uint32",
|
|
587
|
+
"id": 5
|
|
588
|
+
},
|
|
589
|
+
"processed_byte": {
|
|
590
|
+
"type": "uint32",
|
|
591
|
+
"id": 6
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
"FilesystemFileRead": {
|
|
596
|
+
"fields": {
|
|
597
|
+
"file": {
|
|
598
|
+
"rule": "required",
|
|
599
|
+
"type": "FilesystemFile",
|
|
600
|
+
"id": 1
|
|
601
|
+
},
|
|
602
|
+
"chunk_len": {
|
|
603
|
+
"type": "uint32",
|
|
604
|
+
"id": 2
|
|
605
|
+
},
|
|
606
|
+
"ui_percentage": {
|
|
607
|
+
"type": "uint32",
|
|
608
|
+
"id": 3
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"FilesystemFileWrite": {
|
|
613
|
+
"fields": {
|
|
614
|
+
"file": {
|
|
615
|
+
"rule": "required",
|
|
616
|
+
"type": "FilesystemFile",
|
|
617
|
+
"id": 1
|
|
618
|
+
},
|
|
619
|
+
"overwrite": {
|
|
620
|
+
"rule": "required",
|
|
621
|
+
"type": "bool",
|
|
622
|
+
"id": 2
|
|
623
|
+
},
|
|
624
|
+
"append": {
|
|
625
|
+
"rule": "required",
|
|
626
|
+
"type": "bool",
|
|
627
|
+
"id": 3
|
|
628
|
+
},
|
|
629
|
+
"ui_percentage": {
|
|
630
|
+
"type": "uint32",
|
|
631
|
+
"id": 4
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"FilesystemFileDelete": {
|
|
636
|
+
"fields": {
|
|
637
|
+
"path": {
|
|
638
|
+
"rule": "required",
|
|
639
|
+
"type": "string",
|
|
640
|
+
"id": 1
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"FilesystemDir": {
|
|
645
|
+
"fields": {
|
|
646
|
+
"path": {
|
|
647
|
+
"rule": "required",
|
|
648
|
+
"type": "string",
|
|
649
|
+
"id": 1
|
|
650
|
+
},
|
|
651
|
+
"child_dirs": {
|
|
652
|
+
"type": "string",
|
|
653
|
+
"id": 2
|
|
654
|
+
},
|
|
655
|
+
"child_files": {
|
|
656
|
+
"type": "string",
|
|
657
|
+
"id": 3
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"FilesystemDirList": {
|
|
662
|
+
"fields": {
|
|
663
|
+
"path": {
|
|
664
|
+
"rule": "required",
|
|
665
|
+
"type": "string",
|
|
666
|
+
"id": 1
|
|
667
|
+
},
|
|
668
|
+
"depth": {
|
|
669
|
+
"type": "uint32",
|
|
670
|
+
"id": 2,
|
|
671
|
+
"options": {
|
|
672
|
+
"default": 0
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
"FilesystemDirMake": {
|
|
678
|
+
"fields": {
|
|
679
|
+
"path": {
|
|
680
|
+
"rule": "required",
|
|
681
|
+
"type": "string",
|
|
682
|
+
"id": 1
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
"FilesystemDirRemove": {
|
|
687
|
+
"fields": {
|
|
688
|
+
"path": {
|
|
689
|
+
"rule": "required",
|
|
690
|
+
"type": "string",
|
|
691
|
+
"id": 1
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"FilesystemFormat": {
|
|
696
|
+
"fields": {}
|
|
697
|
+
},
|
|
698
|
+
"MessageType": {
|
|
699
|
+
"values": {
|
|
700
|
+
"MessageType_FactoryDeviceInfoSettings": 60000,
|
|
701
|
+
"MessageType_FactoryGetDeviceInfo": 60001,
|
|
702
|
+
"MessageType_FactoryDeviceInfo": 60002,
|
|
703
|
+
"MessageType_GetProtoVersion": 60200,
|
|
704
|
+
"MessageType_ProtoVersion": 60201,
|
|
705
|
+
"MessageType_StartSession": 60205,
|
|
706
|
+
"MessageType_Ping": 60206,
|
|
707
|
+
"MessageType_Success": 60207,
|
|
708
|
+
"MessageType_Failure": 60208,
|
|
709
|
+
"MessageType_DevReboot": 60400,
|
|
710
|
+
"MessageType_DevGetDeviceInfo": 60600,
|
|
711
|
+
"MessageType_DeviceInfo": 60601,
|
|
712
|
+
"MessageType_DevGetOnboardingStatus": 60602,
|
|
713
|
+
"MessageType_DevOnboardingStatus": 60603,
|
|
714
|
+
"MessageType_FilesystemFixPermission": 60800,
|
|
715
|
+
"MessageType_FilesystemPathInfo": 60801,
|
|
716
|
+
"MessageType_FilesystemPathInfoQuery": 60802,
|
|
717
|
+
"MessageType_FilesystemFile": 60803,
|
|
718
|
+
"MessageType_FilesystemFileRead": 60804,
|
|
719
|
+
"MessageType_FilesystemFileWrite": 60805,
|
|
720
|
+
"MessageType_FilesystemFileDelete": 60806,
|
|
721
|
+
"MessageType_FilesystemDir": 60807,
|
|
722
|
+
"MessageType_FilesystemDirList": 60808,
|
|
723
|
+
"MessageType_FilesystemDirMake": 60809,
|
|
724
|
+
"MessageType_FilesystemDirRemove": 60810,
|
|
725
|
+
"MessageType_FilesystemFormat": 60811,
|
|
726
|
+
"MessageType_DevFirmwareUpdate": 61000,
|
|
727
|
+
"MessageType_DevFirmwareInstallProgress": 61001,
|
|
728
|
+
"MessageType_DevGetFirmwareUpdateStatus": 61002,
|
|
729
|
+
"MessageType_DevFirmwareUpdateStatus": 61003
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|