@onekeyfe/hd-core 1.2.0-alpha.3 → 1.2.0-alpha.4

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 (112) hide show
  1. package/__tests__/preInitialize.test.ts +33 -0
  2. package/__tests__/protocol-v2.test.ts +1377 -480
  3. package/dist/api/FileRead.d.ts.map +1 -1
  4. package/dist/api/FileWrite.d.ts.map +1 -1
  5. package/dist/api/FirmwareUpdateV4.d.ts +20 -2
  6. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  7. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
  8. package/dist/api/firmware/getBinary.d.ts +4 -0
  9. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  10. package/dist/api/index.d.ts +5 -10
  11. package/dist/api/index.d.ts.map +1 -1
  12. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +6 -0
  13. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -0
  14. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +7 -0
  15. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -0
  16. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -1
  17. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
  18. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -1
  19. package/dist/api/protocol-v2/{DeviceGetDeviceInfo.d.ts → DeviceInfoGet.d.ts} +10 -10
  20. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -0
  21. package/dist/api/protocol-v2/{FilesystemFixPermission.d.ts → FilesystemPermissionFix.d.ts} +2 -2
  22. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -0
  23. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +6 -0
  24. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -0
  25. package/dist/api/protocol-v2/helpers.d.ts +24 -18
  26. package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
  27. package/dist/api/ton/TonSignData.d.ts +1 -5
  28. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  29. package/dist/core/index.d.ts.map +1 -1
  30. package/dist/data-manager/DataManager.d.ts +1 -1
  31. package/dist/data-manager/DataManager.d.ts.map +1 -1
  32. package/dist/data-manager/connectSettings.d.ts.map +1 -1
  33. package/dist/device/Device.d.ts +4 -1
  34. package/dist/device/Device.d.ts.map +1 -1
  35. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
  36. package/dist/deviceProfile/buildDeviceProfile.d.ts.map +1 -1
  37. package/dist/index.d.ts +79 -54
  38. package/dist/index.js +1537 -1528
  39. package/dist/inject.d.ts.map +1 -1
  40. package/dist/protocols/protocol-v2/features.d.ts +12 -14
  41. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  42. package/dist/protocols/protocol-v2/firmware.d.ts +10 -9
  43. package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
  44. package/dist/types/api/firmwareUpdate.d.ts +1 -6
  45. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  46. package/dist/types/api/getDeviceInfo.d.ts +2 -0
  47. package/dist/types/api/getDeviceInfo.d.ts.map +1 -1
  48. package/dist/types/api/index.d.ts +6 -11
  49. package/dist/types/api/index.d.ts.map +1 -1
  50. package/dist/types/api/protocolV2.d.ts +12 -17
  51. package/dist/types/api/protocolV2.d.ts.map +1 -1
  52. package/dist/types/device.d.ts +1 -0
  53. package/dist/types/device.d.ts.map +1 -1
  54. package/dist/types/params.d.ts +1 -0
  55. package/dist/types/params.d.ts.map +1 -1
  56. package/dist/types/settings.d.ts +29 -2
  57. package/dist/types/settings.d.ts.map +1 -1
  58. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  59. package/dist/utils/patch.d.ts +1 -1
  60. package/dist/utils/patch.d.ts.map +1 -1
  61. package/package.json +4 -4
  62. package/src/api/FileRead.ts +14 -1
  63. package/src/api/FileWrite.ts +14 -1
  64. package/src/api/FirmwareUpdateV4.ts +933 -197
  65. package/src/api/GetOnekeyFeatures.ts +1 -1
  66. package/src/api/device/DeviceRebootToBoardloader.ts +4 -4
  67. package/src/api/device/DeviceRebootToBootloader.ts +4 -4
  68. package/src/api/firmware/FirmwareUpdateBaseMethod.ts +11 -4
  69. package/src/api/index.ts +5 -10
  70. package/src/api/protocol-v2/{FactoryGetDeviceInfo.ts → DeviceFactoryInfoGet.ts} +3 -3
  71. package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +32 -0
  72. package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +3 -5
  73. package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +2 -2
  74. package/src/api/protocol-v2/{DeviceGetDeviceInfo.ts → DeviceInfoGet.ts} +52 -22
  75. package/src/api/protocol-v2/DeviceReboot.ts +1 -1
  76. package/src/api/protocol-v2/{FilesystemFixPermission.ts → FilesystemPermissionFix.ts} +2 -2
  77. package/src/api/protocol-v2/{GetProtoVersion.ts → ProtocolInfoRequest.ts} +2 -2
  78. package/src/api/protocol-v2/helpers.ts +59 -43
  79. package/src/api/ton/TonSignData.ts +1 -5
  80. package/src/core/index.ts +19 -5
  81. package/src/data/messages/messages-protocol-v2.json +486 -1072
  82. package/src/data-manager/DataManager.ts +7 -0
  83. package/src/data-manager/connectSettings.ts +0 -6
  84. package/src/device/Device.ts +25 -14
  85. package/src/deviceProfile/buildDeviceFeatures.ts +60 -63
  86. package/src/deviceProfile/buildDeviceProfile.ts +77 -58
  87. package/src/inject.ts +10 -16
  88. package/src/protocols/protocol-v2/features.ts +26 -63
  89. package/src/protocols/protocol-v2/firmware.ts +11 -36
  90. package/src/types/api/firmwareUpdate.ts +10 -20
  91. package/src/types/api/getDeviceInfo.ts +2 -0
  92. package/src/types/api/index.ts +10 -20
  93. package/src/types/api/protocolV2.ts +22 -42
  94. package/src/types/device.ts +1 -0
  95. package/src/types/params.ts +4 -0
  96. package/src/types/settings.ts +44 -35
  97. package/src/utils/deviceFeaturesUtils.ts +45 -10
  98. package/dist/api/protocol-v2/DevReboot.d.ts +0 -7
  99. package/dist/api/protocol-v2/DevReboot.d.ts.map +0 -1
  100. package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts.map +0 -1
  101. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +0 -6
  102. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +0 -1
  103. package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +0 -7
  104. package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +0 -1
  105. package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +0 -6
  106. package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +0 -1
  107. package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +0 -1
  108. package/dist/api/protocol-v2/GetProtoVersion.d.ts +0 -6
  109. package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +0 -1
  110. package/src/api/protocol-v2/DevReboot.ts +0 -24
  111. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +0 -16
  112. package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +0 -29
