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

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 (746) hide show
  1. package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +77 -0
  2. package/__tests__/DeviceCommands.test.ts +433 -0
  3. package/__tests__/DeviceEventRegistration.test.ts +43 -0
  4. package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
  5. package/__tests__/connectSettings.test.ts +61 -0
  6. package/__tests__/core-dispose.test.ts +34 -0
  7. package/__tests__/core-error-output.test.ts +39 -0
  8. package/__tests__/device-features-state.test.ts +78 -0
  9. package/__tests__/device-identity.test.ts +52 -0
  10. package/__tests__/device-lifecycle-events.test.ts +197 -0
  11. package/__tests__/device-pool-state.test.ts +132 -0
  12. package/__tests__/device-settings.test.ts +391 -0
  13. package/__tests__/device-state-contract.test.ts +27 -0
  14. package/__tests__/device-state-events.test.ts +286 -0
  15. package/__tests__/device-state-mapper.test.ts +241 -0
  16. package/__tests__/device-state-projector.test.ts +94 -0
  17. package/__tests__/device-state-store.test.ts +82 -0
  18. package/__tests__/device-utils.test.ts +106 -0
  19. package/__tests__/device-wallet-session-store.test.ts +358 -0
  20. package/__tests__/deviceFeaturesUtils.test.ts +39 -0
  21. package/__tests__/deviceSettings.test.ts +103 -0
  22. package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
  23. package/__tests__/evmSignTypedData.test.ts +80 -0
  24. package/__tests__/filesystemValidation.test.ts +53 -0
  25. package/__tests__/firmware-update/check-all-firmware-release.test.ts +174 -0
  26. package/__tests__/firmware-update/firmware-artifact-source.test.ts +119 -0
  27. package/__tests__/firmware-update/firmware-host-binding.test.ts +70 -0
  28. package/__tests__/firmware-update/firmware-preparation-error.test.ts +27 -0
  29. package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
  30. package/__tests__/firmware-update/firmware-update-plan.test.ts +593 -0
  31. package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +213 -0
  32. package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +430 -0
  33. package/__tests__/firmware-update/firmware-update-v3-reconnect.test.ts +58 -0
  34. package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
  35. package/__tests__/get-device-state.test.ts +410 -0
  36. package/__tests__/homescreen.test.ts +24 -0
  37. package/__tests__/kaspa-public-types.type-test.ts +16 -0
  38. package/__tests__/kaspa-use-tweak-pro2.test.ts +20 -0
  39. package/__tests__/kaspaSignTransaction.test.ts +592 -0
  40. package/__tests__/logBlockEvent.test.ts +43 -0
  41. package/__tests__/method-protocol-support.test.ts +113 -0
  42. package/__tests__/networkUtils.test.ts +386 -0
  43. package/__tests__/open-wallet-session-error-response.test.ts +43 -0
  44. package/__tests__/open-wallet-session.test.ts +915 -0
  45. package/__tests__/preInitialize.test.ts +33 -0
  46. package/__tests__/pro2Wallpaper.test.ts +39 -0
  47. package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
  48. package/__tests__/protocol-v2-firmware-targets.test.ts +19 -0
  49. package/__tests__/protocol-v2-ping.test.ts +28 -0
  50. package/__tests__/protocol-v2-unlock-policy.test.ts +45 -0
  51. package/__tests__/protocol-v2.test.ts +5310 -1856
  52. package/__tests__/protocolV2FileWrite.test.ts +92 -0
  53. package/__tests__/protocolV2UiInteraction.test.ts +266 -0
  54. package/__tests__/public-device-state-api.test.ts +266 -0
  55. package/__tests__/public-pro2-api-boundary.test.ts +106 -0
  56. package/__tests__/refresh-device-state.test.ts +101 -0
  57. package/__tests__/request-context-logging.test.ts +16 -0
  58. package/__tests__/search-devices.test.ts +136 -0
  59. package/__tests__/tron-sign-message-init.test.ts +74 -0
  60. package/dist/api/BaseMethod.d.ts +14 -1
  61. package/dist/api/BaseMethod.d.ts.map +1 -1
  62. package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
  63. package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
  64. package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
  65. package/dist/api/CipherKeyValue.d.ts +1 -0
  66. package/dist/api/CipherKeyValue.d.ts.map +1 -1
  67. package/dist/api/ClearSessionCache.d.ts +9 -0
  68. package/dist/api/ClearSessionCache.d.ts.map +1 -0
  69. package/dist/api/DirList.d.ts +1 -0
  70. package/dist/api/DirList.d.ts.map +1 -1
  71. package/dist/api/DirMake.d.ts +1 -0
  72. package/dist/api/DirMake.d.ts.map +1 -1
  73. package/dist/api/DirRemove.d.ts +1 -0
  74. package/dist/api/DirRemove.d.ts.map +1 -1
  75. package/dist/api/FileDelete.d.ts +1 -0
  76. package/dist/api/FileDelete.d.ts.map +1 -1
  77. package/dist/api/FileRead.d.ts +1 -0
  78. package/dist/api/FileRead.d.ts.map +1 -1
  79. package/dist/api/FileWrite.d.ts +2 -0
  80. package/dist/api/FileWrite.d.ts.map +1 -1
  81. package/dist/api/FirmwareUpdate.d.ts.map +1 -1
  82. package/dist/api/FirmwareUpdateV2.d.ts +13 -2
  83. package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
  84. package/dist/api/FirmwareUpdateV3.d.ts +7 -3
  85. package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
  86. package/dist/api/FirmwareUpdateV4.d.ts +47 -6
  87. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  88. package/dist/api/GetDeviceState.d.ts +8 -0
  89. package/dist/api/GetDeviceState.d.ts.map +1 -0
  90. package/dist/api/GetFeatures.d.ts +1 -1
  91. package/dist/api/GetFeatures.d.ts.map +1 -1
  92. package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
  93. package/dist/api/GetPassphraseState.d.ts +2 -6
  94. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  95. package/dist/api/OpenWalletSession.d.ts +8 -0
  96. package/dist/api/OpenWalletSession.d.ts.map +1 -0
  97. package/dist/api/PathInfo.d.ts +1 -0
  98. package/dist/api/PathInfo.d.ts.map +1 -1
  99. package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
  100. package/dist/api/SearchDevices.d.ts +3 -0
  101. package/dist/api/SearchDevices.d.ts.map +1 -1
  102. package/dist/api/UploadPortfolio.d.ts +17 -0
  103. package/dist/api/UploadPortfolio.d.ts.map +1 -0
  104. package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
  105. package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
  106. package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
  107. package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
  108. package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
  109. package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
  110. package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
  111. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
  112. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
  113. package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
  114. package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
  115. package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
  116. package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
  117. package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
  118. package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
  119. package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
  120. package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
  121. package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
  122. package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
  123. package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
  124. package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
  125. package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
  126. package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
  127. package/dist/api/btc/BTCGetAddress.d.ts +1 -0
  128. package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
  129. package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
  130. package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
  131. package/dist/api/btc/BTCSignMessage.d.ts +1 -0
  132. package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
  133. package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
  134. package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
  135. package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
  136. package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
  137. package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
  138. package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
  139. package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
  140. package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
  141. package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
  142. package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
  143. package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
  144. package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
  145. package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
  146. package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
  147. package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
  148. package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
  149. package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -0
  150. package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
  151. package/dist/api/conflux/ConfluxSignMessage.d.ts +2 -0
  152. package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
  153. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +2 -0
  154. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
  155. package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -0
  156. package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
  157. package/dist/api/cosmos/CosmosGetAddress.d.ts +1 -0
  158. package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
  159. package/dist/api/cosmos/CosmosGetPublicKey.d.ts +1 -0
  160. package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
  161. package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -0
  162. package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
  163. package/dist/api/device/DeviceCancel.d.ts +1 -0
  164. package/dist/api/device/DeviceCancel.d.ts.map +1 -1
  165. package/dist/api/device/DeviceChangePin.d.ts +1 -0
  166. package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
  167. package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -2
  168. package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
  169. package/dist/api/device/DeviceLock.d.ts +1 -0
  170. package/dist/api/device/DeviceLock.d.ts.map +1 -1
  171. package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -0
  172. package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
  173. package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -0
  174. package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
  175. package/dist/api/device/DeviceSettings.d.ts +1 -0
  176. package/dist/api/device/DeviceSettings.d.ts.map +1 -1
  177. package/dist/api/device/DeviceSupportFeatures.d.ts +1 -0
  178. package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
  179. package/dist/api/device/DeviceUnlock.d.ts +1 -0
  180. package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
  181. package/dist/api/device/DeviceUpdateBootloader.d.ts +5 -1
  182. package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
  183. package/dist/api/device/DeviceWipe.d.ts +1 -0
  184. package/dist/api/device/DeviceWipe.d.ts.map +1 -1
  185. package/dist/api/device/PreInitialize.d.ts +1 -0
  186. package/dist/api/device/PreInitialize.d.ts.map +1 -1
  187. package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
  188. package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
  189. package/dist/api/evm/EVMGetAddress.d.ts +1 -0
  190. package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
  191. package/dist/api/evm/EVMGetPublicKey.d.ts +1 -0
  192. package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
  193. package/dist/api/evm/EVMSignMessage.d.ts +1 -0
  194. package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
  195. package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
  196. package/dist/api/evm/EVMSignTransaction.d.ts +1 -0
  197. package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
  198. package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
  199. package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
  200. package/dist/api/evm/EVMVerifyMessage.d.ts +1 -0
  201. package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
  202. package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
  203. package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
  204. package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
  205. package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
  206. package/dist/api/firmware/FirmwareArtifactSource.d.ts +25 -0
  207. package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +1 -0
  208. package/dist/api/firmware/FirmwareHostBinding.d.ts +6 -0
  209. package/dist/api/firmware/FirmwareHostBinding.d.ts.map +1 -0
  210. package/dist/api/firmware/FirmwarePreparationError.d.ts +3 -0
  211. package/dist/api/firmware/FirmwarePreparationError.d.ts.map +1 -0
  212. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +8 -0
  213. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
  214. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +3 -0
  215. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +1 -0
  216. package/dist/api/firmware/FirmwareUpdatePlan.d.ts +25 -0
  217. package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -0
  218. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +30 -0
  219. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
  220. package/dist/api/firmware/getBinary.d.ts +18 -3
  221. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  222. package/dist/api/firmware/progressThrottle.d.ts +3 -0
  223. package/dist/api/firmware/progressThrottle.d.ts.map +1 -0
  224. package/dist/api/firmware/updateBootloader.d.ts +2 -0
  225. package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
  226. package/dist/api/firmware/uploadFirmware.d.ts +9 -1
  227. package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
  228. package/dist/api/helpers/filesystemValidation.d.ts +3 -0
  229. package/dist/api/helpers/filesystemValidation.d.ts.map +1 -1
  230. package/dist/api/helpers/paramsValidator.d.ts +1 -0
  231. package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
  232. package/dist/api/helpers/protocolV2FileWrite.d.ts +33 -0
  233. package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
  234. package/dist/api/index.d.ts +6 -29
  235. package/dist/api/index.d.ts.map +1 -1
  236. package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -0
  237. package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
  238. package/dist/api/kaspa/KaspaSignTransaction.d.ts +9 -1
  239. package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
  240. package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
  241. package/dist/api/lightning/LnurlAuth.d.ts +0 -4
  242. package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
  243. package/dist/api/near/NearGetAddress.d.ts +1 -0
  244. package/dist/api/near/NearGetAddress.d.ts.map +1 -1
  245. package/dist/api/near/NearSignTransaction.d.ts +1 -0
  246. package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
  247. package/dist/api/nem/NEMGetAddress.d.ts +1 -0
  248. package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
  249. package/dist/api/nem/NEMSignTransaction.d.ts +1 -0
  250. package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
  251. package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
  252. package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
  253. package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
  254. package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
  255. package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
  256. package/dist/api/nexa/NexaSignTransaction.d.ts +1 -0
  257. package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
  258. package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -0
  259. package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
  260. package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -0
  261. package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
  262. package/dist/api/nostr/NostrGetPublicKey.d.ts +1 -0
  263. package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
  264. package/dist/api/nostr/NostrSignEvent.d.ts +1 -0
  265. package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
  266. package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -0
  267. package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
  268. package/dist/api/polkadot/PolkadotGetAddress.d.ts +1 -0
  269. package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
  270. package/dist/api/polkadot/PolkadotSignTransaction.d.ts +1 -0
  271. package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -1
  272. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +7 -0
  273. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -0
  274. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +8 -0
  275. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -0
  276. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +2 -1
  277. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
  278. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +4 -2
  279. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
  280. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +2 -1
  281. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -1
  282. package/dist/api/protocol-v2/DeviceInfoGet.d.ts +29 -0
  283. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -0
  284. package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
  285. package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
  286. package/dist/api/protocol-v2/DeviceStatusGet.d.ts +7 -0
  287. package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
  288. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +27 -0
  289. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
  290. package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
  291. package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
  292. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +7 -0
  293. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -0
  294. package/dist/api/protocol-v2/Ping.d.ts +3 -0
  295. package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
  296. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +7 -0
  297. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -0
  298. package/dist/api/protocol-v2/helpers.d.ts +27 -18
  299. package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
  300. package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
  301. package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
  302. package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
  303. package/dist/api/solana/SolGetAddress.d.ts +1 -0
  304. package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
  305. package/dist/api/solana/SolSignMessage.d.ts +1 -0
  306. package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
  307. package/dist/api/solana/SolSignOffchainMessage.d.ts +1 -0
  308. package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
  309. package/dist/api/solana/SolSignTransaction.d.ts +1 -0
  310. package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
  311. package/dist/api/starcoin/StarcoinGetAddress.d.ts +1 -0
  312. package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
  313. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +1 -0
  314. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
  315. package/dist/api/starcoin/StarcoinSignMessage.d.ts +1 -0
  316. package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
  317. package/dist/api/starcoin/StarcoinSignTransaction.d.ts +1 -0
  318. package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
  319. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +1 -0
  320. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
  321. package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
  322. package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
  323. package/dist/api/stellar/StellarSignTransaction.d.ts +2 -3
  324. package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
  325. package/dist/api/sui/SuiGetAddress.d.ts +1 -0
  326. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  327. package/dist/api/sui/SuiGetPublicKey.d.ts +1 -0
  328. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  329. package/dist/api/sui/SuiSignMessage.d.ts +1 -0
  330. package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
  331. package/dist/api/sui/SuiSignTransaction.d.ts +1 -0
  332. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  333. package/dist/api/ton/TonGetAddress.d.ts +1 -0
  334. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  335. package/dist/api/ton/TonSignData.d.ts +2 -5
  336. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  337. package/dist/api/ton/TonSignMessage.d.ts +1 -0
  338. package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
  339. package/dist/api/ton/TonSignProof.d.ts +1 -0
  340. package/dist/api/ton/TonSignProof.d.ts.map +1 -1
  341. package/dist/api/tron/TronGetAddress.d.ts +1 -0
  342. package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
  343. package/dist/api/tron/TronSignMessage.d.ts +5 -0
  344. package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
  345. package/dist/api/tron/TronSignTransaction.d.ts +1 -0
  346. package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
  347. package/dist/api/utils.d.ts +2 -1
  348. package/dist/api/utils.d.ts.map +1 -1
  349. package/dist/api/xrp/XrpGetAddress.d.ts +1 -0
  350. package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
  351. package/dist/api/xrp/XrpSignTransaction.d.ts +1 -0
  352. package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -1
  353. package/dist/constants/index.d.ts +1 -1
  354. package/dist/constants/index.d.ts.map +1 -1
  355. package/dist/core/RequestQueue.d.ts.map +1 -1
  356. package/dist/core/deviceEventRegistration.d.ts +11 -0
  357. package/dist/core/deviceEventRegistration.d.ts.map +1 -0
  358. package/dist/core/index.d.ts +3 -1
  359. package/dist/core/index.d.ts.map +1 -1
  360. package/dist/data-manager/DataManager.d.ts +2 -1
  361. package/dist/data-manager/DataManager.d.ts.map +1 -1
  362. package/dist/data-manager/connectSettings.d.ts.map +1 -1
  363. package/dist/device/Device.d.ts +40 -13
  364. package/dist/device/Device.d.ts.map +1 -1
  365. package/dist/device/DeviceCommands.d.ts +8 -6
  366. package/dist/device/DeviceCommands.d.ts.map +1 -1
  367. package/dist/device/DeviceFeaturesState.d.ts +3 -0
  368. package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
  369. package/dist/device/DevicePool.d.ts +4 -2
  370. package/dist/device/DevicePool.d.ts.map +1 -1
  371. package/dist/device/DeviceStateMapper.d.ts +13 -0
  372. package/dist/device/DeviceStateMapper.d.ts.map +1 -0
  373. package/dist/device/DeviceStateProjector.d.ts +7 -0
  374. package/dist/device/DeviceStateProjector.d.ts.map +1 -0
  375. package/dist/device/DeviceStateStore.d.ts +21 -0
  376. package/dist/device/DeviceStateStore.d.ts.map +1 -0
  377. package/dist/device/DeviceWalletSessionStore.d.ts +20 -0
  378. package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
  379. package/dist/device/cloneDeviceState.d.ts +2 -0
  380. package/dist/device/cloneDeviceState.d.ts.map +1 -0
  381. package/dist/device/deviceIdentity.d.ts +5 -0
  382. package/dist/device/deviceIdentity.d.ts.map +1 -0
  383. package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
  384. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
  385. package/dist/deviceProfile/index.d.ts +0 -1
  386. package/dist/deviceProfile/index.d.ts.map +1 -1
  387. package/dist/events/device.d.ts +12 -2
  388. package/dist/events/device.d.ts.map +1 -1
  389. package/dist/events/logBlockEvent.d.ts.map +1 -1
  390. package/dist/events/ui-request.d.ts +19 -2
  391. package/dist/events/ui-request.d.ts.map +1 -1
  392. package/dist/index.d.ts +1487 -691
  393. package/dist/index.d.ts.map +1 -1
  394. package/dist/index.js +8831 -4014
  395. package/dist/inject.d.ts.map +1 -1
  396. package/dist/lowLevelInject.d.ts.map +1 -1
  397. package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
  398. package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
  399. package/dist/protocols/protocol-v2/features.d.ts +23 -28
  400. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  401. package/dist/protocols/protocol-v2/firmware.d.ts +11 -9
  402. package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
  403. package/dist/protocols/protocol-v2/index.d.ts +3 -2
  404. package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
  405. package/dist/protocols/protocol-v2/lockedError.d.ts +2 -0
  406. package/dist/protocols/protocol-v2/lockedError.d.ts.map +1 -0
  407. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +16 -0
  408. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
  409. package/dist/protocols/protocol-v2/uiInteraction.d.ts +39 -0
  410. package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
  411. package/dist/protocols/protocol-v2/unlockPolicy.d.ts +4 -0
  412. package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -0
  413. package/dist/protocols/protocol-v2/unlockRetry.d.ts +10 -0
  414. package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -0
  415. package/dist/protocols/protocol-v2/walletSession.d.ts +31 -0
  416. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
  417. package/dist/topLevelInject.d.ts.map +1 -1
  418. package/dist/types/api/checkAllFirmwareRelease.d.ts +5 -2
  419. package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
  420. package/dist/types/api/deviceSettings.d.ts +11 -2
  421. package/dist/types/api/deviceSettings.d.ts.map +1 -1
  422. package/dist/types/api/deviceUnlock.d.ts +1 -1
  423. package/dist/types/api/deviceUnlock.d.ts.map +1 -1
  424. package/dist/types/api/deviceUpdateBootloader.d.ts +6 -0
  425. package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
  426. package/dist/types/api/export.d.ts +5 -2
  427. package/dist/types/api/export.d.ts.map +1 -1
  428. package/dist/types/api/firmwareUpdate.d.ts +75 -6
  429. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  430. package/dist/types/api/firmwareUpdateCapabilities.d.ts +9 -0
  431. package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +1 -0
  432. package/dist/types/api/firmwareUpdatePlan.d.ts +28 -0
  433. package/dist/types/api/firmwareUpdatePlan.d.ts.map +1 -0
  434. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +42 -0
  435. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +1 -0
  436. package/dist/types/api/getDeviceState.d.ts +12 -0
  437. package/dist/types/api/getDeviceState.d.ts.map +1 -0
  438. package/dist/types/api/getFeatures.d.ts.map +1 -1
  439. package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
  440. package/dist/types/api/getPassphraseState.d.ts +2 -10
  441. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  442. package/dist/types/api/index.d.ts +25 -35
  443. package/dist/types/api/index.d.ts.map +1 -1
  444. package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
  445. package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
  446. package/dist/types/api/openWalletSession.d.ts +29 -0
  447. package/dist/types/api/openWalletSession.d.ts.map +1 -0
  448. package/dist/types/api/protocolV2.d.ts +15 -89
  449. package/dist/types/api/protocolV2.d.ts.map +1 -1
  450. package/dist/types/api/sessionCache.d.ts +13 -0
  451. package/dist/types/api/sessionCache.d.ts.map +1 -0
  452. package/dist/types/device.d.ts +122 -6
  453. package/dist/types/device.d.ts.map +1 -1
  454. package/dist/types/params.d.ts +1 -0
  455. package/dist/types/params.d.ts.map +1 -1
  456. package/dist/types/settings.d.ts +34 -2
  457. package/dist/types/settings.d.ts.map +1 -1
  458. package/dist/utils/assets.d.ts +2 -1
  459. package/dist/utils/assets.d.ts.map +1 -1
  460. package/dist/utils/deviceFeaturesCompat.d.ts +13 -0
  461. package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
  462. package/dist/utils/deviceFeaturesUtils.d.ts +11 -3
  463. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  464. package/dist/utils/deviceInfoUtils.d.ts +9 -9
  465. package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
  466. package/dist/utils/deviceSettings.d.ts +38 -7
  467. package/dist/utils/deviceSettings.d.ts.map +1 -1
  468. package/dist/utils/deviceVersionUtils.d.ts +7 -5
  469. package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
  470. package/dist/utils/homescreen.d.ts.map +1 -1
  471. package/dist/utils/index.d.ts +5 -2
  472. package/dist/utils/index.d.ts.map +1 -1
  473. package/dist/utils/networkUtils.d.ts +9 -1
  474. package/dist/utils/networkUtils.d.ts.map +1 -1
  475. package/dist/utils/patch.d.ts +1 -1
  476. package/dist/utils/patch.d.ts.map +1 -1
  477. package/dist/utils/pro2Wallpaper.d.ts +12 -0
  478. package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
  479. package/dist/utils/tracing.d.ts.map +1 -1
  480. package/package.json +4 -4
  481. package/src/api/BaseMethod.ts +52 -17
  482. package/src/api/CheckAllFirmwareRelease.ts +51 -4
  483. package/src/api/CheckBootloaderRelease.ts +1 -2
  484. package/src/api/CheckFirmwareRelease.ts +1 -2
  485. package/src/api/CipherKeyValue.ts +4 -0
  486. package/src/api/ClearSessionCache.ts +32 -0
  487. package/src/api/DirList.ts +9 -4
  488. package/src/api/DirMake.ts +7 -4
  489. package/src/api/DirRemove.ts +7 -4
  490. package/src/api/FileDelete.ts +7 -4
  491. package/src/api/FileRead.ts +27 -8
  492. package/src/api/FileWrite.ts +26 -168
  493. package/src/api/FirmwareUpdate.ts +11 -12
  494. package/src/api/FirmwareUpdateV2.ts +370 -112
  495. package/src/api/FirmwareUpdateV3.ts +266 -68
  496. package/src/api/FirmwareUpdateV4.ts +1687 -397
  497. package/src/api/GetDeviceState.ts +59 -0
  498. package/src/api/GetFeatures.ts +6 -4
  499. package/src/api/GetOnekeyFeatures.ts +1 -75
  500. package/src/api/GetPassphraseState.ts +21 -21
  501. package/src/api/OpenWalletSession.ts +202 -0
  502. package/src/api/PathInfo.ts +9 -4
  503. package/src/api/PromptWebDeviceAccess.ts +2 -3
  504. package/src/api/SearchDevices.ts +29 -4
  505. package/src/api/UploadPortfolio.ts +40 -0
  506. package/src/api/alephium/AlephiumGetAddress.ts +0 -4
  507. package/src/api/alephium/AlephiumSignMessage.ts +0 -4
  508. package/src/api/alephium/AlephiumSignTransaction.ts +2 -6
  509. package/src/api/algo/AlgoGetAddress.ts +4 -0
  510. package/src/api/algo/AlgoSignTransaction.ts +4 -0
  511. package/src/api/allnetwork/AllNetworkGetAddressBase.ts +9 -21
  512. package/src/api/aptos/AptosGetAddress.ts +4 -0
  513. package/src/api/aptos/AptosGetPublicKey.ts +4 -0
  514. package/src/api/aptos/AptosSignInMessage.ts +4 -0
  515. package/src/api/aptos/AptosSignMessage.ts +4 -0
  516. package/src/api/aptos/AptosSignTransaction.ts +4 -0
  517. package/src/api/benfen/BenfenGetAddress.ts +11 -7
  518. package/src/api/benfen/BenfenGetPublicKey.ts +0 -4
  519. package/src/api/benfen/BenfenSignMessage.ts +0 -4
  520. package/src/api/benfen/BenfenSignTransaction.ts +0 -4
  521. package/src/api/btc/BTCGetAddress.ts +8 -1
  522. package/src/api/btc/BTCGetPublicKey.ts +9 -2
  523. package/src/api/btc/BTCSignMessage.ts +8 -1
  524. package/src/api/btc/BTCSignPsbt.ts +4 -0
  525. package/src/api/btc/BTCSignTransaction.ts +8 -1
  526. package/src/api/btc/BTCVerifyMessage.ts +8 -1
  527. package/src/api/btc/helpers/versionLimit.ts +7 -4
  528. package/src/api/cardano/CardanoGetAddress.ts +4 -0
  529. package/src/api/cardano/CardanoGetPublicKey.ts +4 -0
  530. package/src/api/cardano/CardanoSignMessage.ts +5 -1
  531. package/src/api/cardano/CardanoSignTransaction.ts +5 -1
  532. package/src/api/conflux/ConfluxGetAddress.ts +6 -0
  533. package/src/api/conflux/ConfluxSignMessage.ts +6 -0
  534. package/src/api/conflux/ConfluxSignMessageCIP23.ts +6 -0
  535. package/src/api/conflux/ConfluxSignTransaction.ts +8 -5
  536. package/src/api/cosmos/CosmosGetAddress.ts +4 -0
  537. package/src/api/cosmos/CosmosGetPublicKey.ts +4 -0
  538. package/src/api/cosmos/CosmosSignTransaction.ts +4 -0
  539. package/src/api/device/DeviceCancel.ts +5 -0
  540. package/src/api/device/DeviceChangePin.ts +28 -0
  541. package/src/api/device/DeviceFullyUploadResource.ts +4 -5
  542. package/src/api/device/DeviceLock.ts +5 -0
  543. package/src/api/device/DeviceRebootToBoardloader.ts +9 -4
  544. package/src/api/device/DeviceRebootToBootloader.ts +9 -4
  545. package/src/api/device/DeviceSettings.ts +187 -1
  546. package/src/api/device/DeviceSupportFeatures.ts +4 -0
  547. package/src/api/device/DeviceUnlock.ts +13 -0
  548. package/src/api/device/DeviceUpdateBootloader.ts +123 -8
  549. package/src/api/device/DeviceWipe.ts +25 -0
  550. package/src/api/device/PreInitialize.ts +4 -0
  551. package/src/api/dynex/DnxGetAddress.ts +0 -6
  552. package/src/api/dynex/DnxSignTransaction.ts +0 -6
  553. package/src/api/evm/EVMGetAddress.ts +4 -0
  554. package/src/api/evm/EVMGetPublicKey.ts +4 -0
  555. package/src/api/evm/EVMSignMessage.ts +4 -0
  556. package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
  557. package/src/api/evm/EVMSignTransaction.ts +4 -0
  558. package/src/api/evm/EVMSignTypedData.ts +7 -5
  559. package/src/api/evm/EVMVerifyMessage.ts +4 -0
  560. package/src/api/evm/legacyV1/getAddress.ts +2 -2
  561. package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
  562. package/src/api/evm/legacyV1/signMessage.ts +2 -2
  563. package/src/api/evm/legacyV1/signTypedData.ts +2 -2
  564. package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
  565. package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
  566. package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
  567. package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
  568. package/src/api/firmware/FirmwareArtifactSource.ts +278 -0
  569. package/src/api/firmware/FirmwareHostBinding.ts +100 -0
  570. package/src/api/firmware/FirmwarePreparationError.ts +12 -0
  571. package/src/api/firmware/FirmwareUpdateBaseMethod.ts +71 -7
  572. package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
  573. package/src/api/firmware/FirmwareUpdatePlan.ts +745 -0
  574. package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +392 -0
  575. package/src/api/firmware/getBinary.ts +8 -3
  576. package/src/api/firmware/progressThrottle.ts +44 -0
  577. package/src/api/firmware/updateBootloader.ts +19 -4
  578. package/src/api/firmware/uploadFirmware.ts +140 -22
  579. package/src/api/helpers/batchGetPublickeys.ts +2 -2
  580. package/src/api/helpers/filesystemValidation.ts +61 -0
  581. package/src/api/helpers/paramsValidator.ts +1 -1
  582. package/src/api/helpers/protocolV2FileWrite.ts +199 -0
  583. package/src/api/index.ts +7 -30
  584. package/src/api/kaspa/KaspaGetAddress.ts +7 -0
  585. package/src/api/kaspa/KaspaSignTransaction.ts +373 -29
  586. package/src/api/kaspa/helpers/TransferSerialize.ts +17 -7
  587. package/src/api/lightning/LnurlAuth.ts +0 -4
  588. package/src/api/near/NearGetAddress.ts +4 -0
  589. package/src/api/near/NearSignTransaction.ts +4 -0
  590. package/src/api/nem/NEMGetAddress.ts +4 -0
  591. package/src/api/nem/NEMSignTransaction.ts +4 -0
  592. package/src/api/neo/NeoGetAddress.ts +0 -4
  593. package/src/api/neo/NeoSignTransaction.ts +0 -4
  594. package/src/api/nervos/NervosGetAddress.ts +0 -4
  595. package/src/api/nervos/NervosSignTransaction.ts +2 -6
  596. package/src/api/nexa/NexaGetAddress.ts +0 -4
  597. package/src/api/nexa/NexaSignTransaction.ts +3 -5
  598. package/src/api/nostr/NostrDecryptMessage.ts +4 -0
  599. package/src/api/nostr/NostrEncryptMessage.ts +4 -0
  600. package/src/api/nostr/NostrGetPublicKey.ts +4 -0
  601. package/src/api/nostr/NostrSignEvent.ts +4 -0
  602. package/src/api/nostr/NostrSignSchnorr.ts +4 -0
  603. package/src/api/polkadot/PolkadotGetAddress.ts +4 -0
  604. package/src/api/polkadot/PolkadotSignTransaction.ts +4 -0
  605. package/src/api/protocol-v2/{FactoryGetDeviceInfo.ts → DeviceFactoryInfoGet.ts} +8 -5
  606. package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +35 -0
  607. package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +11 -10
  608. package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +45 -7
  609. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +10 -5
  610. package/src/api/protocol-v2/DeviceInfoGet.ts +141 -0
  611. package/src/api/protocol-v2/DeviceReboot.ts +8 -4
  612. package/src/api/protocol-v2/DeviceStatusGet.ts +19 -0
  613. package/src/api/protocol-v2/DeviceUploadWallpaper.ts +134 -0
  614. package/src/api/protocol-v2/FilesystemFormat.ts +9 -3
  615. package/src/api/protocol-v2/{FilesystemFixPermission.ts → FilesystemPermissionFix.ts} +7 -4
  616. package/src/api/protocol-v2/Ping.ts +37 -3
  617. package/src/api/protocol-v2/ProtocolInfoRequest.ts +19 -0
  618. package/src/api/protocol-v2/helpers.ts +71 -50
  619. package/src/api/scdo/ScdoGetAddress.ts +0 -4
  620. package/src/api/scdo/ScdoSignMessage.ts +0 -4
  621. package/src/api/scdo/ScdoSignTransaction.ts +0 -4
  622. package/src/api/solana/SolGetAddress.ts +4 -0
  623. package/src/api/solana/SolSignMessage.ts +4 -0
  624. package/src/api/solana/SolSignOffchainMessage.ts +4 -0
  625. package/src/api/solana/SolSignTransaction.ts +4 -0
  626. package/src/api/starcoin/StarcoinGetAddress.ts +4 -0
  627. package/src/api/starcoin/StarcoinGetPublicKey.ts +4 -0
  628. package/src/api/starcoin/StarcoinSignMessage.ts +4 -0
  629. package/src/api/starcoin/StarcoinSignTransaction.ts +4 -0
  630. package/src/api/starcoin/StarcoinVerifyMessage.ts +4 -0
  631. package/src/api/stellar/StellarGetAddress.ts +1 -10
  632. package/src/api/stellar/StellarSignTransaction.ts +1 -14
  633. package/src/api/sui/SuiGetAddress.ts +4 -0
  634. package/src/api/sui/SuiGetPublicKey.ts +4 -0
  635. package/src/api/sui/SuiSignMessage.ts +4 -0
  636. package/src/api/sui/SuiSignTransaction.ts +4 -0
  637. package/src/api/ton/TonGetAddress.ts +4 -0
  638. package/src/api/ton/TonSignData.ts +6 -6
  639. package/src/api/ton/TonSignMessage.ts +4 -0
  640. package/src/api/ton/TonSignProof.ts +4 -0
  641. package/src/api/tron/TronGetAddress.ts +4 -0
  642. package/src/api/tron/TronSignMessage.ts +18 -7
  643. package/src/api/tron/TronSignTransaction.ts +4 -0
  644. package/src/api/utils.ts +7 -3
  645. package/src/api/xrp/XrpGetAddress.ts +4 -0
  646. package/src/api/xrp/XrpSignTransaction.ts +5 -1
  647. package/src/constants/index.ts +1 -4
  648. package/src/core/RequestQueue.ts +1 -0
  649. package/src/core/deviceEventRegistration.ts +23 -0
  650. package/src/core/index.ts +181 -58
  651. package/src/data/messages/messages-protocol-v2.json +796 -620
  652. package/src/data/messages/messages.json +286 -1
  653. package/src/data-manager/DataManager.ts +45 -38
  654. package/src/data-manager/TransportManager.ts +1 -1
  655. package/src/data-manager/connectSettings.ts +13 -4
  656. package/src/device/Device.ts +573 -278
  657. package/src/device/DeviceCommands.ts +154 -156
  658. package/src/device/DeviceFeaturesState.ts +25 -0
  659. package/src/device/DevicePool.ts +61 -13
  660. package/src/device/DeviceStateMapper.ts +366 -0
  661. package/src/device/DeviceStateProjector.ts +101 -0
  662. package/src/device/DeviceStateStore.ts +201 -0
  663. package/src/device/DeviceWalletSessionStore.ts +105 -0
  664. package/src/device/cloneDeviceState.ts +39 -0
  665. package/src/device/deviceIdentity.ts +18 -0
  666. package/src/deviceProfile/buildDeviceFeatures.ts +234 -210
  667. package/src/deviceProfile/index.ts +0 -1
  668. package/src/events/device.ts +18 -1
  669. package/src/events/logBlockEvent.ts +1 -7
  670. package/src/events/ui-request.ts +25 -2
  671. package/src/index.ts +5 -0
  672. package/src/inject.ts +35 -47
  673. package/src/lowLevelInject.ts +5 -1
  674. package/src/protocols/protocol-v2/deviceSession.ts +24 -0
  675. package/src/protocols/protocol-v2/features.ts +68 -83
  676. package/src/protocols/protocol-v2/firmware.ts +12 -36
  677. package/src/protocols/protocol-v2/index.ts +3 -1
  678. package/src/protocols/protocol-v2/lockedError.ts +10 -0
  679. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +60 -0
  680. package/src/protocols/protocol-v2/uiInteraction.ts +210 -0
  681. package/src/protocols/protocol-v2/unlockPolicy.ts +105 -0
  682. package/src/protocols/protocol-v2/unlockRetry.ts +98 -0
  683. package/src/protocols/protocol-v2/walletSession.ts +202 -0
  684. package/src/topLevelInject.ts +5 -1
  685. package/src/types/api/checkAllFirmwareRelease.ts +5 -2
  686. package/src/types/api/deviceSettings.ts +26 -2
  687. package/src/types/api/deviceUnlock.ts +1 -1
  688. package/src/types/api/deviceUpdateBootloader.ts +6 -0
  689. package/src/types/api/export.ts +21 -0
  690. package/src/types/api/firmwareUpdate.ts +103 -19
  691. package/src/types/api/firmwareUpdateCapabilities.ts +9 -0
  692. package/src/types/api/firmwareUpdatePlan.ts +38 -0
  693. package/src/types/api/firmwareUpdatePreparedPlan.ts +53 -0
  694. package/src/types/api/getDeviceState.ts +19 -0
  695. package/src/types/api/getFeatures.ts +3 -0
  696. package/src/types/api/getOnekeyFeatures.ts +3 -0
  697. package/src/types/api/getPassphraseState.ts +9 -11
  698. package/src/types/api/index.ts +33 -73
  699. package/src/types/api/kaspaSignTransaction.ts +60 -4
  700. package/src/types/api/openWalletSession.ts +45 -0
  701. package/src/types/api/protocolV2.ts +23 -162
  702. package/src/types/api/sessionCache.ts +19 -0
  703. package/src/types/device.ts +172 -5
  704. package/src/types/params.ts +4 -0
  705. package/src/types/settings.ts +55 -35
  706. package/src/utils/assets.ts +4 -1
  707. package/src/utils/deviceFeaturesCompat.ts +173 -0
  708. package/src/utils/deviceFeaturesUtils.ts +66 -24
  709. package/src/utils/deviceInfoUtils.ts +27 -69
  710. package/src/utils/deviceSettings.ts +171 -39
  711. package/src/utils/deviceVersionUtils.ts +25 -44
  712. package/src/utils/findDefectiveBatchDevice.ts +3 -3
  713. package/src/utils/homescreen.ts +10 -0
  714. package/src/utils/index.ts +21 -2
  715. package/src/utils/networkUtils.ts +270 -14
  716. package/src/utils/pro2Wallpaper.ts +109 -0
  717. package/src/utils/tracing.ts +3 -1
  718. package/tsconfig.type-tests.json +8 -0
  719. package/dist/api/GetDeviceInfo.d.ts +0 -9
  720. package/dist/api/GetDeviceInfo.d.ts.map +0 -1
  721. package/dist/api/protocol-v2/DevReboot.d.ts +0 -7
  722. package/dist/api/protocol-v2/DevReboot.d.ts.map +0 -1
  723. package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts +0 -29
  724. package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts.map +0 -1
  725. package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +0 -7
  726. package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +0 -1
  727. package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +0 -6
  728. package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +0 -1
  729. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
  730. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
  731. package/dist/api/protocol-v2/FilesystemFixPermission.d.ts +0 -6
  732. package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +0 -1
  733. package/dist/api/protocol-v2/GetProtoVersion.d.ts +0 -6
  734. package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +0 -1
  735. package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
  736. package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
  737. package/dist/types/api/getDeviceInfo.d.ts +0 -85
  738. package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
  739. package/src/api/GetDeviceInfo.ts +0 -145
  740. package/src/api/protocol-v2/DevReboot.ts +0 -24
  741. package/src/api/protocol-v2/DeviceGetDeviceInfo.ts +0 -118
  742. package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +0 -29
  743. package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
  744. package/src/api/protocol-v2/GetProtoVersion.ts +0 -16
  745. package/src/deviceProfile/buildDeviceProfile.ts +0 -333
  746. package/src/types/api/getDeviceInfo.ts +0 -99
