@onekeyfe/hd-transport 1.2.0-alpha.1 → 1.2.0-alpha.10

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 (44) hide show
  1. package/README.md +1 -1
  2. package/__tests__/messages.test.js +76 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +326 -0
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +296 -0
  5. package/__tests__/protocol-v2.test.js +249 -81
  6. package/dist/constants.d.ts +4 -2
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/index.d.ts +501 -234
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +420 -72
  11. package/dist/protocols/index.d.ts +2 -0
  12. package/dist/protocols/index.d.ts.map +1 -1
  13. package/dist/protocols/v2/constants.d.ts +1 -0
  14. package/dist/protocols/v2/constants.d.ts.map +1 -1
  15. package/dist/protocols/v2/decode.d.ts +1 -0
  16. package/dist/protocols/v2/decode.d.ts.map +1 -1
  17. package/dist/protocols/v2/link-manager.d.ts +35 -0
  18. package/dist/protocols/v2/link-manager.d.ts.map +1 -0
  19. package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
  20. package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
  21. package/dist/protocols/v2/session.d.ts +16 -4
  22. package/dist/protocols/v2/session.d.ts.map +1 -1
  23. package/dist/protocols/v2/usb-transport-base.d.ts +31 -0
  24. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
  25. package/dist/serialization/protobuf/messages.d.ts.map +1 -1
  26. package/dist/types/messages.d.ts +291 -155
  27. package/dist/types/messages.d.ts.map +1 -1
  28. package/dist/types/transport.d.ts +1 -1
  29. package/dist/types/transport.d.ts.map +1 -1
  30. package/messages-protocol-v2.json +599 -1033
  31. package/package.json +2 -2
  32. package/scripts/protobuf-build.sh +60 -142
  33. package/src/constants.ts +8 -2
  34. package/src/index.ts +8 -0
  35. package/src/protocols/index.ts +4 -1
  36. package/src/protocols/v2/constants.ts +1 -0
  37. package/src/protocols/v2/decode.ts +36 -17
  38. package/src/protocols/v2/link-manager.ts +160 -0
  39. package/src/protocols/v2/sequence-cursor.ts +10 -0
  40. package/src/protocols/v2/session.ts +80 -45
  41. package/src/protocols/v2/usb-transport-base.ts +194 -0
  42. package/src/serialization/protobuf/messages.ts +6 -1
  43. package/src/types/messages.ts +359 -185
  44. package/src/types/transport.ts +1 -1
@@ -100,7 +100,6 @@
100
100
  "MessageType_GetFeatures": 55,
101
101
  "MessageType_SdProtect": 79,
102
102
  "MessageType_ChangeWipeCode": 82,
103
- "MessageType_EndSession": 83,
104
103
  "MessageType_DoPreauthorized": 84,
105
104
  "MessageType_PreauthorizedRequest": 85,
106
105
  "MessageType_CancelAuthorization": 86,
@@ -196,6 +195,7 @@
196
195
  "MessageType_EthereumGnosisSafeTxAck": 20118,
197
196
  "MessageType_EthereumGnosisSafeTxRequest": 20119,
198
197
  "MessageType_EthereumSignTxEIP7702OneKey": 20120,
198
+ "MessageType_EthereumSignTypedDataQR": 20121,
199
199
  "MessageType_NEMGetAddress": 67,
200
200
  "MessageType_NEMAddress": 68,
201
201
  "MessageType_NEMSignTx": 69,
@@ -419,8 +419,6 @@
419
419
  "MessageType_TonSignProof": 11905,
420
420
  "MessageType_TonSignedProof": 11906,
421
421
  "MessageType_TonTxAck": 11907,
422
- "MessageType_TonSignData": 11908,
423
- "MessageType_TonSignedData": 11909,
424
422
  "MessageType_ScdoGetAddress": 12001,
425
423
  "MessageType_ScdoAddress": 12002,
426
424
  "MessageType_ScdoSignTx": 12003,
@@ -450,46 +448,44 @@
450
448
  "MessageType_NeoAddress": 12302,
451
449
  "MessageType_NeoSignTx": 12303,
452
450
  "MessageType_NeoSignedTx": 12304,
453
- "MessageType_ReadSEPublicKey": 10004,
454
- "MessageType_SEPublicKey": 10005,
455
- "MessageType_WriteSEPublicCert": 10006,
456
- "MessageType_ReadSEPublicCert": 10007,
457
- "MessageType_SEPublicCert": 10008,
458
- "MessageType_SESignMessage": 10012,
459
- "MessageType_SEMessageSignature": 10013,
460
- "MessageType_ResourceUpload": 10018,
461
- "MessageType_ZoomRequest": 10019,
462
- "MessageType_BlurRequest": 10032,
463
- "MessageType_SetWallpaper": 10033,
464
- "MessageType_GetWallpaper": 10034,
465
- "MessageType_Wallpaper": 10035,
466
- "MessageType_ResourceRequest": 10020,
467
- "MessageType_ResourceAck": 10021,
468
- "MessageType_ResourceUpdate": 10022,
469
- "MessageType_ListResDir": 10023,
470
- "MessageType_FileInfoList": 10024,
471
- "MessageType_OnekeyGetFeatures": 10025,
472
- "MessageType_OnekeyFeatures": 10026,
473
- "MessageType_WriteSEPrivateKey": 10027,
474
- "MessageType_GetPassphraseState": 10028,
475
- "MessageType_PassphraseState": 10029,
476
- "MessageType_UnLockDevice": 10030,
477
- "MessageType_UnLockDeviceResponse": 10031,
478
- "MessageType_FactoryDeviceInfoSettings": 60000,
479
- "MessageType_FactoryGetDeviceInfo": 60001,
480
- "MessageType_FactoryDeviceInfo": 60002,
481
- "MessageType_GetProtoVersion": 60200,
482
- "MessageType_ProtoVersion": 60201,
483
- "MessageType_StartSession": 60205,
451
+ "MessageType_UiviewShowAddressRequest": 30200,
452
+ "MessageType_UiviewShowPublicKeyRequest": 30201,
453
+ "MessageType_UiviewConfirmTxRequest": 30202,
454
+ "MessageType_UiviewConfirmSignMessageRequest": 30203,
455
+ "MessageType_UiviewResponse": 30204,
456
+ "MessageType_DeviceFactoryInfoSet": 60000,
457
+ "MessageType_DeviceFactoryInfoGet": 60001,
458
+ "MessageType_DeviceFactoryInfo": 60002,
459
+ "MessageType_DeviceFactoryPermanentLock": 60003,
460
+ "MessageType_DeviceFactoryTest": 60004,
461
+ "MessageType_ProtocolInfoRequest": 60200,
462
+ "MessageType_ProtocolInfo": 60201,
484
463
  "MessageType_Ping": 60206,
485
464
  "MessageType_Success": 60207,
486
465
  "MessageType_Failure": 60208,
487
- "MessageType_DevReboot": 60400,
488
- "MessageType_DevGetDeviceInfo": 60600,
466
+ "MessageType_DeviceReboot": 60400,
467
+ "MessageType_DeviceSettings": 60410,
468
+ "MessageType_DeviceSettingsGet": 60411,
469
+ "MessageType_DeviceSettingsSet": 60412,
470
+ "MessageType_DeviceCertificate": 60420,
471
+ "MessageType_DeviceCertificateWrite": 60421,
472
+ "MessageType_DeviceCertificateRead": 60422,
473
+ "MessageType_DeviceCertificateSignature": 60423,
474
+ "MessageType_DeviceCertificateSign": 60424,
475
+ "MessageType_SetWallpaper": 60430,
476
+ "MessageType_GetWallpaper": 60431,
477
+ "MessageType_Wallpaper": 60432,
478
+ "MessageType_DeviceInfoGet": 60600,
489
479
  "MessageType_DeviceInfo": 60601,
490
- "MessageType_GetOnboardingStatus": 60602,
491
- "MessageType_OnboardingStatus": 60603,
492
- "MessageType_FilesystemFixPermission": 60800,
480
+ "MessageType_DeviceStatusGet": 60602,
481
+ "MessageType_DeviceStatus": 60603,
482
+ "MessageType_DevGetOnboardingStatus": 60604,
483
+ "MessageType_DevOnboardingStatus": 60605,
484
+ "MessageType_DeviceSessionGet": 60606,
485
+ "MessageType_DeviceSession": 60607,
486
+ "MessageType_DeviceSessionAskPin": 60608,
487
+ "MessageType_DeviceSessionPinResult": 60609,
488
+ "MessageType_FilesystemPermissionFix": 60800,
493
489
  "MessageType_FilesystemPathInfo": 60801,
