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

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