@@ -100,7 +100,6 @@
100
100
  "MessageType_GetFeatures": 55,
101
101
  "MessageType_SdProtect": 79,
102
102
  "MessageType_ChangeWipeCode": 82,
103
- "MessageType_EndSession": 83,
104
103
  "MessageType_DoPreauthorized": 84,
105
104
  "MessageType_PreauthorizedRequest": 85,
106
105
  "MessageType_CancelAuthorization": 86,
@@ -196,6 +195,7 @@
196
195
  "MessageType_EthereumGnosisSafeTxAck": 20118,
197
196
  "MessageType_EthereumGnosisSafeTxRequest": 20119,
198
197
  "MessageType_EthereumSignTxEIP7702OneKey": 20120,
198
+ "MessageType_EthereumSignTypedDataQR": 20121,
199
199
  "MessageType_NEMGetAddress": 67,
200
200
  "MessageType_NEMAddress": 68,
201
201
  "MessageType_NEMSignTx": 69,
@@ -419,8 +419,6 @@
419
419
  "MessageType_TonSignProof": 11905,
420
420
  "MessageType_TonSignedProof": 11906,
421
421
  "MessageType_TonTxAck": 11907,
422
- "MessageType_TonSignData": 11908,
423
- "MessageType_TonSignedData": 11909,
424
422
  "MessageType_ScdoGetAddress": 12001,