@@ -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,
@@ -419,8 +418,6 @@
419
418
  "MessageType_TonSignProof": 11905,
420
419
  "MessageType_TonSignedProof": 11906,
421
420
  "MessageType_TonTxAck": 11907,
422
- "MessageType_TonSignData": 11908,
423
- "MessageType_TonSignedData": 11909,
424
421
  "MessageType_ScdoGetAddress": 12001,
425
422
  "MessageType_ScdoAddress": 12002,
426
423
  "MessageType_ScdoSignTx": 12003,
@@ -450,46 +447,36 @@
450
447
  "MessageType_NeoAddress": 12302,
451
448
  "MessageType_NeoSignTx": 12303,
452
449
  "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,
450
+ "MessageType_UiviewShowAddressRequest": 30200,
451
+ "MessageType_UiviewShowPublicKeyRequest": 30201,
452
+ "MessageType_UiviewConfirmTxRequest": 30202,
453
+ "MessageType_UiviewConfirmSignMessageRequest": 30203,
454
+ "MessageType_UiviewResponse": 30204,
455
+ "MessageType_DeviceFactoryInfoSet": 60000,
456
+ "MessageType_DeviceFactoryInfoGet": 60001,
457
+ "MessageType_DeviceFactoryInfo": 60002,
458
+ "MessageType_DeviceFactoryPermanentLock": 60003,
459
+ "MessageType_DeviceFactoryTest": 60004,
460
+ "MessageType_ProtocolInfoRequest": 60200,
461
+ "MessageType_ProtocolInfo": 60201,
484
462
  "MessageType_Ping": 60206,
485
463
  "MessageType_Success": 60207,
486
464
  "MessageType_Failure": 60208,
487
- "MessageType_DevReboot": 60400,
488
- "MessageType_DevGetDeviceInfo": 60600,
465
+ "MessageType_DeviceReboot": 60400,
466
+ "MessageType_DeviceSettings": 60410,
467
+ "MessageType_DeviceSettingsGet": 60411,
468
+ "MessageType_DeviceSettingsSet": 60412,
469
+ "MessageType_DeviceCertificate": 60420,
470
+ "MessageType_DeviceCertificateWrite": 60421,
471
+ "MessageType_DeviceCertificateRead": 60422,
472
+ "MessageType_DeviceCertificateSignature": 60423,
473
+ "MessageType_DeviceCertificateSign": 60424,
474
+ "MessageType_SetWallpaper": 60430,
475
+ "MessageType_GetWallpaper": 60431,
476
+ "MessageType_Wallpaper": 60432,
477
+ "MessageType_DeviceInfoGet": 60600,
489
478
  "MessageType_DeviceInfo": 60601,
490
- "MessageType_GetOnboardingStatus": 60602,
491
- "MessageType_OnboardingStatus": 60603,
492
- "MessageType_FilesystemFixPermission": 60800,
479
+ "MessageType_FilesystemPermissionFix": 60800,
493
480
  "MessageType_FilesystemPathInfo": 60801,
494
481
  "MessageType_FilesystemPathInfoQuery": 60802,
495
482
  "MessageType_FilesystemFile": 60803,
@@ -501,11 +488,16 @@
501
488
  "MessageType_FilesystemDirMake": 60809,
502
489
  "MessageType_FilesystemDirRemove": 60810,
503
490
  "MessageType_FilesystemFormat": 60811,
504
- "MessageType_DevFirmwareUpdate": 61000,
505
- "MessageType_DevFirmwareInstallProgress": 61001,
506
- "MessageType_DevGetFirmwareUpdateStatus": 61002,
507
- "MessageType_DevFirmwareUpdateStatus": 61003
508
- }
491
+ "MessageType_DeviceFirmwareUpdateRequest": 61000,
492
+ "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
493
+ "MessageType_DeviceFirmwareUpdateStatus": 61002
494
+ },
495
+ "reserved": [
496
+ [90, 92],
497
+ [114, 122],
498
+ [300, 304],
499
+ [309, 312]
500
+ ]
509
501
  },
510
502
  "AlephiumGetAddress": {
511
503
  "fields": {
@@ -4094,207 +4086,6 @@
4094
4086
  }
4095
4087
  }