494
490
  "MessageType_FilesystemPathInfoQuery": 60802,
495
491
  "MessageType_FilesystemFile": 60803,
@@ -501,11 +497,17 @@
501
497
  "MessageType_FilesystemDirMake": 60809,
502
498
  "MessageType_FilesystemDirRemove": 60810,
503
499
  "MessageType_FilesystemFormat": 60811,
504
- "MessageType_DevFirmwareUpdate": 61000,
505
- "MessageType_DevFirmwareInstallProgress": 61001,
506
- "MessageType_DevGetFirmwareUpdateStatus": 61002,
507
- "MessageType_DevFirmwareUpdateStatus": 61003
508
- }
500
+ "MessageType_DeviceFirmwareUpdateRequest": 61000,
501
+ "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
502
+ "MessageType_DeviceFirmwareUpdateStatus": 61002,
503
+ "MessageType_PortfolioUpdate": 61200
504
+ },
505
+ "reserved": [
506
+ [90, 92],
507
+ [114, 122],
508
+ [300, 304],
509
+ [309, 312]
510
+ ]
509
511
  },
510
512
  "AlephiumGetAddress": {
511
513
  "fields": {
@@ -4094,207 +4096,6 @@
4094
4096
  }
4095
4097
  }
4096
4098
  },
4097
- "DebugLinkInput": {
4098
- "fields": {
4099
- "x": {
4100
- "type": "uint32",
4101
- "id": 1
4102
- },
4103
- "y": {
4104
- "type": "uint32",
4105
- "id": 2
4106
- },
4107
- "duration_ms": {
4108
- "type": "uint32",
4109
- "id": 3
4110
- },
4111
- "x_end": {
4112
- "type": "uint32",
4113
- "id": 4
4114
- },
4115
- "y_end": {
4116
- "type": "uint32",
4117
- "id": 5
4118
- }
4119
- }
4120
- },
4121
- "DebugLinkLayout": {
4122
- "fields": {
4123
- "lines": {
4124
- "rule": "repeated",
4125
- "type": "string",
4126
- "id": 1
4127
- }
4128
- }
4129
- },
4130
- "DebugLinkReseedRandom": {
4131
- "fields": {
4132
- "value": {
4133
- "type": "uint32",
4134
- "id": 1
4135
- }
4136
- }
4137
- },
4138
- "DebugLinkRecordScreen": {
4139
- "fields": {
4140
- "target_directory": {
4141
- "type": "string",
4142
- "id": 1
4143
- }
4144
- }
4145
- },
4146
- "DebugLinkGetState": {
4147
- "fields": {
4148
- "wait_word_list": {
4149
- "type": "bool",
4150
- "id": 1
4151
- },
4152
- "wait_word_pos": {
4153
- "type": "bool",
4154
- "id": 2
4155
- },
4156
- "wait_layout": {
4157
- "type": "bool",
4158
- "id": 3
4159
- }
4160
- }
4161
- },
4162
- "DebugLinkState": {
4163
- "fields": {
4164
- "layout": {
4165
- "type": "bytes",
4166
- "id": 1
4167
- },
4168
- "pin": {
4169
- "type": "string",
4170
- "id": 2
4171
- },
4172
- "matrix": {
4173
- "type": "string",
4174
- "id": 3
4175
- },
4176
- "mnemonic_secret": {
4177
- "type": "bytes",
4178
- "id": 4
4179
- },
4180
- "node": {
4181
- "type": "HDNodeType",
4182
- "id": 5
4183
- },
4184
- "passphrase_protection": {
4185
- "type": "bool",
4186
- "id": 6
4187
- },
4188
- "reset_word": {
4189
- "type": "string",
4190
- "id": 7
4191
- },
4192
- "reset_entropy": {
4193
- "type": "bytes",
4194
- "id": 8
4195
- },
4196
- "recovery_fake_word": {
4197
- "type": "string",
4198
- "id": 9
4199
- },
4200
- "recovery_word_pos": {
4201
- "type": "uint32",
4202
- "id": 10
4203
- },
4204
- "reset_word_pos": {
4205
- "type": "uint32",
4206
- "id": 11
4207
- },
4208
- "mnemonic_type": {
4209
- "type": "BackupType",
4210
- "id": 12
4211
- },
4212
- "layout_lines": {
4213
- "rule": "repeated",
4214
- "type": "string",
4215
- "id": 13
4216
- }
4217
- }
4218
- },
4219
- "DebugLinkStop": {
4220
- "fields": {}
4221
- },
4222
- "DebugLinkLog": {
4223
- "fields": {
4224
- "level": {
4225
- "type": "uint32",
4226
- "id": 1
4227
- },
4228
- "bucket": {
4229
- "type": "string",
4230
- "id": 2
4231
- },
4232
- "text": {
4233
- "type": "string",
4234
- "id": 3
4235
- }
4236
- }
4237
- },
4238
- "DebugLinkMemoryRead": {
4239
- "fields": {
4240
- "address": {
4241
- "type": "uint32",
4242
- "id": 1
4243
- },
4244
- "length": {
4245
- "type": "uint32",
4246
- "id": 2
4247
- }
4248
- }
4249
- },
4250
- "DebugLinkMemory": {
4251
- "fields": {
4252
- "memory": {
4253
- "type": "bytes",
4254
- "id": 1
4255
- }
4256
- }
4257
- },
4258
- "DebugLinkMemoryWrite": {
4259
- "fields": {
4260
- "address": {
4261
- "type": "uint32",
4262
- "id": 1
4263
- },
4264
- "memory": {
4265
- "type": "bytes",
4266
- "id": 2
4267
- },
4268
- "flash": {
4269
- "type": "bool",
4270
- "id": 3
4271
- }
4272
- }
4273
- },
4274
- "DebugLinkFlashErase": {
4275
- "fields": {
4276
- "sector": {
4277
- "type": "uint32",
4278
- "id": 1
4279
- }
4280
- }
4281
- },
4282
- "DebugLinkEraseSdCard": {
4283
- "fields": {
4284
- "format": {
4285
- "type": "bool",
4286
- "id": 1
4287
- }
4288
- }
4289
- },
4290
- "DebugLinkWatchLayout": {
4291
- "fields": {
4292
- "watch": {
4293
- "type": "bool",
4294
- "id": 1
4295
- }
4296
- }
4297
- },
4298
4099
  "EosGetPublicKey": {
4299
4100
  "fields": {
4300
4101
  "address_n": {
@@ -5602,6 +5403,37 @@
5602
5403
  }
5603
5404
  }
5604
5405
  },