425
423
  "MessageType_ScdoAddress": 12002,
426
424
  "MessageType_ScdoSignTx": 12003,
@@ -450,46 +448,45 @@
450
448
  "MessageType_NeoAddress": 12302,
451
449
  "MessageType_NeoSignTx": 12303,
452
450
  "MessageType_NeoSignedTx": 12304,
453
- "MessageType_ReadSEPublicKey": 10004,
454
- "MessageType_SEPublicKey": 10005,
455
- "MessageType_WriteSEPublicCert": 10006,
456
- "MessageType_ReadSEPublicCert": 10007,
457
- "MessageType_SEPublicCert": 10008,
458
- "MessageType_SESignMessage": 10012,
459
- "MessageType_SEMessageSignature": 10013,
460
- "MessageType_ResourceUpload": 10018,
461
- "MessageType_ZoomRequest": 10019,
462
- "MessageType_BlurRequest": 10032,
463
- "MessageType_SetWallpaper": 10033,
464
- "MessageType_GetWallpaper": 10034,
465
- "MessageType_Wallpaper": 10035,
466
- "MessageType_ResourceRequest": 10020,
467
- "MessageType_ResourceAck": 10021,
468
- "MessageType_ResourceUpdate": 10022,
469
- "MessageType_ListResDir": 10023,
470
- "MessageType_FileInfoList": 10024,
471
- "MessageType_OnekeyGetFeatures": 10025,
472
- "MessageType_OnekeyFeatures": 10026,
473
- "MessageType_WriteSEPrivateKey": 10027,
474
- "MessageType_GetPassphraseState": 10028,
475
- "MessageType_PassphraseState": 10029,
476
- "MessageType_UnLockDevice": 10030,
477
- "MessageType_UnLockDeviceResponse": 10031,
478
- "MessageType_FactoryDeviceInfoSettings": 60000,
479
- "MessageType_FactoryGetDeviceInfo": 60001,
480
- "MessageType_FactoryDeviceInfo": 60002,
481
- "MessageType_GetProtoVersion": 60200,
482
- "MessageType_ProtoVersion": 60201,
483
- "MessageType_StartSession": 60205,
451
+ "MessageType_UiviewShowAddressRequest": 30200,
452
+ "MessageType_UiviewShowPublicKeyRequest": 30201,
453
+ "MessageType_UiviewConfirmTxRequest": 30202,
454
+ "MessageType_UiviewConfirmSignMessageRequest": 30203,
455
+ "MessageType_UiviewResponse": 30204,
456
+ "MessageType_DeviceFactoryInfoSet": 60000,
457
+ "MessageType_DeviceFactoryInfoGet": 60001,
458
+ "MessageType_DeviceFactoryInfo": 60002,
459
+ "MessageType_DeviceFactoryPermanentLock": 60003,
460
+ "MessageType_DeviceFactoryTest": 60004,
461
+ "MessageType_ProtocolInfoRequest": 60200,
462
+ "MessageType_ProtocolInfo": 60201,
484
463
  "MessageType_Ping": 60206,