4096
4088
  },
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
4089
  "EosGetPublicKey": {
4299
4090
  "fields": {
4300
4091
  "address_n": {
@@ -6328,7 +6119,7 @@
6328
6119
  "PromptTemporarily": 2
6329
6120
  }
6330
6121
  },
6331
- "Initialize": {
6122
+ "StartSession": {
6332
6123
  "fields": {
6333
6124
  "session_id": {
6334
6125
  "type": "bytes",
@@ -6344,21 +6135,10 @@
6344
6135
  "derive_cardano": {
6345
6136
  "type": "bool",
6346
6137
  "id": 3
6347
- },
6348
- "passphrase_state": {
6349
- "type": "string",
6350
- "id": 8000
6351
- },
6352
- "is_contains_attach": {
6353
- "type": "bool",
6354
- "id": 8001
6355
6138
  }
6356
6139
  }
6357
6140
  },
6358
- "GetFeatures": {
6359
- "fields": {}
6360
- },
6361
- "OnekeyGetFeatures": {
6141
+ "EndSession": {
6362
6142
  "fields": {}
6363
6143
  },
6364
6144
  "OneKeyDeviceType": {
@@ -6382,496 +6162,114 @@
6382
6162
  "APP": 1
6383
6163
  }
6384
6164
  },
6385
- "Features": {
6165
+ "OnekeyFeatures": {
6386
6166
  "fields": {
6387
- "vendor": {
6388
- "type": "string",
6167
+ "onekey_device_type": {
6168
+ "type": "OneKeyDeviceType",
6389
6169
  "id": 1
6390
6170
  },
6391
- "major_version": {
6392
- "rule": "required",
6393
- "type": "uint32",
6171
+ "onekey_romloader_version": {
6172
+ "type": "string",
6394
6173
  "id": 2
6395
6174
  },
6396
- "minor_version": {
6397
- "rule": "required",
6398
- "type": "uint32",
6175
+ "onekey_bootloader_version": {
6176
+ "type": "string",
6399
6177
  "id": 3
6400
6178
  },
6401
- "patch_version": {
6402
- "rule": "required",
6403
- "type": "uint32",
6179
+ "onekey_firmware_version": {
6180
+ "type": "string",
6404
6181
  "id": 4
6405
6182
  },
6406
- "bootloader_mode": {
6407
- "type": "bool",
6183
+ "onekey_romloader_hash": {
6184
+ "type": "bytes",
6408
6185
  "id": 5
6409
6186
  },
6410
- "device_id": {
6411
- "type": "string",
6187
+ "onekey_bootloader_hash": {
6188
+ "type": "bytes",
6412
6189
  "id": 6
6413
6190
  },
6414
- "pin_protection": {
6415
- "type": "bool",
6191
+ "onekey_firmware_hash": {
6192
+ "type": "bytes",
6416
6193
  "id": 7
6417
6194
  },
6418
- "passphrase_protection": {
6419
- "type": "bool",
6195
+ "onekey_romloader_build_id": {
6196
+ "type": "string",
6420
6197
  "id": 8
6421
6198
  },
6422
- "language": {
6199
+ "onekey_bootloader_build_id": {
6423
6200
  "type": "string",
6424
6201
  "id": 9
6425
6202
  },
6426
- "label": {
6203
+ "onekey_firmware_build_id": {
6427
6204
  "type": "string",
6428
6205
  "id": 10
6429
6206
  },
6430
- "initialized": {
6431
- "type": "bool",
6207
+ "onekey_serial_no": {
6208
+ "type": "string",
6209
+ "id": 11
6210
+ },
6211
+ "onekey_coprocessor_bt_name": {
6212
+ "type": "string",
6432
6213
  "id": 12
6433
6214
  },
6434
- "revision": {
6435
- "type": "bytes",
6215
+ "onekey_coprocessor_version": {
6216
+ "type": "string",
6436
6217
  "id": 13
6437
6218
  },
6438
- "bootloader_hash": {
6439
- "type": "bytes",
6219
+ "onekey_coprocessor_build_id": {
6220
+ "type": "string",
6440
6221
  "id": 14
6441
6222
  },
6442
- "imported": {
6443
- "type": "bool",
6223
+ "onekey_coprocessor_hash": {
6224
+ "type": "bytes",
6444
6225
  "id": 15
6445
6226
  },
6446
- "unlocked": {
6447
- "type": "bool",
6227
+ "onekey_se_type": {
6228
+ "type": "OneKeySeType",
6448
6229
  "id": 16
6449
6230
  },
6450
- "_passphrase_cached": {
6451
- "type": "bool",
6452
- "id": 17,
6453
- "options": {
6454
- "deprecated": true
6455
- }
6231
+ "onekey_se01_state": {
6232
+ "type": "OneKeySEState",
6233
+ "id": 17
6456
6234
  },
6457
- "firmware_present": {
6458
- "type": "bool",
6235
+ "onekey_se02_state": {
6236
+ "type": "OneKeySEState",
6459
6237
  "id": 18
6460
6238
  },
6461
- "needs_backup": {
6462
- "type": "bool",
6239
+ "onekey_se03_state": {
6240
+ "type": "OneKeySEState",
6463
6241
  "id": 19
6464
6242
  },
6465
- "flags": {
6466
- "type": "uint32",
6243
+ "onekey_se04_state": {
6244
+ "type": "OneKeySEState",
6467
6245
  "id": 20
6468
6246
  },
6469
- "model": {
6247
+ "onekey_se01_version": {
6470
6248
  "type": "string",
6471
6249
  "id": 21
6472
6250
  },
6473
- "fw_major": {
6474
- "type": "uint32",
6251
+ "onekey_se02_version": {
6252
+ "type": "string",
6475
6253
  "id": 22
6476
6254
  },
6477
- "fw_minor": {
6478
- "type": "uint32",
6255
+ "onekey_se03_version": {
6256
+ "type": "string",
6479
6257
  "id": 23
6480
6258
  },
6481
- "fw_patch": {
6482
- "type": "uint32",
6259
+ "onekey_se04_version": {
6260
+ "type": "string",
6483
6261
  "id": 24
6484
6262
  },
6485
- "fw_vendor": {
6486
- "type": "string",
6263
+ "onekey_se01_hash": {
6264
+ "type": "bytes",
6487
6265
  "id": 25
6488
6266
  },
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",
6839
- "id": 18
6840
- },
6841
- "onekey_se03_state": {
6842
- "type": "OneKeySEState",
6843
- "id": 19
6844
- },
6845
- "onekey_se04_state": {
6846
- "type": "OneKeySEState",
6847
- "id": 20
6848
- },
6849
- "onekey_se01_version": {
6850
- "type": "string",
6851
- "id": 21
6852
- },
6853
- "onekey_se02_version": {
6854
- "type": "string",
6855
- "id": 22
6856
- },
6857
- "onekey_se03_version": {
6858
- "type": "string",
6859
- "id": 23
6860
- },
6861
- "onekey_se04_version": {
6862
- "type": "string",
6863
- "id": 24
6864
- },
6865
- "onekey_se01_hash": {
6866
- "type": "bytes",
6867
- "id": 25
6868
- },
6869
- "onekey_se02_hash": {
6870
- "type": "bytes",
6871
- "id": 26
6872
- },
6873
- "onekey_se03_hash": {
6874
- "type": "bytes",
6267
+ "onekey_se02_hash": {
6268
+ "type": "bytes",
6269
+ "id": 26
6270
+ },
6271
+ "onekey_se03_hash": {
6272
+ "type": "bytes",
6875
6273
  "id": 27
6876
6274
  },
6877
6275
  "onekey_se04_hash": {
@@ -6894,51 +6292,51 @@
6894
6292
  "type": "string",
6895
6293
  "id": 32
6896
6294
  },
6897
- "onekey_se01_boot_version": {
6295
+ "onekey_se01_bootloader_version": {
6898
6296
  "type": "string",
6899
6297
  "id": 33
6900
6298
  },
6901
- "onekey_se02_boot_version": {
6299
+ "onekey_se02_bootloader_version": {
6902
6300
  "type": "string",
6903
6301
  "id": 34
6904
6302
  },
6905
- "onekey_se03_boot_version": {
6303
+ "onekey_se03_bootloader_version": {
6906
6304
  "type": "string",
6907
6305
  "id": 35
6908
6306
  },
6909
- "onekey_se04_boot_version": {
6307
+ "onekey_se04_bootloader_version": {
6910
6308
  "type": "string",
6911
6309
  "id": 36
6912
6310
  },
6913
- "onekey_se01_boot_hash": {
6311
+ "onekey_se01_bootloader_hash": {
6914
6312
  "type": "bytes",
6915
6313
  "id": 37
6916
6314
  },
6917
- "onekey_se02_boot_hash": {
6315
+ "onekey_se02_bootloader_hash": {
6918
6316
  "type": "bytes",
6919
6317
  "id": 38
6920
6318
  },
6921
- "onekey_se03_boot_hash": {
6319
+ "onekey_se03_bootloader_hash": {
6922
6320
  "type": "bytes",
6923
6321
  "id": 39
6924
6322
  },
6925
- "onekey_se04_boot_hash": {
6323
+ "onekey_se04_bootloader_hash": {
6926
6324
  "type": "bytes",
6927
6325
  "id": 40
6928
6326
  },
6929
- "onekey_se01_boot_build_id": {
6327
+ "onekey_se01_bootloader_build_id": {
6930
6328
  "type": "string",
6931
6329
  "id": 41
6932
6330
  },
6933
- "onekey_se02_boot_build_id": {
6331
+ "onekey_se02_bootloader_build_id": {
6934
6332
  "type": "string",
6935
6333
  "id": 42
6936
6334
  },
6937
- "onekey_se03_boot_build_id": {
6335
+ "onekey_se03_bootloader_build_id": {
6938
6336
  "type": "string",
6939
6337
  "id": 43
6940
6338
  },
6941
- "onekey_se04_boot_build_id": {
6339
+ "onekey_se04_bootloader_build_id": {
6942
6340
  "type": "string",
6943
6341
  "id": 44
6944
6342
  }
@@ -6955,9 +6353,6 @@
6955
6353
  }
6956
6354
  }
6957
6355
  },
6958
- "EndSession": {
6959
- "fields": {}
6960
- },
6961
6356
  "ApplySettings": {
6962
6357
  "fields": {
6963
6358
  "language": {
@@ -11846,181 +11241,369 @@
11846
11241
  }
11847
11242
  }
11848
11243
  },
11849
- "TonSignData": {
11244
+ "ProtocolInfoRequest": {
11245
+ "fields": {}
11246
+ },
11247
+ "ProtocolInfo": {
11850
11248
  "fields": {
11851
- "address_n": {
11249
+ "version": {
11250
+ "rule": "required",
11251
+ "type": "uint32",
11252
+ "id": 1
11253
+ },
11254
+ "supported_messages": {
11852
11255
  "rule": "repeated",
11853
11256
  "type": "uint32",
11854
- "id": 1,
11257
+ "id": 2,
11855
11258
  "options": {
11856
11259
  "packed": false
11857
11260
  }
11858
11261
  },
11859
- "type": {
11262
+ "protobuf_definition": {
11263
+ "type": "string",
11264
+ "id": 3
11265
+ }
11266
+ }
11267
+ },
11268
+ "Ping": {
11269
+ "fields": {
11270
+ "message": {
11271
+ "type": "string",
11272
+ "id": 1,
11273
+ "options": {
11274
+ "default": ""
11275
+ }
11276
+ }
11277
+ }
11278
+ },
11279
+ "Success": {
11280
+ "fields": {
11281
+ "message": {
11282
+ "type": "string",
11283
+ "id": 1,
11284
+ "options": {
11285
+ "default": ""
11286
+ }
11287
+ }
11288
+ }
11289
+ },
11290
+ "Failure": {
11291
+ "fields": {
11292
+ "code": {
11860
11293
  "rule": "required",
11861
- "type": "TonSignDataType",
11294
+ "type": "FailureType",
11295
+ "id": 1
11296
+ },
11297
+ "subcode": {
11298
+ "type": "uint32",
11862
11299
  "id": 2
11863
11300
  },
11864
- "payload": {
11865
- "rule": "required",
11866
- "type": "bytes",
11301
+ "message": {
11302
+ "type": "string",
11867
11303
  "id": 3
11868
- },
11869
- "schema": {
11304
+ }
11305
+ },
11306
+ "nested": {
11307
+ "FailureType": {
11308
+ "values": {
11309
+ "Failure_InvalidMessage": 1,
11310
+ "Failure_UndefinedError": 2,
11311
+ "Failure_UsageError": 3,
11312
+ "Failure_DataError": 4,
11313
+ "Failure_ProcessError": 5
11314
+ }
11315
+ }
11316
+ }
11317
+ },
11318
+ "DeviceRebootType": {
11319
+ "values": {
11320
+ "Normal": 0,
11321
+ "Romloader": 1,
11322
+ "Bootloader": 2
11323
+ }
11324
+ },
11325
+ "DeviceReboot": {
11326
+ "fields": {
11327
+ "reboot_type": {
11328
+ "rule": "required",
11329
+ "type": "DeviceRebootType",
11330
+ "id": 1
11331
+ }
11332
+ }
11333
+ },
11334
+ "DeviceSettings": {
11335
+ "fields": {
11336
+ "label": {
11870
11337
  "type": "string",
11871
- "id": 4
11338
+ "id": 1
11872
11339
  },
11873
- "appdomain": {
11874
- "rule": "required",
11340
+ "bt_enable": {
11341
+ "type": "bool",
11342
+ "id": 2
11343
+ },
11344
+ "language": {
11875
11345
  "type": "string",
11876
- "id": 5
11346
+ "id": 3
11347
+ }
11348
+ }
11349
+ },
11350
+ "DeviceSettingsGet": {
11351
+ "fields": {}
11352
+ },
11353
+ "DeviceSettingsSet": {
11354
+ "fields": {
11355
+ "settings": {
11356
+ "rule": "required",
11357
+ "type": "DeviceSettings",
11358
+ "id": 1
11359
+ }
11360
+ }
11361
+ },
11362
+ "DeviceCertificate": {
11363
+ "fields": {
11364
+ "cert_and_pubkey": {
11365
+ "rule": "required",
11366
+ "type": "bytes",
11367
+ "id": 1
11877
11368
  },
11878
- "timestamp": {
11369
+ "private_key": {
11370
+ "type": "bytes",
11371
+ "id": 2
11372
+ }
11373
+ }
11374
+ },
11375
+ "DeviceCertificateWrite": {
11376
+ "fields": {
11377
+ "cert": {
11879
11378
  "rule": "required",
11880
- "type": "uint64",
11881
- "id": 6
11379
+ "type": "DeviceCertificate",
11380
+ "id": 1
11381
+ }
11382
+ }
11383
+ },
11384
+ "DeviceCertificateRead": {
11385
+ "fields": {}
11386
+ },
11387
+ "DeviceCertificateSignature": {
11388
+ "fields": {
11389
+ "data": {
11390
+ "rule": "required",
11391
+ "type": "bytes",
11392
+ "id": 1
11393
+ }
11394
+ }
11395
+ },
11396
+ "DeviceCertificateSign": {
11397
+ "fields": {
11398
+ "data": {
11399
+ "rule": "required",
11400
+ "type": "bytes",
11401
+ "id": 1
11402
+ }
11403
+ }
11404
+ },
11405
+ "DeviceFirmwareTargetType": {
11406
+ "values": {
11407
+ "FW_MGMT_TARGET_INVALID": 0,
11408
+ "FW_MGMT_TARGET_CRATE": 1,
11409
+ "FW_MGMT_TARGET_ROMLOADER": 2,
11410
+ "FW_MGMT_TARGET_BOOTLOADER": 3,
11411
+ "FW_MGMT_TARGET_APPLICATION_P1": 4,
11412
+ "FW_MGMT_TARGET_APPLICATION_P2": 5,
11413
+ "FW_MGMT_TARGET_COPROCESSOR": 6,
11414
+ "FW_MGMT_TARGET_SE01": 7,
11415
+ "FW_MGMT_TARGET_SE02": 8,
11416
+ "FW_MGMT_TARGET_SE03": 9,
11417
+ "FW_MGMT_TARGET_SE04": 10
11418
+ }
11419
+ },
11420
+ "DeviceFirmwareUpdateTaskStatus": {
11421
+ "values": {
11422
+ "FW_MGMT_UPDATER_TASK_STATUS_PENDING": 0,
11423
+ "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS": 1,
11424
+ "FW_MGMT_UPDATER_TASK_STATUS_FINISHED": 2,
11425
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND": 3,
11426
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ": 4,
11427
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE": 5,
11428
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY": 6,
11429
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL": 7,
11430
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT": 8,
11431
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY": 9,
11432
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS": 10
11433
+ }
11434
+ },
11435
+ "DeviceFirmwareTarget": {
11436
+ "fields": {
11437
+ "target_id": {
11438
+ "rule": "required",
11439
+ "type": "DeviceFirmwareTargetType",
11440
+ "id": 1
11882
11441
  },
11883
- "from_address": {
11442
+ "path": {
11443
+ "rule": "required",
11884
11444
  "type": "string",
11885
- "id": 7
11445
+ "id": 2
11446
+ }
11447
+ }
11448
+ },
11449
+ "DeviceFirmwareUpdateRequest": {
11450
+ "fields": {
11451
+ "targets": {
11452
+ "rule": "repeated",
11453
+ "type": "DeviceFirmwareTarget",
11454
+ "id": 1
11455
+ }
11456
+ }
11457
+ },
11458
+ "DeviceFirmwareUpdateRecord": {
11459
+ "fields": {
11460
+ "target_id": {
11461
+ "rule": "required",
11462
+ "type": "DeviceFirmwareTargetType",
11463
+ "id": 1
11886
11464
  },
11887
- "wallet_version": {
11888
- "type": "TonWalletVersion",
11889
- "id": 8,
11890
- "options": {
11891
- "default": "V4R2"
11892
- }
11465
+ "status": {
11466
+ "type": "DeviceFirmwareUpdateTaskStatus",
11467
+ "id": 10
11893
11468
  },
11894
- "wallet_id": {
11469
+ "payload_version": {
11895
11470
  "type": "uint32",
11896
- "id": 9,
11897
- "options": {
11898
- "default": 698983191
11899
- }
11471
+ "id": 20
11900
11472
  },
11901
- "workchain": {
11902
- "type": "TonWorkChain",
11903
- "id": 10,
11904
- "options": {
11905
- "default": "BASECHAIN"
11906
- }
11473
+ "path": {
11474
+ "type": "string",
11475
+ "id": 30
11476
+ }
11477
+ }
11478
+ },
11479
+ "DeviceFirmwareUpdateRecordFields": {
11480
+ "fields": {
11481
+ "status": {
11482
+ "type": "bool",
11483
+ "id": 10
11907
11484
  },
11908
- "is_bounceable": {
11485
+ "payload_version": {
11909
11486
  "type": "bool",
11910
- "id": 11,
11911
- "options": {
11912
- "default": false
11913
- }
11487
+ "id": 20
11914
11488
  },
11915
- "is_testnet_only": {
11489
+ "path": {
11916
11490
  "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
- }
11491
+ "id": 30
11930
11492
  }
11931
11493
  }
11932
11494
  },
11933
- "TonSignedData": {
11495
+ "DeviceFirmwareUpdateStatusGet": {
11934
11496
  "fields": {
11935
- "signature": {
11936
- "type": "bytes",
11497
+ "fields": {
11498
+ "type": "DeviceFirmwareUpdateRecordFields",
11937
11499
  "id": 1
11938
- },
11939
- "digest": {
11940
- "type": "bytes",
11941
- "id": 2
11942
11500
  }
11943
11501
  }
11944
11502
  },
11945
- "GetProtoVersion": {
11946
- "fields": {}
11503
+ "DeviceFirmwareUpdateStatus": {
11504
+ "fields": {
11505
+ "records": {
11506
+ "rule": "repeated",
11507
+ "type": "DeviceFirmwareUpdateRecord",
11508
+ "id": 1
11509
+ }
11510
+ }
11947
11511
  },
11948
- "ProtoVersion": {
11512
+ "DeviceFactoryAck": {
11513
+ "values": {
11514
+ "FACTORY_ACK_SUCCESS": 0,
11515
+ "FACTORY_ACK_FAIL": 1
11516
+ }
11517
+ },
11518
+ "DeviceFactoryInfoManufactureTime": {
11949
11519
  "fields": {
11950
- "proto_version": {
11520
+ "year": {
11951
11521
  "rule": "required",
11952
11522
  "type": "uint32",
11953
11523
  "id": 1
11524
+ },
11525
+ "month": {
11526
+ "rule": "required",
11527
+ "type": "uint32",
11528
+ "id": 2
11529
+ },
11530
+ "day": {
11531
+ "rule": "required",
11532
+ "type": "uint32",
11533
+ "id": 3
11534
+ },
11535
+ "hour": {
11536
+ "rule": "required",
11537
+ "type": "uint32",
11538
+ "id": 4
11539
+ },
11540
+ "minute": {
11541
+ "rule": "required",
11542
+ "type": "uint32",
11543
+ "id": 5
11544
+ },
11545
+ "second": {
11546
+ "rule": "required",
11547
+ "type": "uint32",
11548
+ "id": 6
11954
11549
  }
11955
11550
  }
11956
11551
  },
11957
- "Ping": {
11552
+ "DeviceFactoryInfo": {
11958
11553
  "fields": {
11959
- "message": {
11554
+ "version": {
11555
+ "type": "uint32",
11556
+ "id": 1
11557
+ },
11558
+ "serial_number": {
11960
11559
  "type": "string",
11961
- "id": 1,
11962
- "options": {
11963
- "default": ""
11964
- }
11560
+ "id": 2
11561
+ },
11562
+ "burn_in_completed": {
11563
+ "type": "bool",
11564
+ "id": 3
11565
+ },
11566
+ "factory_test_completed": {
11567
+ "type": "bool",
11568
+ "id": 4
11569
+ },
11570
+ "manufacture_time": {
11571
+ "type": "DeviceFactoryInfoManufactureTime",
11572
+ "id": 5
11965
11573
  }
11966
11574
  }
11967
11575
  },
11968
- "Success": {
11576
+ "DeviceFactoryInfoSet": {
11969
11577
  "fields": {
11970
- "message": {
11971
- "type": "string",
11972
- "id": 1,
11973
- "options": {
11974
- "default": ""
11975
- }
11578
+ "info": {
11579
+ "rule": "required",
11580
+ "type": "DeviceFactoryInfo",
11581
+ "id": 1
11976
11582
  }
11977
11583
  }
11978
11584
  },
11979
- "Failure": {
11585
+ "DeviceFactoryInfoGet": {
11586
+ "fields": {}
11587
+ },
11588
+ "DeviceFactoryPermanentLock": {
11980
11589
  "fields": {
11981
- "code": {
11982
- "type": "FailureType",
11590
+ "check_a": {
11591
+ "rule": "required",
11592
+ "type": "bytes",
11983
11593
  "id": 1
11984
11594
  },
11985
- "message": {
11986
- "type": "string",
11595
+ "check_b": {
11596
+ "rule": "required",
11597
+ "type": "bytes",
11987
11598
  "id": 2
11988
11599
  }
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
11600
  }
12018
11601
  },
12019
- "DevReboot": {
11602
+ "DeviceFactoryTest": {
12020
11603
  "fields": {
12021
- "reboot_type": {
11604
+ "burn_in_test": {
12022
11605
  "rule": "required",
12023
- "type": "DevRebootType",
11606
+ "type": "bool",
12024
11607
  "id": 1
12025
11608
  }
12026
11609
  }
@@ -12032,23 +11615,25 @@
12032
11615
  "MINI": 2,
12033
11616
  "TOUCH": 3,
12034
11617
  "PRO": 5,
12035
- "CLASSIC1S_PURE": 6
11618
+ "CLASSIC1S_PURE": 6,
11619
+ "PRO2": 7,
11620
+ "NEO": 8
12036
11621
  }
12037
11622
  },
12038
- "DevSeType": {
11623
+ "DeviceSeType": {
12039
11624
  "values": {
12040
11625
  "THD89": 0,
12041
11626
  "SE608A": 1
12042
11627
  }
12043
11628
  },
12044
- "DevSEState": {
11629
+ "DeviceSEState": {
12045
11630
  "values": {
12046
11631
  "BOOT": 0,
12047
11632
  "APP_FACTORY": 51,
12048
11633
  "APP": 85
12049
11634
  }
12050
11635
  },
12051
- "DevFirmwareImageInfo": {
11636
+ "DeviceFirmwareImageInfo": {
12052
11637
  "fields": {
12053
11638
  "version": {
12054
11639
  "type": "string",
@@ -12064,19 +11649,15 @@
12064
11649
  }
12065
11650
  }
12066
11651
  },
12067
- "DevHardwareInfo": {
11652
+ "DeviceHardwareInfo": {
12068
11653
  "fields": {
12069
- "device_type": {
11654
+ "Device_type": {
12070
11655
  "type": "DeviceType",
12071
11656
  "id": 10
12072
11657
  },
12073
11658
  "serial_no": {
12074
11659
  "type": "string",
12075
- "id": 11
12076
- },
12077
- "device_id": {
12078
- "type": "string",
12079
- "id": 12
11660
+ "id": 20
12080
11661
  },
12081
11662
  "hardware_version": {
12082
11663
  "type": "string",
@@ -12084,67 +11665,71 @@
12084
11665
  },
12085
11666
  "hardware_version_raw_adc": {
12086
11667
  "type": "uint32",
12087
- "id": 101
11668
+ "id": 110
12088
11669
  }
12089
11670
  }
12090
11671
  },
12091
- "DevMainMcuInfo": {
11672
+ "DeviceMainMcuInfo": {
12092
11673
  "fields": {
12093
- "board": {
12094
- "type": "DevFirmwareImageInfo",
11674
+ "romloader": {
11675
+ "type": "DeviceFirmwareImageInfo",
12095
11676
  "id": 10
12096
11677
  },
12097
- "boot": {
12098
- "type": "DevFirmwareImageInfo",
11678
+ "bootloader": {
11679
+ "type": "DeviceFirmwareImageInfo",
12099
11680
  "id": 20
12100
11681
  },
12101
- "app": {
12102
- "type": "DevFirmwareImageInfo",
11682
+ "application": {
11683
+ "type": "DeviceFirmwareImageInfo",
12103
11684
  "id": 30
11685
+ },
11686
+ "application_data": {
11687
+ "type": "DeviceFirmwareImageInfo",
11688
+ "id": 40
12104
11689
  }
12105
11690
  }
12106
11691
  },
12107
- "DevBluetoothInfo": {
11692
+ "DeviceCoprocessorInfo": {
12108
11693
  "fields": {
12109
- "boot": {
12110
- "type": "DevFirmwareImageInfo",
11694
+ "bootloader": {
11695
+ "type": "DeviceFirmwareImageInfo",
12111
11696
  "id": 20
12112
11697
  },
12113
- "app": {
12114
- "type": "DevFirmwareImageInfo",
11698
+ "application": {
11699
+ "type": "DeviceFirmwareImageInfo",
12115
11700
  "id": 30
12116
11701
  },
12117
- "adv_name": {
11702
+ "bt_adv_name": {
12118
11703
  "type": "string",
12119
11704
  "id": 100
12120
11705
  },
12121
- "mac": {
11706
+ "bt_mac": {
12122
11707
  "type": "bytes",
12123
11708
  "id": 110
12124
11709
  }
12125
11710
  }
12126
11711
  },
12127
- "DevSEInfo": {
11712
+ "DeviceSEInfo": {
12128
11713
  "fields": {
12129
- "boot": {
12130
- "type": "DevFirmwareImageInfo",
11714
+ "bootloader": {
11715
+ "type": "DeviceFirmwareImageInfo",
12131
11716
  "id": 20
12132
11717
  },
12133
- "app": {
12134
- "type": "DevFirmwareImageInfo",
11718
+ "application": {
11719
+ "type": "DeviceFirmwareImageInfo",
12135
11720
  "id": 30
12136
11721
  },
12137
11722
  "type": {
12138
- "type": "DevSeType",
11723
+ "type": "DeviceSeType",
12139
11724
  "id": 100
12140
11725
  },
12141
11726
  "state": {
12142
- "type": "DevSEState",
11727
+ "type": "DeviceSEState",
12143
11728
  "id": 110
12144
11729
  }
12145
11730
  }
12146
11731
  },
12147
- "DevInfoTargets": {
11732
+ "DeviceInfoTargets": {
12148
11733
  "fields": {
12149
11734
  "hw": {
12150
11735
  "type": "bool",
@@ -12154,7 +11739,7 @@
12154
11739
  "type": "bool",
12155
11740
  "id": 200
12156
11741
  },
12157
- "bt": {
11742
+ "coprocessor": {
12158
11743
  "type": "bool",
12159
11744
  "id": 300
12160
11745
  },
@@ -12180,7 +11765,7 @@
12180
11765
  }
12181
11766
  }
12182
11767
  },
12183
- "DevInfoTypes": {
11768
+ "DeviceInfoTypes": {
12184
11769
  "fields": {
12185
11770
  "version": {
12186
11771
  "type": "bool",
@@ -12200,42 +11785,14 @@
12200
11785
  }
12201
11786
  }
12202
11787
  },
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": {
11788
+ "DeviceInfoGet": {
12232
11789
  "fields": {
12233
11790
  "targets": {
12234
- "type": "DevInfoTargets",
11791
+ "type": "DeviceInfoTargets",
12235
11792
  "id": 1
12236
11793
  },
12237
11794
  "types": {
12238
- "type": "DevInfoTypes",
11795
+ "type": "DeviceInfoTypes",
12239
11796
  "id": 2
12240
11797
  }
12241
11798
  }
@@ -12248,166 +11805,92 @@
12248
11805
  "id": 1
12249
11806
  },
12250
11807
  "hw": {
12251
- "type": "DevHardwareInfo",
11808
+ "type": "DeviceHardwareInfo",
12252
11809
  "id": 100
12253
11810
  },
12254
11811
  "fw": {
12255
- "type": "DevMainMcuInfo",
11812
+ "type": "DeviceMainMcuInfo",
12256
11813
  "id": 200
12257
11814
  },
12258
- "bt": {
12259
- "type": "DevBluetoothInfo",
11815
+ "coprocessor": {
11816
+ "type": "DeviceCoprocessorInfo",
12260
11817
  "id": 300
12261
11818
  },
12262
11819
  "se1": {
12263
- "type": "DevSEInfo",
11820
+ "type": "DeviceSEInfo",
12264
11821
  "id": 400
12265
11822
  },
12266
11823
  "se2": {
12267
- "type": "DevSEInfo",
11824
+ "type": "DeviceSEInfo",
12268
11825
  "id": 410
12269
11826
  },
12270
11827
  "se3": {
12271
- "type": "DevSEInfo",
11828
+ "type": "DeviceSEInfo",
12272
11829
  "id": 420
12273
11830
  },
12274
11831
  "se4": {
12275
- "type": "DevSEInfo",
11832
+ "type": "DeviceSEInfo",
12276
11833
  "id": 430
12277
11834
  },
12278
11835
  "status": {
12279
- "type": "DevStatus",
11836
+ "type": "DeviceStatus",
12280
11837
  "id": 10000
12281
11838
  }
12282
11839
  }
12283
11840
  },
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": {
12311
- "fields": {
12312
- "targets": {
12313
- "rule": "repeated",
12314
- "type": "DevFirmwareTarget",
12315
- "id": 1
12316
- }
12317
- }
12318
- },
12319
- "DevFirmwareInstallProgress": {
12320
- "fields": {
12321
- "target_id": {
12322
- "rule": "required",
12323
- "type": "DevFirmwareTargetType",
12324
- "id": 1
12325
- },
12326
- "progress": {
12327
- "rule": "required",
12328
- "type": "uint32",
12329
- "id": 2
12330
- },
12331
- "stage": {
12332
- "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
- "id": 2
12348
- }
12349
- }
12350
- },
12351
- "DevGetFirmwareUpdateStatus": {
12352
- "fields": {}
12353
- },
12354
- "DevFirmwareUpdateStatus": {
11841
+ "DeviceSessionGet": {
12355
11842
  "fields": {
12356
- "targets": {
12357
- "rule": "repeated",
12358
- "type": "DevFirmwareUpdateStatusEntry",
11843
+ "session_id": {
11844
+ "type": "bytes",
12359
11845
  "id": 1
12360
11846
  }
12361
11847
  }
12362
11848
  },
12363
- "FactoryDeviceInfoSettings": {
11849
+ "DeviceSession": {
12364
11850
  "fields": {
12365
- "serial_no": {
12366
- "type": "string",
11851
+ "session_id": {
11852
+ "type": "bytes",
12367
11853
  "id": 1
12368
11854
  },
12369
- "cpu_info": {
11855
+ "btc_test_address": {
12370
11856
  "type": "string",
12371
11857
  "id": 2
12372
- },
12373
- "pre_firmware": {
12374
- "type": "string",
12375
- "id": 3
12376
11858
  }
12377
11859
  }
12378
11860
  },
12379
- "FactoryGetDeviceInfo": {
12380
- "fields": {}
12381
- },
12382
- "FactoryDeviceInfo": {
11861
+ "DeviceStatus": {
12383
11862
  "fields": {
12384
- "serial_no": {
11863
+ "device_id": {
12385
11864
  "type": "string",
12386
11865
  "id": 1
12387
11866
  },
12388
- "spi_flash_info": {
12389
- "type": "string",
11867
+ "unlocked": {
11868
+ "type": "bool",
12390
11869
  "id": 2
12391
11870
  },
12392
- "se_info": {
12393
- "type": "string",
11871
+ "init_states": {
11872
+ "type": "bool",
12394
11873
  "id": 3
12395
11874
  },
12396
- "nft_voucher": {
12397
- "type": "bytes",
11875
+ "backup_required": {
11876
+ "type": "bool",
12398
11877
  "id": 4
12399
11878
  },
12400
- "cpu_info": {
12401
- "type": "string",
12402
- "id": 5
11879
+ "passphrase_enabled": {
11880
+ "type": "bool",
11881
+ "id": 10
12403
11882
  },
12404
- "pre_firmware": {
12405
- "type": "string",
12406
- "id": 6
11883
+ "attach_to_pin_enabled": {
11884
+ "type": "bool",
11885
+ "id": 11
11886
+ },
11887
+ "unlocked_by_attach_to_pin": {
11888
+ "type": "bool",
11889
+ "id": 12
12407
11890
  }
12408
11891
  }
12409
11892
  },
12410
- "FilesystemFixPermission": {
11893
+ "FilesystemPermissionFix": {
12411
11894
  "fields": {}
12412
11895
  },
12413
11896
  "FilesystemPathInfo": {
@@ -12622,75 +12105,6 @@
12622
12105
  "FilesystemFormat": {
12623
12106
  "fields": {}
12624
12107
  },
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
- "fields": {
12639
- "step": {
12640
- "rule": "required",
12641
- "type": "OnboardingStep",
12642
- "id": 1
12643
- },
12644
- "setup": {
12645
- "type": "Setup",
12646
- "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
- }
12692
- }
12693
- },
12694
12108
  "google": {
12695
12109
  "nested": {
12696
12110
  "protobuf": {