5406
+ "EthereumSignTypedDataQR": {
5407
+ "fields": {
5408
+ "address_n": {
5409
+ "rule": "repeated",
5410
+ "type": "uint32",
5411
+ "id": 1,
5412
+ "options": {
5413
+ "packed": false
5414
+ }
5415
+ },
5416
+ "json_data": {
5417
+ "type": "bytes",
5418
+ "id": 2
5419
+ },
5420
+ "chain_id": {
5421
+ "type": "uint64",
5422
+ "id": 3
5423
+ },
5424
+ "metamask_v4_compat": {
5425
+ "type": "bool",
5426
+ "id": 4,
5427
+ "options": {
5428
+ "default": true
5429
+ }
5430
+ },
5431
+ "request_id": {
5432
+ "type": "bytes",
5433
+ "id": 5
5434
+ }
5435
+ }
5436
+ },
5605
5437
  "EthereumGetPublicKeyOneKey": {
5606
5438
  "fields": {
5607
5439
  "address_n": {
@@ -6328,7 +6160,7 @@
6328
6160
  "PromptTemporarily": 2
6329
6161
  }
6330
6162
  },
6331
- "Initialize": {
6163
+ "StartSession": {
6332
6164
  "fields": {
6333
6165
  "session_id": {
6334
6166
  "type": "bytes",
@@ -6344,21 +6176,10 @@
6344
6176
  "derive_cardano": {
6345
6177
  "type": "bool",
6346
6178
  "id": 3
6347
- },
6348
- "passphrase_state": {
6349
- "type": "string",
6350
- "id": 8000
6351
- },
6352
- "is_contains_attach": {
6353
- "type": "bool",
6354
- "id": 8001
6355
6179
  }
6356
6180
  }
6357
6181
  },
6358
- "GetFeatures": {
6359
- "fields": {}
6360
- },
6361
- "OnekeyGetFeatures": {
6182
+ "EndSession": {
6362
6183
  "fields": {}
6363
6184
  },
6364
6185
  "OneKeyDeviceType": {
@@ -6382,460 +6203,78 @@
6382
6203
  "APP": 1
6383
6204
  }
6384
6205
  },
6385
- "Features": {
6206
+ "OnekeyFeatures": {
6386
6207
  "fields": {
6387
- "vendor": {
6388
- "type": "string",
6208
+ "onekey_device_type": {
6209
+ "type": "OneKeyDeviceType",
6389
6210
  "id": 1
6390
6211
  },
6391
- "major_version": {
6392
- "rule": "required",
6393
- "type": "uint32",
6212
+ "onekey_romloader_version": {
6213
+ "type": "string",
6394
6214
  "id": 2
6395
6215
  },
6396
- "minor_version": {
6397
- "rule": "required",
6398
- "type": "uint32",
6216
+ "onekey_bootloader_version": {
6217
+ "type": "string",
6399
6218
  "id": 3
6400
6219
  },
6401
- "patch_version": {
6402
- "rule": "required",
6403
- "type": "uint32",
6220
+ "onekey_firmware_version": {
6221
+ "type": "string",
6404
6222
  "id": 4
6405
6223
  },
6406
- "bootloader_mode": {
6407
- "type": "bool",
6224
+ "onekey_romloader_hash": {
6225
+ "type": "bytes",
6408
6226
  "id": 5
6409
6227
  },
6410
- "device_id": {
6411
- "type": "string",
6228
+ "onekey_bootloader_hash": {
6229
+ "type": "bytes",
6412
6230
  "id": 6
6413
6231
  },
6414
- "pin_protection": {
6415
- "type": "bool",
6232
+ "onekey_firmware_hash": {
6233
+ "type": "bytes",
6416
6234
  "id": 7
6417
6235
  },
6418
- "passphrase_protection": {
6419
- "type": "bool",
6236
+ "onekey_romloader_build_id": {
6237
+ "type": "string",
6420
6238
  "id": 8
6421
6239
  },
6422
- "language": {
6240
+ "onekey_bootloader_build_id": {
6423
6241
  "type": "string",
6424
6242
  "id": 9
6425
6243
  },
6426
- "label": {
6244
+ "onekey_firmware_build_id": {
6427
6245
  "type": "string",
6428
6246
  "id": 10
6429
6247
  },
6430
- "initialized": {
6431
- "type": "bool",
6248
+ "onekey_serial_no": {
6249
+ "type": "string",
6250
+ "id": 11
6251
+ },
6252
+ "onekey_coprocessor_bt_name": {
6253
+ "type": "string",
6432
6254
  "id": 12
6433
6255
  },
6434
- "revision": {
6435
- "type": "bytes",
6256
+ "onekey_coprocessor_version": {
6257
+ "type": "string",
6436
6258
  "id": 13
6437
6259
  },
6438
- "bootloader_hash": {
6439
- "type": "bytes",
6260
+ "onekey_coprocessor_build_id": {
6261
+ "type": "string",
6440
6262
  "id": 14
6441
6263
  },
6442
- "imported": {
6443
- "type": "bool",
6264
+ "onekey_coprocessor_hash": {
6265
+ "type": "bytes",
6444
6266
  "id": 15
6445
6267
  },
6446
- "unlocked": {
6447
- "type": "bool",
6268
+ "onekey_se_type": {
6269
+ "type": "OneKeySeType",
6448
6270
  "id": 16
6449
6271
  },
6450
- "_passphrase_cached": {
6451
- "type": "bool",
6452
- "id": 17,
6453
- "options": {
6454
- "deprecated": true
6455
- }
6272
+ "onekey_se01_state": {
6273
+ "type": "OneKeySEState",
6274
+ "id": 17
6456
6275
  },
6457
- "firmware_present": {
6458
- "type": "bool",
6459
- "id": 18
6460
- },
6461
- "needs_backup": {
6462
- "type": "bool",
6463
- "id": 19
6464
- },
6465
- "flags": {
6466
- "type": "uint32",
6467
- "id": 20
6468
- },
6469
- "model": {
6470
- "type": "string",
6471
- "id": 21
6472
- },
6473
- "fw_major": {
6474
- "type": "uint32",
6475
- "id": 22
6476
- },
6477
- "fw_minor": {
6478
- "type": "uint32",
6479
- "id": 23
6480
- },
6481
- "fw_patch": {
6482
- "type": "uint32",
6483
- "id": 24
6484
- },
6485
- "fw_vendor": {
6486
- "type": "string",
6487
- "id": 25
6488
- },
6489
- "unfinished_backup": {
6490
- "type": "bool",
6491
- "id": 27
6492
- },
6493
- "no_backup": {
6494
- "type": "bool",
6495
- "id": 28
6496
- },
6497
- "recovery_mode": {
6498
- "type": "bool",
6499
- "id": 29
6500
- },
6501
- "capabilities": {
6502
- "rule": "repeated",
6503
- "type": "Capability",
6504
- "id": 30,
6505
- "options": {
6506
- "packed": false
6507
- }
6508
- },
6509
- "backup_type": {
6510
- "type": "BackupType",
6511
- "id": 31
6512
- },
6513
- "sd_card_present": {
6514
- "type": "bool",
6515
- "id": 32
6516
- },
6517
- "sd_protection": {
6518
- "type": "bool",
6519
- "id": 33
6520
- },
6521
- "wipe_code_protection": {
6522
- "type": "bool",
6523
- "id": 34
6524
- },
6525
- "session_id": {
6526
- "type": "bytes",
6527
- "id": 35
6528
- },
6529
- "passphrase_always_on_device": {
6530
- "type": "bool",
6531
- "id": 36
6532
- },
6533
- "safety_checks": {
6534
- "type": "SafetyCheckLevel",
6535
- "id": 37
6536
- },
6537
- "auto_lock_delay_ms": {
6538
- "type": "uint32",
6539
- "id": 38
6540
- },
6541
- "display_rotation": {
6542
- "type": "uint32",
6543
- "id": 39
6544
- },
6545
- "experimental_features": {
6546
- "type": "bool",
6547
- "id": 40
6548
- },
6549
- "offset": {
6550
- "type": "uint32",
6551
- "id": 500
6552
- },
6553
- "ble_name": {
6554
- "type": "string",
6555
- "id": 501
6556
- },
6557
- "ble_ver": {
6558
- "type": "string",
6559
- "id": 502
6560
- },
6561
- "ble_enable": {
6562
- "type": "bool",
6563
- "id": 503
6564
- },
6565
- "se_enable": {
6566
- "type": "bool",
6567
- "id": 504
6568
- },
6569
- "se_ver": {
6570
- "type": "string",
6571
- "id": 506
6572
- },
6573
- "backup_only": {
6574
- "type": "bool",
6575
- "id": 507
6576
- },
6577
- "onekey_version": {
6578
- "type": "string",
6579
- "id": 508
6580
- },
6581
- "onekey_serial": {
6582
- "type": "string",
6583
- "id": 509
6584
- },
6585
- "bootloader_version": {
6586
- "type": "string",
6587
- "id": 510
6588
- },
6589
- "serial_no": {
6590
- "type": "string",
6591
- "id": 511
6592
- },
6593
- "spi_flash": {
6594
- "type": "string",
6595
- "id": 512
6596
- },
6597
- "initstates": {
6598
- "type": "uint32",
6599
- "id": 513
6600
- },
6601
- "NFT_voucher": {
6602
- "type": "bytes",
6603
- "id": 514
6604
- },
6605
- "cpu_info": {
6606
- "type": "string",
6607
- "id": 515
6608
- },
6609
- "pre_firmware": {
6610
- "type": "string",
6611
- "id": 516
6612
- },
6613
- "coin_switch": {
6614
- "type": "uint32",
6615
- "id": 517
6616
- },
6617
- "build_id": {
6618
- "type": "bytes",
6619
- "id": 518
6620
- },
6621
- "boardloader_version": {
6622
- "type": "string",
6623
- "id": 519
6624
- },
6625
- "busy": {
6626
- "type": "bool",
6627
- "id": 41
6628
- },
6629
- "onekey_device_type": {
6630
- "type": "OneKeyDeviceType",
6631
- "id": 600
6632
- },
6633
- "onekey_se_type": {
6634
- "type": "OneKeySeType",
6635
- "id": 601
6636
- },
6637
- "onekey_board_version": {
6638
- "type": "string",
6639
- "id": 602
6640
- },
6641
- "onekey_board_hash": {
6642
- "type": "bytes",
6643
- "id": 603
6644
- },
6645
- "onekey_boot_version": {
6646
- "type": "string",
6647
- "id": 604
6648
- },
6649
- "onekey_boot_hash": {
6650
- "type": "bytes",
6651
- "id": 605
6652
- },
6653
- "onekey_se01_version": {
6654
- "type": "string",
6655
- "id": 606
6656
- },
6657
- "onekey_se01_hash": {
6658
- "type": "bytes",
6659
- "id": 607
6660
- },
6661
- "onekey_se01_build_id": {
6662
- "type": "string",
6663
- "id": 608
6664
- },
6665
- "onekey_firmware_version": {
6666
- "type": "string",
6667
- "id": 609
6668
- },
6669
- "onekey_firmware_hash": {
6670
- "type": "bytes",
6671
- "id": 610
6672
- },
6673
- "onekey_firmware_build_id": {
6674
- "type": "string",
6675
- "id": 611
6676
- },
6677
- "onekey_serial_no": {
6678
- "type": "string",
6679
- "id": 612
6680
- },
6681
- "onekey_boot_build_id": {
6682
- "type": "string",
6683
- "id": 613
6684
- },
6685
- "onekey_ble_name": {
6686
- "type": "string",
6687
- "id": 614
6688
- },
6689
- "onekey_ble_version": {
6690
- "type": "string",
6691
- "id": 615
6692
- },
6693
- "onekey_ble_build_id": {
6694
- "type": "string",
6695
- "id": 616
6696
- },
6697
- "onekey_ble_hash": {
6698
- "type": "bytes",
6699
- "id": 617
6700
- },
6701
- "onekey_se02_version": {
6702
- "type": "string",
6703
- "id": 618
6704
- },
6705
- "onekey_se03_version": {
6706
- "type": "string",
6707
- "id": 619
6708
- },
6709
- "onekey_se04_version": {
6710
- "type": "string",
6711
- "id": 620
6712
- },
6713
- "onekey_se01_state": {
6714
- "type": "OneKeySEState",
6715
- "id": 621
6716
- },
6717
- "onekey_se02_state": {
6718
- "type": "OneKeySEState",
6719
- "id": 622
6720
- },
6721
- "onekey_se03_state": {
6722
- "type": "OneKeySEState",
6723
- "id": 623
6724
- },
6725
- "onekey_se04_state": {
6726
- "type": "OneKeySEState",
6727
- "id": 624
6728
- },
6729
- "attach_to_pin_user": {
6730
- "type": "bool",
6731
- "id": 625
6732
- },
6733
- "unlocked_attach_pin": {
6734
- "type": "bool",
6735
- "id": 626
6736
- }
6737
- },
6738
- "nested": {
6739
- "Capability": {
6740
- "options": {
6741
- "(has_bitcoin_only_values)": true
6742
- },
6743
- "values": {
6744
- "Capability_Bitcoin": 1,
6745
- "Capability_Bitcoin_like": 2,
6746
- "Capability_Binance": 3,
6747
- "Capability_Cardano": 4,
6748
- "Capability_Crypto": 5,
6749
- "Capability_EOS": 6,
6750
- "Capability_Ethereum": 7,
6751
- "Capability_Lisk": 8,
6752
- "Capability_Monero": 9,
6753
- "Capability_NEM": 10,
6754
- "Capability_Ripple": 11,
6755
- "Capability_Stellar": 12,
6756
- "Capability_Tezos": 13,
6757
- "Capability_U2F": 14,
6758
- "Capability_Shamir": 15,
6759
- "Capability_ShamirGroups": 16,
6760
- "Capability_PassphraseEntry": 17,
6761
- "Capability_AttachToPin": 18,
6762
- "Capability_EthereumTypedData": 1000
6763
- }
6764
- }
6765
- }
6766
- },
6767
- "OnekeyFeatures": {
6768
- "fields": {
6769
- "onekey_device_type": {
6770
- "type": "OneKeyDeviceType",
6771
- "id": 1
6772
- },
6773
- "onekey_board_version": {
6774
- "type": "string",
6775
- "id": 2
6776
- },
6777
- "onekey_boot_version": {
6778
- "type": "string",
6779
- "id": 3
6780
- },
6781
- "onekey_firmware_version": {
6782
- "type": "string",
6783
- "id": 4
6784
- },
6785
- "onekey_board_hash": {
6786
- "type": "bytes",
6787
- "id": 5
6788
- },
6789
- "onekey_boot_hash": {
6790
- "type": "bytes",
6791
- "id": 6
6792
- },
6793
- "onekey_firmware_hash": {
6794
- "type": "bytes",
6795
- "id": 7
6796
- },
6797
- "onekey_board_build_id": {
6798
- "type": "string",
6799
- "id": 8
6800
- },
6801
- "onekey_boot_build_id": {
6802
- "type": "string",
6803
- "id": 9
6804
- },
6805
- "onekey_firmware_build_id": {
6806
- "type": "string",
6807
- "id": 10
6808
- },
6809
- "onekey_serial_no": {
6810
- "type": "string",
6811
- "id": 11
6812
- },
6813
- "onekey_ble_name": {
6814
- "type": "string",
6815
- "id": 12
6816
- },
6817
- "onekey_ble_version": {
6818
- "type": "string",
6819
- "id": 13
6820
- },
6821
- "onekey_ble_build_id": {
6822
- "type": "string",
6823
- "id": 14
6824
- },
6825
- "onekey_ble_hash": {
6826
- "type": "bytes",
6827
- "id": 15
6828
- },
6829
- "onekey_se_type": {
6830
- "type": "OneKeySeType",
6831
- "id": 16
6832
- },
6833
- "onekey_se01_state": {
6834
- "type": "OneKeySEState",
6835
- "id": 17
6836
- },
6837
- "onekey_se02_state": {
6838
- "type": "OneKeySEState",
6276
+ "onekey_se02_state": {
6277
+ "type": "OneKeySEState",
6839
6278
  "id": 18
6840
6279
  },
6841
6280
  "onekey_se03_state": {
@@ -6894,51 +6333,51 @@
6894
6333
  "type": "string",
6895
6334
  "id": 32
6896
6335
  },
6897
- "onekey_se01_boot_version": {
6336
+ "onekey_se01_bootloader_version": {
6898
6337
  "type": "string",
6899
6338
  "id": 33
6900
6339
  },
6901
- "onekey_se02_boot_version": {
6340
+ "onekey_se02_bootloader_version": {
6902
6341
  "type": "string",
6903
6342
  "id": 34
6904
6343
  },
6905
- "onekey_se03_boot_version": {
6344
+ "onekey_se03_bootloader_version": {
6906
6345
  "type": "string",
6907
6346
  "id": 35
6908
6347
  },
6909
- "onekey_se04_boot_version": {
6348
+ "onekey_se04_bootloader_version": {
6910
6349
  "type": "string",
6911
6350
  "id": 36
6912
6351
  },
6913
- "onekey_se01_boot_hash": {
6352
+ "onekey_se01_bootloader_hash": {
6914
6353
  "type": "bytes",
6915
6354
  "id": 37
6916
6355
  },
6917
- "onekey_se02_boot_hash": {
6356
+ "onekey_se02_bootloader_hash": {
6918
6357
  "type": "bytes",
6919
6358
  "id": 38
6920
6359
  },
6921
- "onekey_se03_boot_hash": {
6360
+ "onekey_se03_bootloader_hash": {
6922
6361
  "type": "bytes",
6923
6362
  "id": 39
6924
6363
  },
6925
- "onekey_se04_boot_hash": {
6364
+ "onekey_se04_bootloader_hash": {
6926
6365
  "type": "bytes",
6927
6366
  "id": 40
6928
6367
  },
6929
- "onekey_se01_boot_build_id": {
6368
+ "onekey_se01_bootloader_build_id": {
6930
6369
  "type": "string",
6931
6370
  "id": 41
6932
6371
  },
6933
- "onekey_se02_boot_build_id": {
6372
+ "onekey_se02_bootloader_build_id": {
6934
6373
  "type": "string",
6935
6374
  "id": 42
6936
6375
  },
6937
- "onekey_se03_boot_build_id": {
6376
+ "onekey_se03_bootloader_build_id": {
6938
6377
  "type": "string",
6939
6378
  "id": 43
6940
6379
  },
6941
- "onekey_se04_boot_build_id": {
6380
+ "onekey_se04_bootloader_build_id": {
6942
6381
  "type": "string",
6943
6382
  "id": 44
6944
6383
  }
@@ -6955,9 +6394,6 @@
6955
6394
  }
6956
6395
  }
6957
6396
  },
6958
- "EndSession": {
6959
- "fields": {}
6960
- },
6961
6397
  "ApplySettings": {
6962
6398
  "fields": {
6963
6399
  "language": {
@@ -11723,6 +11159,26 @@
11723
11159
  }
11724
11160
  }
11725
11161
  },
11162
+ "ViewRawData": {
11163
+ "fields": {
11164
+ "initial_data": {
11165
+ "rule": "required",
11166
+ "type": "string",
11167
+ "id": 1
11168
+ },
11169
+ "placeholder": {
11170
+ "rule": "required",
11171
+ "type": "uint32",
11172
+ "id": 2
11173
+ }
11174
+ }
11175
+ },
11176
+ "ViewSignLayout": {
11177
+ "values": {
11178
+ "LayoutDefault": 0,
11179
+ "LayoutSafeTxCreate": 1
11180
+ }
11181
+ },
11726
11182
  "ViewSignPage": {
11727
11183
  "fields": {
11728
11184
  "title": {
@@ -11742,6 +11198,24 @@
11742
11198
  "tip": {
11743
11199
  "type": "ViewTip",
11744
11200
  "id": 4
11201
+ },
11202
+ "raw_data": {
11203
+ "type": "ViewRawData",
11204
+ "id": 5
11205
+ },
11206
+ "slide_to_confirm": {
11207
+ "type": "bool",
11208
+ "id": 6,
11209
+ "options": {
11210
+ "default": true
11211
+ }
11212
+ },
11213
+ "layout": {
11214
+ "type": "ViewSignLayout",
11215
+ "id": 7,
11216
+ "options": {
11217
+ "default": "LayoutDefault"
11218
+ }
11745
11219
  }
11746
11220
  }
11747
11221
  },
@@ -11846,181 +11320,369 @@
11846
11320
  }
11847
11321
  }
11848
11322
  },
11849
- "TonSignData": {
11323
+ "ProtocolInfoRequest": {
11324
+ "fields": {}
11325
+ },
11326
+ "ProtocolInfo": {
11850
11327
  "fields": {
11851
- "address_n": {
11328
+ "version": {
11329
+ "rule": "required",
11330
+ "type": "uint32",
11331
+ "id": 1
11332
+ },
11333
+ "supported_messages": {
11852
11334
  "rule": "repeated",
11853
11335
  "type": "uint32",
11854
- "id": 1,
11336
+ "id": 2,
11855
11337
  "options": {
11856
11338
  "packed": false
11857
11339
  }
11858
11340
  },
11859
- "type": {
11341
+ "protobuf_definition": {
11342
+ "type": "string",
11343
+ "id": 3
11344
+ }
11345
+ }
11346
+ },
11347
+ "Ping": {
11348
+ "fields": {
11349
+ "message": {
11350
+ "type": "string",
11351
+ "id": 1,
11352
+ "options": {
11353
+ "default": ""
11354
+ }
11355
+ }
11356
+ }
11357
+ },
11358
+ "Success": {
11359
+ "fields": {
11360
+ "message": {
11361
+ "type": "string",
11362
+ "id": 1,
11363
+ "options": {
11364
+ "default": ""
11365
+ }
11366
+ }
11367
+ }
11368
+ },
11369
+ "Failure": {
11370
+ "fields": {
11371
+ "code": {
11860
11372
  "rule": "required",
11861
- "type": "TonSignDataType",
11373
+ "type": "FailureType",
11374
+ "id": 1
11375
+ },
11376
+ "subcode": {
11377
+ "type": "uint32",
11862
11378
  "id": 2
11863
11379
  },
11864
- "payload": {
11865
- "rule": "required",
11866
- "type": "bytes",
11380
+ "message": {
11381
+ "type": "string",
11867
11382
  "id": 3
11868
- },
11869
- "schema": {
11383
+ }
11384
+ },
11385
+ "nested": {
11386
+ "FailureType": {
11387
+ "values": {
11388
+ "Failure_InvalidMessage": 1,
11389
+ "Failure_UndefinedError": 2,
11390
+ "Failure_UsageError": 3,
11391
+ "Failure_DataError": 4,
11392
+ "Failure_ProcessError": 5
11393
+ }
11394
+ }
11395
+ }
11396
+ },
11397
+ "DeviceRebootType": {
11398
+ "values": {
11399
+ "Normal": 0,
11400
+ "Romloader": 1,
11401
+ "Bootloader": 2
11402
+ }
11403
+ },
11404
+ "DeviceReboot": {
11405
+ "fields": {
11406
+ "reboot_type": {
11407
+ "rule": "required",
11408
+ "type": "DeviceRebootType",
11409
+ "id": 1
11410
+ }
11411
+ }
11412
+ },
11413
+ "DeviceSettings": {
11414
+ "fields": {
11415
+ "label": {
11870
11416
  "type": "string",
11871
- "id": 4
11417
+ "id": 1
11872
11418
  },
11873
- "appdomain": {
11874
- "rule": "required",
11419
+ "bt_enable": {
11420
+ "type": "bool",
11421
+ "id": 2
11422
+ },
11423
+ "language": {
11875
11424
  "type": "string",
11876
- "id": 5
11425
+ "id": 3
11426
+ }
11427
+ }
11428
+ },
11429
+ "DeviceSettingsGet": {
11430
+ "fields": {}
11431
+ },
11432
+ "DeviceSettingsSet": {
11433
+ "fields": {
11434
+ "settings": {
11435
+ "rule": "required",
11436
+ "type": "DeviceSettings",
11437
+ "id": 1
11438
+ }
11439
+ }
11440
+ },
11441
+ "DeviceCertificate": {
11442
+ "fields": {
11443
+ "cert_and_pubkey": {
11444
+ "rule": "required",
11445
+ "type": "bytes",
11446
+ "id": 1
11877
11447
  },
11878
- "timestamp": {
11448
+ "private_key": {
11449
+ "type": "bytes",
11450
+ "id": 2
11451
+ }
11452
+ }
11453
+ },
11454
+ "DeviceCertificateWrite": {
11455
+ "fields": {
11456
+ "cert": {
11879
11457
  "rule": "required",
11880
- "type": "uint64",
11881
- "id": 6
11458
+ "type": "DeviceCertificate",
11459
+ "id": 1
11460
+ }
11461
+ }
11462
+ },
11463
+ "DeviceCertificateRead": {
11464
+ "fields": {}
11465
+ },
11466
+ "DeviceCertificateSignature": {
11467
+ "fields": {
11468
+ "data": {
11469
+ "rule": "required",
11470
+ "type": "bytes",
11471
+ "id": 1
11472
+ }
11473
+ }
11474
+ },
11475
+ "DeviceCertificateSign": {
11476
+ "fields": {
11477
+ "data": {
11478
+ "rule": "required",
11479
+ "type": "bytes",
11480
+ "id": 1
11481
+ }
11482
+ }
11483
+ },
11484
+ "DeviceFirmwareTargetType": {
11485
+ "values": {
11486
+ "FW_MGMT_TARGET_INVALID": 0,
11487
+ "FW_MGMT_TARGET_CRATE": 1,
11488
+ "FW_MGMT_TARGET_ROMLOADER": 2,
11489
+ "FW_MGMT_TARGET_BOOTLOADER": 3,
11490
+ "FW_MGMT_TARGET_APPLICATION_P1": 4,
11491
+ "FW_MGMT_TARGET_APPLICATION_P2": 5,
11492
+ "FW_MGMT_TARGET_COPROCESSOR": 6,
11493
+ "FW_MGMT_TARGET_SE01": 7,
11494
+ "FW_MGMT_TARGET_SE02": 8,
11495
+ "FW_MGMT_TARGET_SE03": 9,
11496
+ "FW_MGMT_TARGET_SE04": 10
11497
+ }
11498
+ },
11499
+ "DeviceFirmwareUpdateTaskStatus": {
11500
+ "values": {
11501
+ "FW_MGMT_UPDATER_TASK_STATUS_PENDING": 0,
11502
+ "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS": 1,
11503
+ "FW_MGMT_UPDATER_TASK_STATUS_FINISHED": 2,
11504
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND": 3,
11505
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ": 4,
11506
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE": 5,
11507
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY": 6,
11508
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL": 7,
11509
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT": 8,
11510
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY": 9,
11511
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS": 10
11512
+ }
11513
+ },
11514
+ "DeviceFirmwareTarget": {
11515
+ "fields": {
11516
+ "target_id": {
11517
+ "rule": "required",
11518
+ "type": "DeviceFirmwareTargetType",
11519
+ "id": 1
11882
11520
  },
11883
- "from_address": {
11521
+ "path": {
11522
+ "rule": "required",
11884
11523
  "type": "string",
11885
- "id": 7
11524
+ "id": 2
11525
+ }
11526
+ }
11527
+ },
11528
+ "DeviceFirmwareUpdateRequest": {
11529
+ "fields": {
11530
+ "targets": {
11531
+ "rule": "repeated",
11532
+ "type": "DeviceFirmwareTarget",
11533
+ "id": 1
11534
+ }
11535
+ }
11536
+ },
11537
+ "DeviceFirmwareUpdateRecord": {
11538
+ "fields": {
11539
+ "target_id": {
11540
+ "rule": "required",
11541
+ "type": "DeviceFirmwareTargetType",
11542
+ "id": 1
11886
11543
  },
11887
- "wallet_version": {
11888
- "type": "TonWalletVersion",
11889
- "id": 8,
11890
- "options": {
11891
- "default": "V4R2"
11892
- }
11544
+ "status": {
11545
+ "type": "DeviceFirmwareUpdateTaskStatus",
11546
+ "id": 10
11893
11547
  },
11894
- "wallet_id": {
11548
+ "payload_version": {
11895
11549
  "type": "uint32",
11896
- "id": 9,
11897
- "options": {
11898
- "default": 698983191
11899
- }
11550
+ "id": 20
11900
11551
  },
11901
- "workchain": {
11902
- "type": "TonWorkChain",
11903
- "id": 10,
11904
- "options": {
11905
- "default": "BASECHAIN"
11906
- }
11552
+ "path": {
11553
+ "type": "string",
11554
+ "id": 30
11555
+ }
11556
+ }
11557
+ },
11558
+ "DeviceFirmwareUpdateRecordFields": {
11559
+ "fields": {
11560
+ "status": {
11561
+ "type": "bool",
11562
+ "id": 10
11907
11563
  },
11908
- "is_bounceable": {
11564
+ "payload_version": {
11909
11565
  "type": "bool",
11910
- "id": 11,
11911
- "options": {
11912
- "default": false
11913
- }
11566
+ "id": 20
11914
11567
  },
11915
- "is_testnet_only": {
11568
+ "path": {
11916
11569
  "type": "bool",
11917
- "id": 12,
11918
- "options": {
11919
- "default": false
11920
- }
11921
- }
11922
- },
11923
- "nested": {
11924
- "TonSignDataType": {
11925
- "values": {
11926
- "TEXT": 0,
11927
- "BINARY": 1,
11928
- "CELL": 2
11929
- }
11570
+ "id": 30
11930
11571
  }
11931
11572
  }
11932
11573
  },
11933
- "TonSignedData": {
11574
+ "DeviceFirmwareUpdateStatusGet": {
11934
11575
  "fields": {
11935
- "signature": {
11936
- "type": "bytes",
11576
+ "fields": {
11577
+ "type": "DeviceFirmwareUpdateRecordFields",
11578
+ "id": 1
11579
+ }
11580
+ }
11581
+ },
11582
+ "DeviceFirmwareUpdateStatus": {
11583
+ "fields": {
11584
+ "records": {
11585
+ "rule": "repeated",
11586
+ "type": "DeviceFirmwareUpdateRecord",
11937
11587
  "id": 1
11938
- },
11939
- "digest": {
11940
- "type": "bytes",
11941
- "id": 2
11942
11588
  }
11943
11589
  }
11944
11590
  },
11945
- "GetProtoVersion": {
11946
- "fields": {}
11591
+ "DeviceFactoryAck": {
11592
+ "values": {
11593
+ "FACTORY_ACK_SUCCESS": 0,
11594
+ "FACTORY_ACK_FAIL": 1
11595
+ }
11947
11596
  },
11948
- "ProtoVersion": {
11597
+ "DeviceFactoryInfoManufactureTime": {
11949
11598
  "fields": {
11950
- "proto_version": {
11599
+ "year": {
11951
11600
  "rule": "required",
11952
11601
  "type": "uint32",
11953
11602
  "id": 1
11603
+ },
11604
+ "month": {
11605
+ "rule": "required",
11606
+ "type": "uint32",
11607
+ "id": 2
11608
+ },
11609
+ "day": {
11610
+ "rule": "required",
11611
+ "type": "uint32",
11612
+ "id": 3
11613
+ },
11614
+ "hour": {
11615
+ "rule": "required",
11616
+ "type": "uint32",
11617
+ "id": 4
11618
+ },
11619
+ "minute": {
11620
+ "rule": "required",
11621
+ "type": "uint32",
11622
+ "id": 5
11623
+ },
11624
+ "second": {
11625
+ "rule": "required",
11626
+ "type": "uint32",
11627
+ "id": 6
11954
11628
  }
11955
11629
  }
11956
11630
  },
11957
- "Ping": {
11631
+ "DeviceFactoryInfo": {
11958
11632
  "fields": {
11959
- "message": {
11633
+ "version": {
11634
+ "type": "uint32",
11635
+ "id": 1
11636
+ },
11637
+ "serial_number": {
11960
11638
  "type": "string",
11961
- "id": 1,
11962
- "options": {
11963
- "default": ""
11964
- }
11639
+ "id": 2
11640
+ },
11641
+ "burn_in_completed": {
11642
+ "type": "bool",
11643
+ "id": 3
11644
+ },
11645
+ "factory_test_completed": {
11646
+ "type": "bool",
11647
+ "id": 4
11648
+ },
11649
+ "manufacture_time": {
11650
+ "type": "DeviceFactoryInfoManufactureTime",
11651
+ "id": 5
11965
11652
  }
11966
11653
  }
11967
11654
  },
11968
- "Success": {
11655
+ "DeviceFactoryInfoSet": {
11969
11656
  "fields": {
11970
- "message": {
11971
- "type": "string",
11972
- "id": 1,
11973
- "options": {
11974
- "default": ""
11975
- }
11657
+ "info": {
11658
+ "rule": "required",
11659
+ "type": "DeviceFactoryInfo",
11660
+ "id": 1
11976
11661
  }
11977
11662
  }
11978
11663
  },
11979
- "Failure": {
11664
+ "DeviceFactoryInfoGet": {
11665
+ "fields": {}
11666
+ },
11667
+ "DeviceFactoryPermanentLock": {
11980
11668
  "fields": {
11981
- "code": {
11982
- "type": "FailureType",
11669
+ "check_a": {
11670
+ "rule": "required",
11671
+ "type": "bytes",
11983
11672
  "id": 1
11984
11673
  },
11985
- "message": {
11986
- "type": "string",
11674
+ "check_b": {
11675
+ "rule": "required",
11676
+ "type": "bytes",
11987
11677
  "id": 2
11988
11678
  }
11989
- },
11990
- "nested": {
11991
- "FailureType": {
11992
- "values": {
11993
- "Failure_UnexpectedMessage": 1,
11994
- "Failure_ButtonExpected": 2,
11995
- "Failure_DataError": 3,
11996
- "Failure_ActionCancelled": 4,
11997
- "Failure_PinExpected": 5,
11998
- "Failure_PinCancelled": 6,
11999
- "Failure_PinInvalid": 7,
12000
- "Failure_InvalidSignature": 8,
12001
- "Failure_ProcessError": 9,
12002
- "Failure_NotEnoughFunds": 10,
12003
- "Failure_NotInitialized": 11,
12004
- "Failure_PinMismatch": 12,
12005
- "Failure_WipeCodeMismatch": 13,
12006
- "Failure_InvalidSession": 14,
12007
- "Failure_FirmwareError": 99
12008
- }
12009
- }
12010
- }
12011
- },
12012
- "DevRebootType": {
12013
- "values": {
12014
- "Normal": 0,
12015
- "Boardloader": 1,
12016
- "Bootloader": 2
12017
11679
  }
12018
11680
  },
12019
- "DevReboot": {
11681
+ "DeviceFactoryTest": {
12020
11682
  "fields": {
12021
- "reboot_type": {
11683
+ "burn_in_test": {
12022
11684
  "rule": "required",
12023
- "type": "DevRebootType",
11685
+ "type": "bool",
12024
11686
  "id": 1
12025
11687
  }
12026
11688
  }
@@ -12032,23 +11694,25 @@
12032
11694
  "MINI": 2,
12033
11695
  "TOUCH": 3,
12034
11696
  "PRO": 5,
12035
- "CLASSIC1S_PURE": 6
11697
+ "CLASSIC1S_PURE": 6,
11698
+ "PRO2": 7,
11699
+ "NEO": 8
12036
11700
  }
12037
11701
  },
12038
- "DevSeType": {
11702
+ "DeviceSeType": {
12039
11703
  "values": {
12040
11704
  "THD89": 0,
12041
11705
  "SE608A": 1
12042
11706
  }
12043
11707
  },
12044
- "DevSEState": {
11708
+ "DeviceSEState": {
12045
11709
  "values": {
12046
11710
  "BOOT": 0,
12047
11711
  "APP_FACTORY": 51,
12048
11712
  "APP": 85
12049
11713
  }
12050
11714
  },
12051
- "DevFirmwareImageInfo": {
11715
+ "DeviceFirmwareImageInfo": {
12052
11716
  "fields": {
12053
11717
  "version": {
12054
11718
  "type": "string",
@@ -12064,19 +11728,15 @@
12064
11728
  }
12065
11729
  }
12066
11730
  },
12067
- "DevHardwareInfo": {
11731
+ "DeviceHardwareInfo": {
12068
11732
  "fields": {
12069
- "device_type": {
11733
+ "Device_type": {
12070
11734
  "type": "DeviceType",
12071
11735
  "id": 10
12072
11736
  },
12073
11737
  "serial_no": {
12074
11738
  "type": "string",
12075
- "id": 11
12076
- },
12077
- "device_id": {
12078
- "type": "string",
12079
- "id": 12
11739
+ "id": 20
12080
11740
  },
12081
11741
  "hardware_version": {
12082
11742
  "type": "string",
@@ -12084,67 +11744,71 @@
12084
11744
  },
12085
11745
  "hardware_version_raw_adc": {
12086
11746
  "type": "uint32",
12087
- "id": 101
11747
+ "id": 110
12088
11748
  }
12089
11749
  }
12090
11750
  },
12091
- "DevMainMcuInfo": {
11751
+ "DeviceMainMcuInfo": {
12092
11752
  "fields": {
12093
- "board": {
12094
- "type": "DevFirmwareImageInfo",
11753
+ "romloader": {
11754
+ "type": "DeviceFirmwareImageInfo",
12095
11755
  "id": 10
12096
11756
  },
12097
- "boot": {
12098
- "type": "DevFirmwareImageInfo",
11757
+ "bootloader": {
11758
+ "type": "DeviceFirmwareImageInfo",
12099
11759
  "id": 20
12100
11760
  },
12101
- "app": {
12102
- "type": "DevFirmwareImageInfo",
11761
+ "application": {
11762
+ "type": "DeviceFirmwareImageInfo",
12103
11763
  "id": 30
11764
+ },
11765
+ "application_data": {
11766
+ "type": "DeviceFirmwareImageInfo",
11767
+ "id": 40
12104
11768
  }
12105
11769
  }
12106
11770
  },
12107
- "DevBluetoothInfo": {
11771
+ "DeviceCoprocessorInfo": {
12108
11772
  "fields": {
12109
- "boot": {
12110
- "type": "DevFirmwareImageInfo",
11773
+ "bootloader": {
11774
+ "type": "DeviceFirmwareImageInfo",
12111
11775
  "id": 20
12112
11776
  },
12113
- "app": {
12114
- "type": "DevFirmwareImageInfo",
11777
+ "application": {
11778
+ "type": "DeviceFirmwareImageInfo",
12115
11779
  "id": 30
12116
11780
  },
12117
- "adv_name": {
11781
+ "bt_adv_name": {
12118
11782
  "type": "string",
12119
11783
  "id": 100
12120
11784
  },
12121
- "mac": {
11785
+ "bt_mac": {
12122
11786
  "type": "bytes",
12123
11787
  "id": 110
12124
11788
  }
12125
11789
  }
12126
11790
  },
12127
- "DevSEInfo": {
11791
+ "DeviceSEInfo": {
12128
11792
  "fields": {
12129
- "boot": {
12130
- "type": "DevFirmwareImageInfo",
11793
+ "bootloader": {
11794
+ "type": "DeviceFirmwareImageInfo",
12131
11795
  "id": 20
12132
11796
  },
12133
- "app": {
12134
- "type": "DevFirmwareImageInfo",
11797
+ "application": {
11798
+ "type": "DeviceFirmwareImageInfo",
12135
11799
  "id": 30
12136
11800
  },
12137
11801
  "type": {
12138
- "type": "DevSeType",
11802
+ "type": "DeviceSeType",
12139
11803
  "id": 100
12140
11804
  },
12141
11805
  "state": {
12142
- "type": "DevSEState",
11806
+ "type": "DeviceSEState",
12143
11807
  "id": 110
12144
11808
  }
12145
11809
  }
12146
11810
  },
12147
- "DevInfoTargets": {
11811
+ "DeviceInfoTargets": {
12148
11812
  "fields": {
12149
11813
  "hw": {
12150
11814
  "type": "bool",
@@ -12154,7 +11818,7 @@
12154
11818
  "type": "bool",
12155
11819
  "id": 200
12156
11820
  },
12157
- "bt": {
11821
+ "coprocessor": {
12158
11822
  "type": "bool",
12159
11823
  "id": 300
12160
11824
  },
@@ -12180,7 +11844,7 @@
12180
11844
  }
12181
11845
  }
12182
11846
  },
12183
- "DevInfoTypes": {
11847
+ "DeviceInfoTypes": {
12184
11848
  "fields": {
12185
11849
  "version": {
12186
11850
  "type": "bool",
@@ -12200,42 +11864,14 @@
12200
11864
  }
12201
11865
  }
12202
11866
  },
12203
- "DevStatus": {
12204
- "fields": {
12205
- "language": {
12206
- "type": "string",
12207
- "id": 100
12208
- },
12209
- "bt_enable": {
12210
- "type": "bool",
12211
- "id": 101
12212
- },
12213
- "init_states": {
12214
- "type": "bool",
12215
- "id": 102
12216
- },
12217
- "backup_required": {
12218
- "type": "bool",
12219
- "id": 200
12220
- },
12221
- "passphrase_protection": {
12222
- "type": "bool",
12223
- "id": 201
12224
- },
12225
- "label": {
12226
- "type": "string",
12227
- "id": 300
12228
- }
12229
- }
12230
- },
12231
- "DevGetDeviceInfo": {
11867
+ "DeviceInfoGet": {
12232
11868
  "fields": {
12233
11869
  "targets": {
12234
- "type": "DevInfoTargets",
11870
+ "type": "DeviceInfoTargets",
12235
11871
  "id": 1
12236
11872
  },
12237
11873
  "types": {
12238
- "type": "DevInfoTypes",
11874
+ "type": "DeviceInfoTypes",
12239
11875
  "id": 2
12240
11876
  }
12241
11877
  }
@@ -12248,166 +11884,151 @@
12248
11884
  "id": 1
12249
11885
  },
12250
11886
  "hw": {
12251
- "type": "DevHardwareInfo",
11887
+ "type": "DeviceHardwareInfo",
12252
11888
  "id": 100
12253
11889
  },
12254
11890
  "fw": {
12255
- "type": "DevMainMcuInfo",
11891
+ "type": "DeviceMainMcuInfo",
12256
11892
  "id": 200
12257
11893
  },
12258
- "bt": {
12259
- "type": "DevBluetoothInfo",
11894
+ "coprocessor": {
11895
+ "type": "DeviceCoprocessorInfo",
12260
11896
  "id": 300
12261
11897
  },
12262
11898
  "se1": {
12263
- "type": "DevSEInfo",
11899
+ "type": "DeviceSEInfo",
12264
11900
  "id": 400
12265
11901
  },
12266
11902
  "se2": {
12267
- "type": "DevSEInfo",
11903
+ "type": "DeviceSEInfo",
12268
11904
  "id": 410
12269
11905
  },
12270
11906
  "se3": {
12271
- "type": "DevSEInfo",
11907
+ "type": "DeviceSEInfo",
12272
11908
  "id": 420
12273
11909
  },
12274
11910
  "se4": {
12275
- "type": "DevSEInfo",
11911
+ "type": "DeviceSEInfo",
12276
11912
  "id": 430
12277
11913
  },
12278
11914
  "status": {
12279
- "type": "DevStatus",
11915
+ "type": "DeviceStatus",
12280
11916
  "id": 10000
12281
11917
  }
12282
11918
  }
12283
11919
  },
12284
- "DevFirmwareTargetType": {
12285
- "values": {
12286
- "TARGET_MAIN_APP": 0,
12287
- "TARGET_MAIN_BOOT": 1,
12288
- "TARGET_BT": 2,
12289
- "TARGET_SE1": 3,
12290
- "TARGET_SE2": 4,
12291
- "TARGET_SE3": 5,
12292
- "TARGET_SE4": 6,
12293
- "TARGET_RESOURCE": 10
12294
- }
12295
- },
12296
- "DevFirmwareTarget": {
12297
- "fields": {
12298
- "target_id": {
12299
- "rule": "required",
12300
- "type": "DevFirmwareTargetType",
12301
- "id": 1
12302
- },
12303
- "path": {
12304
- "rule": "required",
12305
- "type": "string",
12306
- "id": 2
12307
- }
12308
- }
12309
- },
12310
- "DevFirmwareUpdate": {
11920
+ "DeviceSessionGet": {
12311
11921
  "fields": {
12312
- "targets": {
12313
- "rule": "repeated",
12314
- "type": "DevFirmwareTarget",
11922
+ "session_id": {
11923
+ "type": "bytes",
12315
11924
  "id": 1
12316
11925
  }
12317
11926
  }
12318
11927
  },
12319
- "DevFirmwareInstallProgress": {
11928
+ "DeviceSession": {
12320
11929
  "fields": {
12321
- "target_id": {
12322
- "rule": "required",
12323
- "type": "DevFirmwareTargetType",
11930
+ "session_id": {
11931
+ "type": "bytes",
12324
11932
  "id": 1
12325
11933
  },
12326
- "progress": {
12327
- "rule": "required",
12328
- "type": "uint32",
12329
- "id": 2
12330
- },
12331
- "stage": {
11934
+ "btc_test_address": {
12332
11935
  "type": "string",
12333
- "id": 3
12334
- }
12335
- }
12336
- },
12337
- "DevFirmwareUpdateStatusEntry": {
12338
- "fields": {
12339
- "target_id": {
12340
- "rule": "required",
12341
- "type": "DevFirmwareTargetType",
12342
- "id": 1
12343
- },
12344
- "status": {
12345
- "rule": "required",
12346
- "type": "uint32",
12347
11936
  "id": 2
12348
11937
  }
12349
11938
  }
12350
11939
  },
12351
- "DevGetFirmwareUpdateStatus": {
11940
+ "DeviceSessionAskPin": {
12352
11941
  "fields": {}
12353
11942
  },
12354
- "DevFirmwareUpdateStatus": {
11943
+ "DeviceSessionPinResult": {
12355
11944
  "fields": {
12356
- "targets": {
12357
- "rule": "repeated",
12358
- "type": "DevFirmwareUpdateStatusEntry",
11945
+ "unlocked": {
11946
+ "type": "bool",
12359
11947
  "id": 1
11948
+ },
11949
+ "unlocked_attach_pin": {
11950
+ "type": "bool",
11951
+ "id": 2
11952
+ },
11953
+ "passphrase_protection": {
11954
+ "type": "bool",
11955
+ "id": 3
12360
11956
  }
12361
11957
  }
12362
11958
  },
12363
- "FactoryDeviceInfoSettings": {
11959
+ "DeviceStatus": {
12364
11960
  "fields": {
12365
- "serial_no": {
11961
+ "device_id": {
12366
11962
  "type": "string",
12367
11963
  "id": 1
12368
11964
  },
12369
- "cpu_info": {
12370
- "type": "string",
11965
+ "unlocked": {
11966
+ "type": "bool",
12371
11967
  "id": 2
12372
11968
  },
12373
- "pre_firmware": {
12374
- "type": "string",
11969
+ "init_states": {
11970
+ "type": "bool",
12375
11971
  "id": 3
11972
+ },
11973
+ "backup_required": {
11974
+ "type": "bool",
11975
+ "id": 4
11976
+ },
11977
+ "passphrase_enabled": {
11978
+ "type": "bool",
11979
+ "id": 10
11980
+ },
11981
+ "attach_to_pin_enabled": {
11982
+ "type": "bool",
11983
+ "id": 11
11984
+ },
11985
+ "unlocked_by_attach_to_pin": {
11986
+ "type": "bool",
11987
+ "id": 12
12376
11988
  }
12377
11989
  }
12378
11990
  },
12379
- "FactoryGetDeviceInfo": {
11991
+ "DeviceStatusGet": {
12380
11992
  "fields": {}
12381
11993
  },
12382
- "FactoryDeviceInfo": {
11994
+ "DevOnboardingStage": {
11995
+ "values": {
11996
+ "DEV_ONBOARDING_STAGE_UNKNOWN": 0,
11997
+ "DEV_ONBOARDING_STAGE_SAFETY_CHECK": 1,
11998
+ "DEV_ONBOARDING_STAGE_PERSONALIZATION": 2,
11999
+ "DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD": 3,
12000
+ "DEV_ONBOARDING_STAGE_NEW_DEVICE": 4,
12001
+ "DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD": 5,
12002
+ "DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC": 6,
12003
+ "DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD": 7,
12004
+ "DEV_ONBOARDING_STAGE_WALLET_READY": 8,
12005
+ "DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT": 9,
12006
+ "DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD": 10,
12007
+ "DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP": 11,
12008
+ "DEV_ONBOARDING_STAGE_DONE": 12
12009
+ }
12010
+ },
12011
+ "DevGetOnboardingStatus": {
12012
+ "fields": {}
12013
+ },
12014
+ "DevOnboardingStatus": {
12383
12015
  "fields": {
12384
- "serial_no": {
12385
- "type": "string",
12016
+ "stage": {
12017
+ "rule": "required",
12018
+ "type": "DevOnboardingStage",
12386
12019
  "id": 1
12387
12020
  },
12388
- "spi_flash_info": {
12389
- "type": "string",
12021
+ "status_code": {
12022
+ "type": "uint32",
12390
12023
  "id": 2
12391
12024
  },
12392
- "se_info": {
12393
- "type": "string",
12025
+ "detail_code": {
12026
+ "type": "uint32",
12394
12027
  "id": 3
12395
- },
12396
- "nft_voucher": {
12397
- "type": "bytes",
12398
- "id": 4
12399
- },
12400
- "cpu_info": {
12401
- "type": "string",
12402
- "id": 5
12403
- },
12404
- "pre_firmware": {
12405
- "type": "string",
12406
- "id": 6
12407
12028
  }
12408
12029
  }
12409
12030
  },
12410
- "FilesystemFixPermission": {
12031
+ "FilesystemPermissionFix": {
12411
12032
  "fields": {}
12412
12033
  },
12413
12034
  "FilesystemPathInfo": {
@@ -12620,77 +12241,22 @@
12620
12241
  }
12621
12242
  },
12622
12243
  "FilesystemFormat": {
12623
- "fields": {}
12624
- },
12625
- "OnboardingStep": {
12626
- "values": {
12627
- "ONBOARDING_STEP_UNKNOWN": 0,
12628
- "ONBOARDING_STEP_DEVICE_VERIFICATION": 1,
12629
- "ONBOARDING_STEP_PERSONALIZATION": 2,
12630
- "ONBOARDING_STEP_SETUP": 3,
12631
- "ONBOARDING_STEP_FIRMWARE": 4
12632
- }
12633
- },
12634
- "GetOnboardingStatus": {
12635
- "fields": {}
12636
- },
12637
- "OnboardingStatus": {
12638
12244
  "fields": {
12639
- "step": {
12245
+ "data": {
12640
12246
  "rule": "required",
12641
- "type": "OnboardingStep",
12247
+ "type": "bool",
12642
12248
  "id": 1
12643
12249
  },
12644
- "setup": {
12645
- "type": "Setup",
12250
+ "user": {
12251
+ "rule": "required",
12252
+ "type": "bool",
12646
12253
  "id": 2
12647
- },
12648
- "detail_code": {
12649
- "type": "uint32",
12650
- "id": 3
12651
- },
12652
- "detail_str": {
12653
- "type": "string",
12654
- "id": 4
12655
- }
12656
- },
12657
- "nested": {
12658
- "Setup": {
12659
- "fields": {
12660
- "new_device": {
12661
- "type": "NewDevice",
12662
- "id": 1
12663
- },
12664
- "restore": {
12665
- "type": "Restore",
12666
- "id": 2
12667
- }
12668
- },
12669
- "nested": {
12670
- "NewDevice": {
12671
- "fields": {
12672
- "seedcard_backup": {
12673
- "type": "bool",
12674
- "id": 1
12675
- }
12676
- }
12677
- },
12678
- "Restore": {
12679
- "fields": {
12680
- "mnemonic": {
12681
- "type": "bool",
12682
- "id": 1
12683
- },
12684
- "seedcard": {
12685
- "type": "bool",
12686
- "id": 2
12687
- }
12688
- }
12689
- }
12690
- }
12691
12254
  }
12692
12255
  }
12693
12256
  },
12257
+ "PortfolioUpdate": {
12258
+ "fields": {}
12259
+ },
12694
12260
  "google": {
12695
12261
  "nested": {
12696
12262
  "protobuf": {