485
464
  "MessageType_Success": 60207,
486
465
  "MessageType_Failure": 60208,
487
- "MessageType_DevReboot": 60400,
488
- "MessageType_DevGetDeviceInfo": 60600,
466
+ "MessageType_DeviceReboot": 60400,
467
+ "MessageType_DeviceSettings": 60410,
468
+ "MessageType_DeviceSettingsGet": 60411,
469
+ "MessageType_DeviceSettingsSet": 60412,
470
+ "MessageType_DeviceSettingsPageShow": 60413,
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_DeviceStatusGet": 60602,
482
+ "MessageType_DeviceStatus": 60603,
483
+ "MessageType_DevGetOnboardingStatus": 60604,
484
+ "MessageType_DevOnboardingStatus": 60605,
485
+ "MessageType_DeviceSessionGet": 60606,
486
+ "MessageType_DeviceSession": 60607,
487
+ "MessageType_DeviceSessionAskPin": 60608,
488
+ "MessageType_DeviceSessionAskPassphrase": 60609,
489
+ "MessageType_FilesystemPermissionFix": 60800,
493
490
  "MessageType_FilesystemPathInfo": 60801,
494
491
  "MessageType_FilesystemPathInfoQuery": 60802,
495
492
  "MessageType_FilesystemFile": 60803,
@@ -501,11 +498,17 @@
501
498
  "MessageType_FilesystemDirMake": 60809,
502
499
  "MessageType_FilesystemDirRemove": 60810,
503
500
  "MessageType_FilesystemFormat": 60811,
504
- "MessageType_DevFirmwareUpdate": 61000,
505
- "MessageType_DevFirmwareInstallProgress": 61001,
506
- "MessageType_DevGetFirmwareUpdateStatus": 61002,
507
- "MessageType_DevFirmwareUpdateStatus": 61003
508
- }
501
+ "MessageType_DeviceFirmwareUpdateRequest": 61000,
502
+ "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
503
+ "MessageType_DeviceFirmwareUpdateStatus": 61002,
504
+ "MessageType_PortfolioUpdate": 61200
505
+ },
506
+ "reserved": [
507
+ [90, 92],
508
+ [114, 122],
509
+ [300, 304],
510
+ [309, 312]
511
+ ]
509
512
  },
510
513
  "AlephiumGetAddress": {
511
514
  "fields": {
@@ -4094,207 +4097,6 @@
4094
4097
  }
4095
4098
  }
4096
4099
  },
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
4100
  "EosGetPublicKey": {
4299
4101
  "fields": {
4300
4102
  "address_n": {
@@ -5602,6 +5404,37 @@
5602
5404
  }
5603
5405
  }
5604
5406
  },
5407
+ "EthereumSignTypedDataQR": {
5408
+ "fields": {
5409
+ "address_n": {
5410
+ "rule": "repeated",
5411
+ "type": "uint32",
5412
+ "id": 1,
5413
+ "options": {
5414
+ "packed": false
5415
+ }
5416
+ },
5417
+ "json_data": {
5418
+ "type": "bytes",
5419
+ "id": 2
5420
+ },
5421
+ "chain_id": {
5422
+ "type": "uint64",
5423
+ "id": 3
5424
+ },
5425
+ "metamask_v4_compat": {
5426
+ "type": "bool",
5427
+ "id": 4,
5428
+ "options": {
5429
+ "default": true
5430
+ }
5431
+ },
5432
+ "request_id": {
5433
+ "type": "bytes",
5434
+ "id": 5
5435
+ }
5436
+ }
5437
+ },
5605
5438
  "EthereumGetPublicKeyOneKey": {
5606
5439
  "fields": {
5607
5440
  "address_n": {
@@ -6355,6 +6188,28 @@
6355
6188
  }
6356
6189
  }
6357
6190
  },
6191
+ "StartSession": {
6192
+ "fields": {
6193
+ "session_id": {
6194
+ "type": "bytes",
6195
+ "id": 1
6196
+ },
6197
+ "_skip_passphrase": {
6198
+ "type": "bool",
6199
+ "id": 2,
6200
+ "options": {
6201
+ "deprecated": true
6202
+ }
6203
+ },
6204
+ "derive_cardano": {
6205
+ "type": "bool",
6206
+ "id": 3
6207
+ }
6208
+ }
6209
+ },
6210
+ "EndSession": {
6211
+ "fields": {}
6212
+ },
6358
6213
  "GetFeatures": {
6359
6214
  "fields": {}
6360
6215
  },
@@ -6550,15 +6405,15 @@
6550
6405
  "type": "uint32",
6551
6406
  "id": 500
6552
6407
  },
6553
- "ble_name": {
6408
+ "coprocessor_bt_name": {
6554
6409
  "type": "string",
6555
6410
  "id": 501
6556
6411
  },
6557
- "ble_ver": {
6412
+ "coprocessor_version": {
6558
6413
  "type": "string",
6559
6414
  "id": 502
6560
6415
  },
6561
- "ble_enable": {
6416
+ "coprocessor_bt_enable": {
6562
6417
  "type": "bool",
6563
6418
  "id": 503
6564
6419
  },
@@ -6618,7 +6473,7 @@
6618
6473
  "type": "bytes",
6619
6474
  "id": 518
6620
6475
  },
6621
- "boardloader_version": {
6476
+ "romloader_version": {
6622
6477
  "type": "string",
6623
6478
  "id": 519
6624
6479
  },
@@ -6634,19 +6489,19 @@
6634
6489
  "type": "OneKeySeType",
6635
6490
  "id": 601
6636
6491
  },
6637
- "onekey_board_version": {
6492
+ "onekey_romloader_version": {
6638
6493
  "type": "string",
6639
6494
  "id": 602
6640
6495
  },
6641
- "onekey_board_hash": {
6496
+ "onekey_romloader_hash": {
6642
6497
  "type": "bytes",
6643
6498
  "id": 603
6644
6499
  },
6645
- "onekey_boot_version": {
6500
+ "onekey_bootloader_version": {
6646
6501
  "type": "string",
6647
6502
  "id": 604
6648
6503
  },
6649
- "onekey_boot_hash": {
6504
+ "onekey_bootloader_hash": {
6650
6505
  "type": "bytes",
6651
6506
  "id": 605
6652
6507
  },
@@ -6678,23 +6533,23 @@
6678
6533
  "type": "string",
6679
6534
  "id": 612
6680
6535
  },
6681
- "onekey_boot_build_id": {
6536
+ "onekey_bootloader_build_id": {
6682
6537
  "type": "string",
6683
6538
  "id": 613
6684
6539
  },
6685
- "onekey_ble_name": {
6540
+ "onekey_coprocessor_bt_name": {
6686
6541
  "type": "string",
6687
6542
  "id": 614
6688
6543
  },
6689
- "onekey_ble_version": {
6544
+ "onekey_coprocessor_version": {
6690
6545
  "type": "string",
6691
6546
  "id": 615
6692
6547
  },
6693
- "onekey_ble_build_id": {
6548
+ "onekey_coprocessor_build_id": {
6694
6549
  "type": "string",
6695
6550
  "id": 616
6696
6551
  },
6697
- "onekey_ble_hash": {
6552
+ "onekey_coprocessor_hash": {
6698
6553
  "type": "bytes",
6699
6554
  "id": 617
6700
6555
  },
@@ -6770,11 +6625,11 @@
6770
6625
  "type": "OneKeyDeviceType",
6771
6626
  "id": 1
6772
6627
  },
6773
- "onekey_board_version": {
6628
+ "onekey_romloader_version": {
6774
6629
  "type": "string",
6775
6630
  "id": 2
6776
6631
  },
6777
- "onekey_boot_version": {
6632
+ "onekey_bootloader_version": {
6778
6633
  "type": "string",
6779
6634
  "id": 3
6780
6635
  },
@@ -6782,11 +6637,11 @@
6782
6637
  "type": "string",
6783
6638
  "id": 4
6784
6639
  },
6785
- "onekey_board_hash": {
6640
+ "onekey_romloader_hash": {
6786
6641
  "type": "bytes",
6787
6642
  "id": 5
6788
6643
  },
6789
- "onekey_boot_hash": {
6644
+ "onekey_bootloader_hash": {
6790
6645
  "type": "bytes",
6791
6646
  "id": 6
6792
6647
  },
@@ -6794,11 +6649,11 @@
6794
6649
  "type": "bytes",
6795
6650
  "id": 7
6796
6651
  },
6797
- "onekey_board_build_id": {
6652
+ "onekey_romloader_build_id": {
6798
6653
  "type": "string",
6799
6654
  "id": 8
6800
6655
  },
6801
- "onekey_boot_build_id": {
6656
+ "onekey_bootloader_build_id": {
6802
6657
  "type": "string",
6803
6658
  "id": 9
6804
6659
  },
@@ -6810,19 +6665,19 @@
6810
6665
  "type": "string",
6811
6666
  "id": 11
6812
6667
  },
6813
- "onekey_ble_name": {
6668
+ "onekey_coprocessor_bt_name": {
6814
6669
  "type": "string",
6815
6670
  "id": 12
6816
6671
  },
6817
- "onekey_ble_version": {
6672
+ "onekey_coprocessor_version": {
6818
6673
  "type": "string",
6819
6674
  "id": 13
6820
6675
  },
6821
- "onekey_ble_build_id": {
6676
+ "onekey_coprocessor_build_id": {
6822
6677
  "type": "string",
6823
6678
  "id": 14
6824
6679
  },
6825
- "onekey_ble_hash": {
6680
+ "onekey_coprocessor_hash": {
6826
6681
  "type": "bytes",
6827
6682
  "id": 15
6828
6683
  },
@@ -6894,51 +6749,51 @@
6894
6749
  "type": "string",
6895
6750
  "id": 32
6896
6751
  },
6897
- "onekey_se01_boot_version": {
6752
+ "onekey_se01_bootloader_version": {
6898
6753
  "type": "string",
6899
6754
  "id": 33
6900
6755
  },
6901
- "onekey_se02_boot_version": {
6756
+ "onekey_se02_bootloader_version": {
6902
6757
  "type": "string",
6903
6758
  "id": 34
6904
6759
  },
6905
- "onekey_se03_boot_version": {
6760
+ "onekey_se03_bootloader_version": {
6906
6761
  "type": "string",
6907
6762
  "id": 35
6908
6763
  },
6909
- "onekey_se04_boot_version": {
6764
+ "onekey_se04_bootloader_version": {
6910
6765
  "type": "string",
6911
6766
  "id": 36
6912
6767
  },
6913
- "onekey_se01_boot_hash": {
6768
+ "onekey_se01_bootloader_hash": {
6914
6769
  "type": "bytes",
6915
6770
  "id": 37
6916
6771
  },
6917
- "onekey_se02_boot_hash": {
6772
+ "onekey_se02_bootloader_hash": {
6918
6773
  "type": "bytes",
6919
6774
  "id": 38
6920
6775
  },
6921
- "onekey_se03_boot_hash": {
6776
+ "onekey_se03_bootloader_hash": {
6922
6777
  "type": "bytes",
6923
6778
  "id": 39
6924
6779
  },
6925
- "onekey_se04_boot_hash": {
6780
+ "onekey_se04_bootloader_hash": {
6926
6781
  "type": "bytes",
6927
6782
  "id": 40
6928
6783
  },
6929
- "onekey_se01_boot_build_id": {
6784
+ "onekey_se01_bootloader_build_id": {
6930
6785
  "type": "string",
6931
6786
  "id": 41
6932
6787
  },
6933
- "onekey_se02_boot_build_id": {
6788
+ "onekey_se02_bootloader_build_id": {
6934
6789
  "type": "string",
6935
6790
  "id": 42
6936
6791
  },
6937
- "onekey_se03_boot_build_id": {
6792
+ "onekey_se03_bootloader_build_id": {
6938
6793
  "type": "string",
6939
6794
  "id": 43
6940
6795
  },
6941
- "onekey_se04_boot_build_id": {
6796
+ "onekey_se04_bootloader_build_id": {
6942
6797
  "type": "string",
6943
6798
  "id": 44
6944
6799
  }
@@ -6955,9 +6810,6 @@
6955
6810
  }
6956
6811
  }
6957
6812
  },
6958
- "EndSession": {
6959
- "fields": {}
6960
- },
6961
6813
  "ApplySettings": {
6962
6814
  "fields": {
6963
6815
  "language": {
@@ -7609,14 +7461,6 @@
7609
7461
  "passphrase_state": {
7610
7462
  "type": "string",
7611
7463
  "id": 1
7612
- },
7613
- "_only_main_pin": {
7614
- "type": "bool",
7615
- "id": 2
7616
- },
7617
- "allow_create_attach_pin": {
7618
- "type": "bool",
7619
- "id": 3
7620
7464
  }
7621
7465
  }
7622
7466
  },
@@ -11662,6 +11506,33 @@
11662
11506
  }
11663
11507
  }
11664
11508
  },
11509
+ "UiAnimationType": {
11510
+ "values": {
11511
+ "Unknown": 0,
11512
+ "Signing": 1
11513
+ }
11514
+ },
11515
+ "UiAnimationCommand": {
11516
+ "values": {
11517
+ "CommandUnknown": 0,
11518
+ "Start": 1,
11519
+ "Stop": 2,
11520
+ "Refresh": 3
11521
+ }
11522
+ },
11523
+ "UiAnimationRequest": {
11524
+ "fields": {
11525
+ "command": {
11526
+ "rule": "required",
11527
+ "type": "UiAnimationCommand",
11528
+ "id": 1
11529
+ },
11530
+ "type": {
11531
+ "type": "UiAnimationType",
11532
+ "id": 2
11533
+ }
11534
+ }
11535
+ },
11665
11536
  "ViewAmount": {
11666
11537
  "fields": {
11667
11538
  "is_unlimited": {
@@ -11723,6 +11594,30 @@
11723
11594
  }
11724
11595
  }
11725
11596
  },
11597
+ "ViewRawData": {
11598
+ "fields": {
11599
+ "initial_data": {
11600
+ "rule": "required",
11601
+ "type": "string",
11602
+ "id": 1
11603
+ },
11604
+ "placeholder": {
11605
+ "rule": "required",
11606
+ "type": "uint32",
11607
+ "id": 2
11608
+ }
11609
+ }
11610
+ },
11611
+ "ViewSignLayout": {
11612
+ "values": {
11613
+ "LayoutDefault": 0,
11614
+ "LayoutSafeTxCreate": 1,
11615
+ "LayoutFinalConfirm": 2,
11616
+ "Layout7702": 3,
11617
+ "LayoutFlat": 4,
11618
+ "LayoutEthApprove": 5
11619
+ }
11620
+ },
11726
11621
  "ViewSignPage": {
11727
11622
  "fields": {
11728
11623
  "title": {
@@ -11742,13 +11637,31 @@
11742
11637
  "tip": {
11743
11638
  "type": "ViewTip",
11744
11639
  "id": 4
11745
- }
11746
- }
11747
- },
11748
- "ViewVerifyPage": {
11749
- "fields": {
11750
- "title": {
11751
- "rule": "required",
11640
+ },
11641
+ "raw_data": {
11642
+ "type": "ViewRawData",
11643
+ "id": 5
11644
+ },
11645
+ "slide_to_confirm": {
11646
+ "type": "bool",
11647
+ "id": 6,
11648
+ "options": {
11649
+ "default": true
11650
+ }
11651
+ },
11652
+ "layout": {
11653
+ "type": "ViewSignLayout",
11654
+ "id": 7,
11655
+ "options": {
11656
+ "default": "LayoutDefault"
11657
+ }
11658
+ }
11659
+ }
11660
+ },
11661
+ "ViewVerifyPage": {
11662
+ "fields": {
11663
+ "title": {
11664
+ "rule": "required",
11752
11665
  "type": "string",
11753
11666
  "id": 1
11754
11667
  },
@@ -11761,6 +11674,18 @@
11761
11674
  "rule": "required",
11762
11675
  "type": "string",
11763
11676
  "id": 3
11677
+ },
11678
+ "network": {
11679
+ "type": "string",
11680
+ "id": 4
11681
+ },
11682
+ "derive_type": {
11683
+ "type": "string",
11684
+ "id": 5
11685
+ },
11686
+ "value_key": {
11687
+ "type": "uint32",
11688
+ "id": 6
11764
11689
  }
11765
11690
  }
11766
11691
  },
@@ -11846,181 +11771,464 @@
11846
11771
  }
11847
11772
  }
11848
11773
  },
11849
- "TonSignData": {
11774
+ "ProtocolInfoRequest": {
11850
11775
  "fields": {
11851
- "address_n": {
11776
+ "eventless_wallet_session": {
11777
+ "type": "bool",
11778
+ "id": 1,
11779
+ "options": {
11780
+ "default": false
11781
+ }
11782
+ }
11783
+ }
11784
+ },
11785
+ "ProtocolInfo": {
11786
+ "fields": {
11787
+ "version": {
11788
+ "rule": "required",
11789
+ "type": "uint32",
11790
+ "id": 1
11791
+ },
11792
+ "supported_messages": {
11852
11793
  "rule": "repeated",
11853
11794
  "type": "uint32",
11854
- "id": 1,
11795
+ "id": 2,
11855
11796
  "options": {
11856
11797
  "packed": false
11857
11798
  }
11858
11799
  },
11859
- "type": {
11800
+ "protobuf_definition": {
11801
+ "type": "string",
11802
+ "id": 3
11803
+ }
11804
+ }
11805
+ },
11806
+ "Ping": {
11807
+ "fields": {
11808
+ "message": {
11809
+ "type": "string",
11810
+ "id": 1,
11811
+ "options": {
11812
+ "default": ""
11813
+ }
11814
+ }
11815
+ }
11816
+ },
11817
+ "Success": {
11818
+ "fields": {
11819
+ "message": {
11820
+ "type": "string",
11821
+ "id": 1,
11822
+ "options": {
11823
+ "default": ""
11824
+ }
11825
+ }
11826
+ }
11827
+ },
11828
+ "Failure": {
11829
+ "fields": {
11830
+ "code": {
11860
11831
  "rule": "required",
11861
- "type": "TonSignDataType",
11832
+ "type": "FailureType",
11833
+ "id": 1
11834
+ },
11835
+ "subcode": {
11836
+ "type": "uint32",
11862
11837
  "id": 2
11863
11838
  },
11864
- "payload": {
11865
- "rule": "required",
11866
- "type": "bytes",
11839
+ "message": {
11840
+ "type": "string",
11867
11841
  "id": 3
11842
+ }
11843
+ },
11844
+ "nested": {
11845
+ "FailureType": {
11846
+ "values": {
11847
+ "Failure_InvalidMessage": 1,
11848
+ "Failure_UndefinedError": 2,
11849
+ "Failure_UsageError": 3,
11850
+ "Failure_DataError": 4,
11851
+ "Failure_ProcessError": 5
11852
+ }
11853
+ }
11854
+ }
11855
+ },
11856
+ "DeviceErrorCode": {
11857
+ "values": {
11858
+ "DeviceError_None": 0,
11859
+ "DeviceError_Busy": 1,
11860
+ "DeviceError_NotInitialized": 2,
11861
+ "DeviceError_ActionCancelled": 3,
11862
+ "DeviceError_PinAlreadyUsed": 4,
11863
+ "DeviceError_PersistFailed": 5,
11864
+ "DeviceError_SeError": 6,
11865
+ "DeviceError_InvalidLanguage": 7,
11866
+ "DeviceError_WallpaperNotUsable": 8,
11867
+ "DeviceError_DeviceLocked": 9
11868
+ }
11869
+ },
11870
+ "DeviceRebootType": {
11871
+ "values": {
11872
+ "Normal": 0,
11873
+ "Romloader": 1,
11874
+ "Bootloader": 2
11875
+ }
11876
+ },
11877
+ "DeviceReboot": {
11878
+ "fields": {
11879
+ "reboot_type": {
11880
+ "rule": "required",
11881
+ "type": "DeviceRebootType",
11882
+ "id": 1
11883
+ }
11884
+ }
11885
+ },
11886
+ "DeviceSettings": {
11887
+ "fields": {
11888
+ "bt_enable": {
11889
+ "type": "bool",
11890
+ "id": 1
11868
11891
  },
11869
- "schema": {
11892
+ "language": {
11870
11893
  "type": "string",
11871
- "id": 4
11894
+ "id": 2
11872
11895
  },
11873
- "appdomain": {
11874
- "rule": "required",
11896
+ "wallpaper_path": {
11875
11897
  "type": "string",
11898
+ "id": 3
11899
+ },
11900
+ "brightness": {
11901
+ "type": "uint32",
11902
+ "id": 4
11903
+ },
11904
+ "animation_enable": {
11905
+ "type": "bool",
11876
11906
  "id": 5
11877
11907
  },
11878
- "timestamp": {
11879
- "rule": "required",
11880
- "type": "uint64",
11908
+ "tap_to_wake": {
11909
+ "type": "bool",
11881
11910
  "id": 6
11882
11911
  },
11883
- "from_address": {
11884
- "type": "string",
11912
+ "haptic_feedback": {
11913
+ "type": "bool",
11885
11914
  "id": 7
11886
11915
  },
11887
- "wallet_version": {
11888
- "type": "TonWalletVersion",
11889
- "id": 8,
11890
- "options": {
11891
- "default": "V4R2"
11892
- }
11916
+ "device_name_display_enabled": {
11917
+ "type": "bool",
11918
+ "id": 8
11893
11919
  },
11894
- "wallet_id": {
11895
- "type": "uint32",
11896
- "id": 9,
11897
- "options": {
11898
- "default": 698983191
11899
- }
11920
+ "airgap_mode": {
11921
+ "type": "bool",
11922
+ "id": 9
11900
11923
  },
11901
- "workchain": {
11902
- "type": "TonWorkChain",
11903
- "id": 10,
11904
- "options": {
11905
- "default": "BASECHAIN"
11906
- }
11924
+ "usb_lock_enable": {
11925
+ "type": "bool",
11926
+ "id": 10
11907
11927
  },
11908
- "is_bounceable": {
11928
+ "random_keypad": {
11909
11929
  "type": "bool",
11910
- "id": 11,
11911
- "options": {
11912
- "default": false
11913
- }
11930
+ "id": 11
11914
11931
  },
11915
- "is_testnet_only": {
11932
+ "passphrase_enable": {
11916
11933
  "type": "bool",
11917
- "id": 12,
11918
- "options": {
11919
- "default": false
11920
- }
11934
+ "id": 100
11935
+ },
11936
+ "fido_enabled": {
11937
+ "type": "bool",
11938
+ "id": 101
11939
+ },
11940
+ "autolock_delay_ms": {
11941
+ "type": "uint32",
11942
+ "id": 102
11943
+ },
11944
+ "autoshutdown_delay_ms": {
11945
+ "type": "uint32",
11946
+ "id": 103
11947
+ },
11948
+ "label": {
11949
+ "type": "string",
11950
+ "id": 104
11921
11951
  }
11922
- },
11923
- "nested": {
11924
- "TonSignDataType": {
11925
- "values": {
11926
- "TEXT": 0,
11927
- "BINARY": 1,
11928
- "CELL": 2
11929
- }
11952
+ }
11953
+ },
11954
+ "DeviceSettingsGet": {
11955
+ "fields": {}
11956
+ },
11957
+ "DeviceSettingsSet": {
11958
+ "fields": {
11959
+ "settings": {
11960
+ "rule": "required",
11961
+ "type": "DeviceSettings",
11962
+ "id": 1
11930
11963
  }
11931
11964
  }
11932
11965
  },
11933
- "TonSignedData": {
11966
+ "DeviceSettingsPage": {
11967
+ "values": {
11968
+ "DeviceReset": 0,
11969
+ "DevicePinChange": 1,
11970
+ "DevicePassphrase": 2,
11971
+ "DeviceAirgap": 3
11972
+ }
11973
+ },
11974
+ "DeviceSettingsPageShow": {
11934
11975
  "fields": {
11935
- "signature": {
11976
+ "page": {
11977
+ "rule": "required",
11978
+ "type": "DeviceSettingsPage",
11979
+ "id": 1
11980
+ },
11981
+ "field_name": {
11982
+ "type": "string",
11983
+ "id": 2
11984
+ }
11985
+ }
11986
+ },
11987
+ "DeviceCertificate": {
11988
+ "fields": {
11989
+ "cert_and_pubkey": {
11990
+ "rule": "required",
11936
11991
  "type": "bytes",
11937
11992
  "id": 1
11938
11993
  },
11939
- "digest": {
11994
+ "private_key": {
11995
+ "type": "bytes",
11996
+ "id": 2
11997
+ }
11998
+ }
11999
+ },
12000
+ "DeviceCertificateWrite": {
12001
+ "fields": {
12002
+ "cert": {
12003
+ "rule": "required",
12004
+ "type": "DeviceCertificate",
12005
+ "id": 1
12006
+ }
12007
+ }
12008
+ },
12009
+ "DeviceCertificateRead": {
12010
+ "fields": {}
12011
+ },
12012
+ "DeviceCertificateSignature": {
12013
+ "fields": {
12014
+ "data": {
12015
+ "rule": "required",
12016
+ "type": "bytes",
12017
+ "id": 1
12018
+ }
12019
+ }
12020
+ },
12021
+ "DeviceCertificateSign": {
12022
+ "fields": {
12023
+ "data": {
12024
+ "rule": "required",
11940
12025
  "type": "bytes",
12026
+ "id": 1
12027
+ }
12028
+ }
12029
+ },
12030
+ "DeviceFirmwareTargetType": {
12031
+ "values": {
12032
+ "FW_MGMT_TARGET_INVALID": 0,
12033
+ "FW_MGMT_TARGET_CRATE": 1,
12034
+ "FW_MGMT_TARGET_ROMLOADER": 2,
12035
+ "FW_MGMT_TARGET_BOOTLOADER": 3,
12036
+ "FW_MGMT_TARGET_APPLICATION_P1": 4,
12037
+ "FW_MGMT_TARGET_APPLICATION_P2": 5,
12038
+ "FW_MGMT_TARGET_COPROCESSOR": 6,
12039
+ "FW_MGMT_TARGET_SE01": 7,
12040
+ "FW_MGMT_TARGET_SE02": 8,
12041
+ "FW_MGMT_TARGET_SE03": 9,
12042
+ "FW_MGMT_TARGET_SE04": 10
12043
+ }
12044
+ },
12045
+ "DeviceFirmwareUpdateTaskStatus": {
12046
+ "values": {
12047
+ "FW_MGMT_UPDATER_TASK_STATUS_PENDING": 0,
12048
+ "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS": 1,
12049
+ "FW_MGMT_UPDATER_TASK_STATUS_FINISHED": 2,
12050
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND": 3,
12051
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ": 4,
12052
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE": 5,
12053
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY": 6,
12054
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL": 7,
12055
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT": 8,
12056
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY": 9,
12057
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS": 10
12058
+ }
12059
+ },
12060
+ "DeviceFirmwareTarget": {
12061
+ "fields": {
12062
+ "target_id": {
12063
+ "rule": "required",
12064
+ "type": "DeviceFirmwareTargetType",
12065
+ "id": 1
12066
+ },
12067
+ "path": {
12068
+ "rule": "required",
12069
+ "type": "string",
11941
12070
  "id": 2
11942
12071
  }
11943
12072
  }
11944
12073
  },
11945
- "GetProtoVersion": {
11946
- "fields": {}
11947
- },
11948
- "ProtoVersion": {
12074
+ "DeviceFirmwareUpdateRequest": {
12075
+ "fields": {
12076
+ "targets": {
12077
+ "rule": "repeated",
12078
+ "type": "DeviceFirmwareTarget",
12079
+ "id": 1
12080
+ }
12081
+ }
12082
+ },
12083
+ "DeviceFirmwareUpdateRecord": {
12084
+ "fields": {
12085
+ "target_id": {
12086
+ "rule": "required",
12087
+ "type": "DeviceFirmwareTargetType",
12088
+ "id": 1
12089
+ },
12090
+ "status": {
12091
+ "type": "DeviceFirmwareUpdateTaskStatus",
12092
+ "id": 10
12093
+ },
12094
+ "payload_version": {
12095
+ "type": "uint32",
12096
+ "id": 20
12097
+ },
12098
+ "path": {
12099
+ "type": "string",
12100
+ "id": 30
12101
+ }
12102
+ }
12103
+ },
12104
+ "DeviceFirmwareUpdateRecordFields": {
12105
+ "fields": {
12106
+ "status": {
12107
+ "type": "bool",
12108
+ "id": 10
12109
+ },
12110
+ "payload_version": {
12111
+ "type": "bool",
12112
+ "id": 20
12113
+ },
12114
+ "path": {
12115
+ "type": "bool",
12116
+ "id": 30
12117
+ }
12118
+ }
12119
+ },
12120
+ "DeviceFirmwareUpdateStatusGet": {
12121
+ "fields": {
12122
+ "fields": {
12123
+ "type": "DeviceFirmwareUpdateRecordFields",
12124
+ "id": 1
12125
+ }
12126
+ }
12127
+ },
12128
+ "DeviceFirmwareUpdateStatus": {
12129
+ "fields": {
12130
+ "records": {
12131
+ "rule": "repeated",
12132
+ "type": "DeviceFirmwareUpdateRecord",
12133
+ "id": 1
12134
+ }
12135
+ }
12136
+ },
12137
+ "DeviceFactoryAck": {
12138
+ "values": {
12139
+ "FACTORY_ACK_SUCCESS": 0,
12140
+ "FACTORY_ACK_FAIL": 1
12141
+ }
12142
+ },
12143
+ "DeviceFactoryInfoManufactureTime": {
11949
12144
  "fields": {
11950
- "proto_version": {
12145
+ "year": {
11951
12146
  "rule": "required",
11952
12147
  "type": "uint32",
11953
12148
  "id": 1
12149
+ },
12150
+ "month": {
12151
+ "rule": "required",
12152
+ "type": "uint32",
12153
+ "id": 2
12154
+ },
12155
+ "day": {
12156
+ "rule": "required",
12157
+ "type": "uint32",
12158
+ "id": 3
12159
+ },
12160
+ "hour": {
12161
+ "rule": "required",
12162
+ "type": "uint32",
12163
+ "id": 4
12164
+ },
12165
+ "minute": {
12166
+ "rule": "required",
12167
+ "type": "uint32",
12168
+ "id": 5
12169
+ },
12170
+ "second": {
12171
+ "rule": "required",
12172
+ "type": "uint32",
12173
+ "id": 6
11954
12174
  }
11955
12175
  }
11956
12176
  },
11957
- "Ping": {
12177
+ "DeviceFactoryInfo": {
11958
12178
  "fields": {
11959
- "message": {
12179
+ "version": {
12180
+ "type": "uint32",
12181
+ "id": 1
12182
+ },
12183
+ "serial_number": {
11960
12184
  "type": "string",
11961
- "id": 1,
11962
- "options": {
11963
- "default": ""
11964
- }
12185
+ "id": 2
12186
+ },
12187
+ "burn_in_completed": {
12188
+ "type": "bool",
12189
+ "id": 3
12190
+ },
12191
+ "factory_test_completed": {
12192
+ "type": "bool",
12193
+ "id": 4
12194
+ },
12195
+ "manufacture_time": {
12196
+ "type": "DeviceFactoryInfoManufactureTime",
12197
+ "id": 5
11965
12198
  }
11966
12199
  }
11967
12200
  },
11968
- "Success": {
12201
+ "DeviceFactoryInfoSet": {
11969
12202
  "fields": {
11970
- "message": {
11971
- "type": "string",
11972
- "id": 1,
11973
- "options": {
11974
- "default": ""
11975
- }
12203
+ "info": {
12204
+ "rule": "required",
12205
+ "type": "DeviceFactoryInfo",
12206
+ "id": 1
11976
12207
  }
11977
12208
  }
11978
12209
  },
11979
- "Failure": {
12210
+ "DeviceFactoryInfoGet": {
12211
+ "fields": {}
12212
+ },
12213
+ "DeviceFactoryPermanentLock": {
11980
12214
  "fields": {
11981
- "code": {
11982
- "type": "FailureType",
12215
+ "check_a": {
12216
+ "rule": "required",
12217
+ "type": "bytes",
11983
12218
  "id": 1
11984
12219
  },
11985
- "message": {
11986
- "type": "string",
12220
+ "check_b": {
12221
+ "rule": "required",
12222
+ "type": "bytes",
11987
12223
  "id": 2
11988
12224
  }
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
12225
  }
12018
12226
  },
12019
- "DevReboot": {
12227
+ "DeviceFactoryTest": {
12020
12228
  "fields": {
12021
- "reboot_type": {
12229
+ "burn_in_test": {
12022
12230
  "rule": "required",
12023
- "type": "DevRebootType",
12231
+ "type": "bool",
12024
12232
  "id": 1
12025
12233
  }
12026
12234
  }
@@ -12032,23 +12240,25 @@
12032
12240
  "MINI": 2,
12033
12241
  "TOUCH": 3,
12034
12242
  "PRO": 5,
12035
- "CLASSIC1S_PURE": 6
12243
+ "CLASSIC1S_PURE": 6,
12244
+ "PRO2": 7,
12245
+ "NEO": 8
12036
12246
  }
12037
12247
  },
12038
- "DevSeType": {
12248
+ "DeviceSeType": {
12039
12249
  "values": {
12040
12250
  "THD89": 0,
12041
12251
  "SE608A": 1
12042
12252
  }
12043
12253
  },
12044
- "DevSEState": {
12254
+ "DeviceSEState": {
12045
12255
  "values": {
12046
12256
  "BOOT": 0,
12047
12257
  "APP_FACTORY": 51,
12048
12258
  "APP": 85
12049
12259
  }
12050
12260
  },
12051
- "DevFirmwareImageInfo": {
12261
+ "DeviceFirmwareImageInfo": {
12052
12262
  "fields": {
12053
12263
  "version": {
12054
12264
  "type": "string",
@@ -12064,19 +12274,15 @@
12064
12274
  }
12065
12275
  }
12066
12276
  },
12067
- "DevHardwareInfo": {
12277
+ "DeviceHardwareInfo": {
12068
12278
  "fields": {
12069
- "device_type": {
12279
+ "Device_type": {
12070
12280
  "type": "DeviceType",
12071
12281
  "id": 10
12072
12282
  },
12073
12283
  "serial_no": {
12074
12284
  "type": "string",
12075
- "id": 11
12076
- },
12077
- "device_id": {
12078
- "type": "string",
12079
- "id": 12
12285
+ "id": 20
12080
12286
  },
12081
12287
  "hardware_version": {
12082
12288
  "type": "string",
@@ -12084,67 +12290,71 @@
12084
12290
  },
12085
12291
  "hardware_version_raw_adc": {
12086
12292
  "type": "uint32",
12087
- "id": 101
12293
+ "id": 110
12088
12294
  }
12089
12295
  }
12090
12296
  },
12091
- "DevMainMcuInfo": {
12297
+ "DeviceMainMcuInfo": {
12092
12298
  "fields": {
12093
- "board": {
12094
- "type": "DevFirmwareImageInfo",
12299
+ "romloader": {
12300
+ "type": "DeviceFirmwareImageInfo",
12095
12301
  "id": 10
12096
12302
  },
12097
- "boot": {
12098
- "type": "DevFirmwareImageInfo",
12303
+ "bootloader": {
12304
+ "type": "DeviceFirmwareImageInfo",
12099
12305
  "id": 20
12100
12306
  },
12101
- "app": {
12102
- "type": "DevFirmwareImageInfo",
12307
+ "application": {
12308
+ "type": "DeviceFirmwareImageInfo",
12103
12309
  "id": 30
12310
+ },
12311
+ "application_data": {
12312
+ "type": "DeviceFirmwareImageInfo",
12313
+ "id": 40
12104
12314
  }
12105
12315
  }
12106
12316
  },
12107
- "DevBluetoothInfo": {
12317
+ "DeviceCoprocessorInfo": {
12108
12318
  "fields": {
12109
- "boot": {
12110
- "type": "DevFirmwareImageInfo",
12319
+ "bootloader": {
12320
+ "type": "DeviceFirmwareImageInfo",
12111
12321
  "id": 20
12112
12322
  },
12113
- "app": {
12114
- "type": "DevFirmwareImageInfo",
12323
+ "application": {
12324
+ "type": "DeviceFirmwareImageInfo",
12115
12325
  "id": 30
12116
12326
  },
12117
- "adv_name": {
12327
+ "bt_adv_name": {
12118
12328
  "type": "string",
12119
12329
  "id": 100
12120
12330
  },
12121
- "mac": {
12331
+ "bt_mac": {
12122
12332
  "type": "bytes",
12123
12333
  "id": 110
12124
12334
  }
12125
12335
  }
12126
12336
  },
12127
- "DevSEInfo": {
12337
+ "DeviceSEInfo": {
12128
12338
  "fields": {
12129
- "boot": {
12130
- "type": "DevFirmwareImageInfo",
12339
+ "bootloader": {
12340
+ "type": "DeviceFirmwareImageInfo",
12131
12341
  "id": 20
12132
12342
  },
12133
- "app": {
12134
- "type": "DevFirmwareImageInfo",
12343
+ "application": {
12344
+ "type": "DeviceFirmwareImageInfo",
12135
12345
  "id": 30
12136
12346
  },
12137
12347
  "type": {
12138
- "type": "DevSeType",
12348
+ "type": "DeviceSeType",
12139
12349
  "id": 100
12140
12350
  },
12141
12351
  "state": {
12142
- "type": "DevSEState",
12352
+ "type": "DeviceSEState",
12143
12353
  "id": 110
12144
12354
  }
12145
12355
  }
12146
12356
  },
12147
- "DevInfoTargets": {
12357
+ "DeviceInfoTargets": {
12148
12358
  "fields": {
12149
12359
  "hw": {
12150
12360
  "type": "bool",
@@ -12154,7 +12364,7 @@
12154
12364
  "type": "bool",
12155
12365
  "id": 200
12156
12366
  },
12157
- "bt": {
12367
+ "coprocessor": {
12158
12368
  "type": "bool",
12159
12369
  "id": 300
12160
12370
  },
@@ -12180,7 +12390,7 @@
12180
12390
  }
12181
12391
  }
12182
12392
  },
12183
- "DevInfoTypes": {
12393
+ "DeviceInfoTypes": {
12184
12394
  "fields": {
12185
12395
  "version": {
12186
12396
  "type": "bool",
@@ -12200,42 +12410,14 @@
12200
12410
  }
12201
12411
  }
12202
12412
  },
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": {
12413
+ "DeviceInfoGet": {
12232
12414
  "fields": {
12233
12415
  "targets": {
12234
- "type": "DevInfoTargets",
12416
+ "type": "DeviceInfoTargets",
12235
12417
  "id": 1
12236
12418
  },
12237
12419
  "types": {
12238
- "type": "DevInfoTypes",
12420
+ "type": "DeviceInfoTypes",
12239
12421
  "id": 2
12240
12422
  }
12241
12423
  }
@@ -12248,166 +12430,215 @@
12248
12430
  "id": 1
12249
12431
  },
12250
12432
  "hw": {
12251
- "type": "DevHardwareInfo",
12433
+ "type": "DeviceHardwareInfo",
12252
12434
  "id": 100
12253
12435
  },
12254
12436
  "fw": {
12255
- "type": "DevMainMcuInfo",
12437
+ "type": "DeviceMainMcuInfo",
12256
12438
  "id": 200
12257
12439
  },
12258
- "bt": {
12259
- "type": "DevBluetoothInfo",
12440
+ "coprocessor": {
12441
+ "type": "DeviceCoprocessorInfo",
12260
12442
  "id": 300
12261
12443
  },
12262
12444
  "se1": {
12263
- "type": "DevSEInfo",
12445
+ "type": "DeviceSEInfo",
12264
12446
  "id": 400
12265
12447
  },
12266
12448
  "se2": {
12267
- "type": "DevSEInfo",
12449
+ "type": "DeviceSEInfo",
12268
12450
  "id": 410
12269
12451
  },
12270
12452
  "se3": {
12271
- "type": "DevSEInfo",
12453
+ "type": "DeviceSEInfo",
12272
12454
  "id": 420
12273
12455
  },
12274
12456
  "se4": {
12275
- "type": "DevSEInfo",
12457
+ "type": "DeviceSEInfo",
12276
12458
  "id": 430
12277
12459
  },
12278
12460
  "status": {
12279
- "type": "DevStatus",
12461
+ "type": "DeviceStatus",
12280
12462
  "id": 10000
12281
12463
  }
12282
12464
  }
12283
12465
  },
12284
- "DevFirmwareTargetType": {
12466
+ "DeviceSessionErrorCode": {
12285
12467
  "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
12468
+ "DeviceSessionError_None": 0,
12469
+ "DeviceSessionError_UserCancelled": 1,
12470
+ "DeviceSessionError_InvalidSession": 2,
12471
+ "DeviceSessionError_AttachPinUnavailable": 3,
12472
+ "DeviceSessionError_PassphraseDisabled": 4,
12473
+ "DeviceSessionError_Busy": 5
12294
12474
  }
12295
12475
  },
12296
- "DevFirmwareTarget": {
12476
+ "DeviceSessionGet": {
12297
12477
  "fields": {
12298
- "target_id": {
12299
- "rule": "required",
12300
- "type": "DevFirmwareTargetType",
12478
+ "session_id": {
12479
+ "type": "bytes",
12480
+ "id": 1
12481
+ }
12482
+ }
12483
+ },
12484
+ "DeviceSession": {
12485
+ "fields": {
12486
+ "session_id": {
12487
+ "type": "bytes",
12301
12488
  "id": 1
12302
12489
  },
12303
- "path": {
12304
- "rule": "required",
12490
+ "btc_test_address": {
12305
12491
  "type": "string",
12306
12492
  "id": 2
12307
12493
  }
12308
12494
  }
12309
12495
  },
12310
- "DevFirmwareUpdate": {
12496
+ "DeviceSessionPinType": {
12497
+ "values": {
12498
+ "Any": 1,
12499
+ "Main": 2,
12500
+ "AttachToPin": 3
12501
+ }
12502
+ },
12503
+ "DeviceSessionAskPin": {
12311
12504
  "fields": {
12312
- "targets": {
12313
- "rule": "repeated",
12314
- "type": "DevFirmwareTarget",
12505
+ "type": {
12506
+ "type": "DeviceSessionPinType",
12315
12507
  "id": 1
12316
12508
  }
12317
12509
  }
12318
12510
  },
12319
- "DevFirmwareInstallProgress": {
12511
+ "DeviceSessionAskPassphrase": {
12320
12512
  "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": {
12513
+ "passphrase": {
12332
12514
  "type": "string",
12333
- "id": 3
12515
+ "id": 1
12334
12516
  }
12335
12517
  }
12336
12518
  },
12337
- "DevFirmwareUpdateStatusEntry": {
12519
+ "DeviceSessionAskPin_FailureSubCodes": {
12520
+ "values": {
12521
+ "UserCancel": 1
12522
+ }
12523
+ },
12524
+ "DeviceStatus": {
12338
12525
  "fields": {
12339
- "target_id": {
12340
- "rule": "required",
12341
- "type": "DevFirmwareTargetType",
12526
+ "device_id": {
12527
+ "type": "string",
12342
12528
  "id": 1
12343
12529
  },
12344
- "status": {
12345
- "rule": "required",
12346
- "type": "uint32",
12530
+ "unlocked": {
12531
+ "type": "bool",
12347
12532
  "id": 2
12533
+ },
12534
+ "init_states": {
12535
+ "type": "bool",
12536
+ "id": 3
12537
+ },
12538
+ "backup_required": {
12539
+ "type": "bool",
12540
+ "id": 4
12541
+ },
12542
+ "passphrase_enabled": {
12543
+ "type": "bool",
12544
+ "id": 10
12545
+ },
12546
+ "attach_to_pin_enabled": {
12547
+ "type": "bool",
12548
+ "id": 11
12549
+ },
12550
+ "unlocked_by_attach_to_pin": {
12551
+ "type": "bool",
12552
+ "id": 12
12348
12553
  }
12349
12554
  }
12350
12555
  },
12351
- "DevGetFirmwareUpdateStatus": {
12556
+ "DeviceStatusGet": {
12352
12557
  "fields": {}
12353
12558
  },
12354
- "DevFirmwareUpdateStatus": {
12355
- "fields": {
12356
- "targets": {
12357
- "rule": "repeated",
12358
- "type": "DevFirmwareUpdateStatusEntry",
12359
- "id": 1
12360
- }
12559
+ "DevOnboardingStep": {
12560
+ "values": {
12561
+ "DEV_ONBOARDING_STEP_UNKNOWN": 0,
12562
+ "DEV_ONBOARDING_STEP_CHECKING": 1,
12563
+ "DEV_ONBOARDING_STEP_PERSONALIZATION": 2,
12564
+ "DEV_ONBOARDING_STEP_PIN": 3,
12565
+ "DEV_ONBOARDING_STEP_SETUP": 4,
12566
+ "DEV_ONBOARDING_STEP_DONE": 5
12567
+ }
12568
+ },
12569
+ "DevOnboardingPhase": {
12570
+ "values": {
12571
+ "DEV_ONBOARDING_PHASE_UNKNOWN": 0,
12572
+ "DEV_ONBOARDING_PHASE_SAFETY_CHECK": 1,
12573
+ "DEV_ONBOARDING_PHASE_PIN_SETUP": 2,
12574
+ "DEV_ONBOARDING_PHASE_FINGERPRINT_SETUP": 3,
12575
+ "DEV_ONBOARDING_PHASE_SETUP_CHOICE": 4,
12576
+ "DEV_ONBOARDING_PHASE_WALLET_CREATE_START": 5,
12577
+ "DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW": 6,
12578
+ "DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM": 7,
12579
+ "DEV_ONBOARDING_PHASE_RESTORE_METHOD_CHOICE": 8,
12580
+ "DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE": 9,
12581
+ "DEV_ONBOARDING_PHASE_SEEDCARD_RESTORE": 10,
12582
+ "DEV_ONBOARDING_PHASE_WALLET_READY": 11,
12583
+ "DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT": 12,
12584
+ "DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP": 13
12585
+ }
12586
+ },
12587
+ "DevOnboardingSetupKind": {
12588
+ "values": {
12589
+ "DEV_ONBOARDING_SETUP_KIND_UNKNOWN": 0,
12590
+ "DEV_ONBOARDING_SETUP_KIND_CHOICE": 1,
12591
+ "DEV_ONBOARDING_SETUP_KIND_CREATE": 2,
12592
+ "DEV_ONBOARDING_SETUP_KIND_RESTORE": 3
12593
+ }
12594
+ },
12595
+ "DevOnboardingSetupMethod": {
12596
+ "values": {
12597
+ "DEV_ONBOARDING_SETUP_METHOD_UNKNOWN": 0,
12598
+ "DEV_ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE": 1,
12599
+ "DEV_ONBOARDING_SETUP_METHOD_SEEDCARD": 2
12361
12600
  }
12362
12601
  },
12363
- "FactoryDeviceInfoSettings": {
12602
+ "DevOnboardingSetupStatus": {
12364
12603
  "fields": {
12365
- "serial_no": {
12366
- "type": "string",
12604
+ "kind": {
12605
+ "type": "DevOnboardingSetupKind",
12367
12606
  "id": 1
12368
12607
  },
12369
- "cpu_info": {
12370
- "type": "string",
12608
+ "method": {
12609
+ "type": "DevOnboardingSetupMethod",
12371
12610
  "id": 2
12372
- },
12373
- "pre_firmware": {
12374
- "type": "string",
12375
- "id": 3
12376
12611
  }
12377
12612
  }
12378
12613
  },
12379
- "FactoryGetDeviceInfo": {
12614
+ "DevGetOnboardingStatus": {
12380
12615
  "fields": {}
12381
12616
  },
12382
- "FactoryDeviceInfo": {
12617
+ "DevOnboardingStatus": {
12383
12618
  "fields": {
12384
- "serial_no": {
12385
- "type": "string",
12619
+ "step": {
12620
+ "type": "DevOnboardingStep",
12386
12621
  "id": 1
12387
12622
  },
12388
- "spi_flash_info": {
12389
- "type": "string",
12623
+ "phase": {
12624
+ "type": "DevOnboardingPhase",
12390
12625
  "id": 2
12391
12626
  },
12392
- "se_info": {
12393
- "type": "string",
12627
+ "setup": {
12628
+ "type": "DevOnboardingSetupStatus",
12394
12629
  "id": 3
12395
12630
  },
12396
- "nft_voucher": {
12397
- "type": "bytes",
12631
+ "pin_set": {
12632
+ "type": "bool",
12398
12633
  "id": 4
12399
12634
  },
12400
- "cpu_info": {
12401
- "type": "string",
12635
+ "wallet_initialized": {
12636
+ "type": "bool",
12402
12637
  "id": 5
12403
- },
12404
- "pre_firmware": {
12405
- "type": "string",
12406
- "id": 6
12407
12638
  }
12408
12639
  }
12409
12640
  },
12410
- "FilesystemFixPermission": {
12641
+ "FilesystemPermissionFix": {
12411
12642
  "fields": {}
12412
12643
  },
12413
12644
  "FilesystemPathInfo": {
@@ -12620,77 +12851,22 @@
12620
12851
  }
12621
12852
  },
12622
12853
  "FilesystemFormat": {
12623
- "fields": {}
12624
- },
12625
- "OnboardingStep": {
12626
- "values": {
12627
- "ONBOARDING_STEP_UNKNOWN": 0,
12628
- "ONBOARDING_STEP_DEVICE_VERIFICATION": 1,
12629
- "ONBOARDING_STEP_PERSONALIZATION": 2,
12630
- "ONBOARDING_STEP_SETUP": 3,
12631
- "ONBOARDING_STEP_FIRMWARE": 4
12632
- }
12633
- },
12634
- "GetOnboardingStatus": {
12635
- "fields": {}
12636
- },
12637
- "OnboardingStatus": {
12638
12854
  "fields": {
12639
- "step": {
12855
+ "data": {
12640
12856
  "rule": "required",
12641
- "type": "OnboardingStep",
12857
+ "type": "bool",
12642
12858
  "id": 1
12643
12859
  },
12644
- "setup": {
12645
- "type": "Setup",
12860
+ "user": {
12861
+ "rule": "required",
12862
+ "type": "bool",
12646
12863
  "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
12864
  }
12692
12865
  }
12693
12866
  },
12867
+ "PortfolioUpdate": {
12868
+ "fields": {}
12869
+ },
12694
12870
  "google": {
12695
12871
  "nested": {
12696
12872
  "protobuf": {