@onekeyfe/hd-core 1.2.0-alpha.6 → 1.2.0-alpha.63

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 (740) hide show
  1. package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +77 -0
  2. package/__tests__/DeviceCommands.test.ts +517 -0
  3. package/__tests__/DeviceEventRegistration.test.ts +43 -0
  4. package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
  5. package/__tests__/check-all-firmware-release-protocol-v2.test.ts +282 -0
  6. package/__tests__/connectSettings.test.ts +61 -0
  7. package/__tests__/core-dispose.test.ts +34 -0
  8. package/__tests__/core-error-output.test.ts +39 -0
  9. package/__tests__/device-features-state.test.ts +78 -0
  10. package/__tests__/device-identity.test.ts +52 -0
  11. package/__tests__/device-initialize-timeout.test.ts +56 -0
  12. package/__tests__/device-lifecycle-events.test.ts +249 -0
  13. package/__tests__/device-pool-state.test.ts +144 -0
  14. package/__tests__/device-settings.test.ts +416 -0
  15. package/__tests__/device-state-contract.test.ts +27 -0
  16. package/__tests__/device-state-events.test.ts +286 -0
  17. package/__tests__/device-state-mapper.test.ts +261 -0
  18. package/__tests__/device-state-projector.test.ts +94 -0
  19. package/__tests__/device-state-store.test.ts +82 -0
  20. package/__tests__/device-utils.test.ts +107 -0
  21. package/__tests__/device-wallet-session-store.test.ts +478 -0
  22. package/__tests__/deviceFeaturesUtils.test.ts +39 -0
  23. package/__tests__/deviceSettings.test.ts +103 -0
  24. package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
  25. package/__tests__/evmSignTransaction.test.ts +69 -0
  26. package/__tests__/evmSignTypedData.test.ts +80 -0
  27. package/__tests__/filesystemValidation.test.ts +53 -0
  28. package/__tests__/firmware-update/check-all-firmware-release.test.ts +175 -0
  29. package/__tests__/firmware-update/firmware-artifact-source.test.ts +119 -0
  30. package/__tests__/firmware-update/firmware-host-binding.test.ts +70 -0
  31. package/__tests__/firmware-update/firmware-preparation-error.test.ts +27 -0
  32. package/__tests__/firmware-update/firmware-update-bootloader-poll.test.ts +200 -0
  33. package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
  34. package/__tests__/firmware-update/firmware-update-plan-bootloader-identity.test.ts +394 -0
  35. package/__tests__/firmware-update/firmware-update-plan.test.ts +593 -0
  36. package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +213 -0
  37. package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +430 -0
  38. package/__tests__/firmware-update/firmware-update-v3-reconnect.test.ts +58 -0
  39. package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
  40. package/__tests__/get-device-state.test.ts +458 -0
  41. package/__tests__/homescreen.test.ts +24 -0
  42. package/__tests__/kaspa-public-types.type-test.ts +16 -0
  43. package/__tests__/kaspa-use-tweak-pro2.test.ts +20 -0
  44. package/__tests__/kaspaSignTransaction.test.ts +601 -0
  45. package/__tests__/known-device-public-types.type-test.ts +3 -0
  46. package/__tests__/logBlockEvent.test.ts +128 -1
  47. package/__tests__/method-protocol-support.test.ts +113 -0
  48. package/__tests__/networkUtils.test.ts +406 -0
  49. package/__tests__/open-wallet-session-error-response.test.ts +43 -0
  50. package/__tests__/open-wallet-session.test.ts +1368 -0
  51. package/__tests__/pro2Wallpaper.test.ts +39 -0
  52. package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
  53. package/__tests__/protocol-v2-firmware-targets.test.ts +37 -0
  54. package/__tests__/protocol-v2-ping.test.ts +28 -0
  55. package/__tests__/protocol-v2-unlock-policy.test.ts +45 -0
  56. package/__tests__/protocol-v2.test.ts +6058 -2525
  57. package/__tests__/protocolV2FileWrite.test.ts +92 -0
  58. package/__tests__/protocolV2UiInteraction.test.ts +266 -0
  59. package/__tests__/public-device-state-api.test.ts +275 -0
  60. package/__tests__/public-pro2-api-boundary.test.ts +106 -0
  61. package/__tests__/refresh-device-state.test.ts +101 -0
  62. package/__tests__/request-context-logging.test.ts +16 -0
  63. package/__tests__/search-devices.test.ts +136 -0
  64. package/__tests__/tron-sign-message-init.test.ts +74 -0
  65. package/dist/api/BaseMethod.d.ts +14 -1
  66. package/dist/api/BaseMethod.d.ts.map +1 -1
  67. package/dist/api/CheckAllFirmwareRelease.d.ts +24 -1
  68. package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
  69. package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
  70. package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
  71. package/dist/api/CipherKeyValue.d.ts +1 -0
  72. package/dist/api/CipherKeyValue.d.ts.map +1 -1
  73. package/dist/api/ClearSessionCache.d.ts +9 -0
  74. package/dist/api/ClearSessionCache.d.ts.map +1 -0
  75. package/dist/api/DirList.d.ts +1 -0
  76. package/dist/api/DirList.d.ts.map +1 -1
  77. package/dist/api/DirMake.d.ts +1 -0
  78. package/dist/api/DirMake.d.ts.map +1 -1
  79. package/dist/api/DirRemove.d.ts +1 -0
  80. package/dist/api/DirRemove.d.ts.map +1 -1
  81. package/dist/api/FileDelete.d.ts +1 -0
  82. package/dist/api/FileDelete.d.ts.map +1 -1
  83. package/dist/api/FileRead.d.ts +1 -0
  84. package/dist/api/FileRead.d.ts.map +1 -1
  85. package/dist/api/FileWrite.d.ts +2 -0
  86. package/dist/api/FileWrite.d.ts.map +1 -1
  87. package/dist/api/FirmwareUpdate.d.ts.map +1 -1
  88. package/dist/api/FirmwareUpdateV2.d.ts +13 -2
  89. package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
  90. package/dist/api/FirmwareUpdateV3.d.ts +7 -3
  91. package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
  92. package/dist/api/FirmwareUpdateV4.d.ts +40 -16
  93. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  94. package/dist/api/GetDeviceState.d.ts +8 -0
  95. package/dist/api/GetDeviceState.d.ts.map +1 -0
  96. package/dist/api/GetFeatures.d.ts +1 -1
  97. package/dist/api/GetFeatures.d.ts.map +1 -1
  98. package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
  99. package/dist/api/GetPassphraseState.d.ts +2 -6
  100. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  101. package/dist/api/OpenWalletSession.d.ts +8 -0
  102. package/dist/api/OpenWalletSession.d.ts.map +1 -0
  103. package/dist/api/PathInfo.d.ts +1 -0
  104. package/dist/api/PathInfo.d.ts.map +1 -1
  105. package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
  106. package/dist/api/SearchDevices.d.ts +3 -0
  107. package/dist/api/SearchDevices.d.ts.map +1 -1
  108. package/dist/api/UploadPortfolio.d.ts +17 -0
  109. package/dist/api/UploadPortfolio.d.ts.map +1 -0
  110. package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
  111. package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
  112. package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
  113. package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
  114. package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
  115. package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
  116. package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
  117. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
  118. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
  119. package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
  120. package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
  121. package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
  122. package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
  123. package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
  124. package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
  125. package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
  126. package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
  127. package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
  128. package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
  129. package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
  130. package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
  131. package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
  132. package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
  133. package/dist/api/btc/BTCGetAddress.d.ts +1 -0
  134. package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
  135. package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
  136. package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
  137. package/dist/api/btc/BTCSignMessage.d.ts +1 -0
  138. package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
  139. package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
  140. package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
  141. package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
  142. package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
  143. package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
  144. package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
  145. package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
  146. package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
  147. package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
  148. package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
  149. package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
  150. package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
  151. package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
  152. package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
  153. package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
  154. package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
  155. package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -0
  156. package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
  157. package/dist/api/conflux/ConfluxSignMessage.d.ts +2 -0
  158. package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
  159. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +2 -0
  160. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
  161. package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -0
  162. package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
  163. package/dist/api/cosmos/CosmosGetAddress.d.ts +1 -0
  164. package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
  165. package/dist/api/cosmos/CosmosGetPublicKey.d.ts +1 -0
  166. package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
  167. package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -0
  168. package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
  169. package/dist/api/device/DeviceCancel.d.ts +1 -0
  170. package/dist/api/device/DeviceCancel.d.ts.map +1 -1
  171. package/dist/api/device/DeviceChangePin.d.ts +1 -0
  172. package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
  173. package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -2
  174. package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
  175. package/dist/api/device/DeviceLock.d.ts +1 -0
  176. package/dist/api/device/DeviceLock.d.ts.map +1 -1
  177. package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -0
  178. package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
  179. package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -0
  180. package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
  181. package/dist/api/device/DeviceSettings.d.ts +1 -0
  182. package/dist/api/device/DeviceSettings.d.ts.map +1 -1
  183. package/dist/api/device/DeviceSupportFeatures.d.ts +1 -0
  184. package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
  185. package/dist/api/device/DeviceUnlock.d.ts +1 -0
  186. package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
  187. package/dist/api/device/DeviceUpdateBootloader.d.ts +5 -1
  188. package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
  189. package/dist/api/device/DeviceWipe.d.ts +1 -0
  190. package/dist/api/device/DeviceWipe.d.ts.map +1 -1
  191. package/dist/api/device/PreInitialize.d.ts +1 -0
  192. package/dist/api/device/PreInitialize.d.ts.map +1 -1
  193. package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
  194. package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
  195. package/dist/api/evm/EVMGetAddress.d.ts +1 -0
  196. package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
  197. package/dist/api/evm/EVMGetPublicKey.d.ts +1 -0
  198. package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
  199. package/dist/api/evm/EVMSignMessage.d.ts +1 -0
  200. package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
  201. package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
  202. package/dist/api/evm/EVMSignTransaction.d.ts +1 -0
  203. package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
  204. package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
  205. package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
  206. package/dist/api/evm/EVMVerifyMessage.d.ts +1 -0
  207. package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
  208. package/dist/api/evm/protocol.d.ts +3 -0
  209. package/dist/api/evm/protocol.d.ts.map +1 -0
  210. package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
  211. package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
  212. package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
  213. package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
  214. package/dist/api/firmware/FirmwareArtifactSource.d.ts +25 -0
  215. package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +1 -0
  216. package/dist/api/firmware/FirmwareHostBinding.d.ts +6 -0
  217. package/dist/api/firmware/FirmwareHostBinding.d.ts.map +1 -0
  218. package/dist/api/firmware/FirmwarePreparationError.d.ts +3 -0
  219. package/dist/api/firmware/FirmwarePreparationError.d.ts.map +1 -0
  220. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +8 -0
  221. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
  222. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +3 -0
  223. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +1 -0
  224. package/dist/api/firmware/FirmwareUpdatePlan.d.ts +25 -0
  225. package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -0
  226. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +32 -0
  227. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
  228. package/dist/api/firmware/getBinary.d.ts +15 -4
  229. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  230. package/dist/api/firmware/updateBootloader.d.ts +2 -0
  231. package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
  232. package/dist/api/firmware/uploadFirmware.d.ts +9 -1
  233. package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
  234. package/dist/api/helpers/filesystemValidation.d.ts +3 -0
  235. package/dist/api/helpers/filesystemValidation.d.ts.map +1 -1
  236. package/dist/api/helpers/paramsValidator.d.ts +1 -0
  237. package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
  238. package/dist/api/helpers/protocolV2FileWrite.d.ts +33 -0
  239. package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
  240. package/dist/api/index.d.ts +7 -25
  241. package/dist/api/index.d.ts.map +1 -1
  242. package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -0
  243. package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
  244. package/dist/api/kaspa/KaspaSignTransaction.d.ts +9 -1
  245. package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
  246. package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
  247. package/dist/api/lightning/LnurlAuth.d.ts +0 -4
  248. package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
  249. package/dist/api/near/NearGetAddress.d.ts +1 -0
  250. package/dist/api/near/NearGetAddress.d.ts.map +1 -1
  251. package/dist/api/near/NearSignTransaction.d.ts +1 -0
  252. package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
  253. package/dist/api/nem/NEMGetAddress.d.ts +1 -0
  254. package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
  255. package/dist/api/nem/NEMSignTransaction.d.ts +1 -0
  256. package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
  257. package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
  258. package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
  259. package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
  260. package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
  261. package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
  262. package/dist/api/nexa/NexaSignTransaction.d.ts +1 -0
  263. package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
  264. package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -0
  265. package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
  266. package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -0
  267. package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
  268. package/dist/api/nostr/NostrGetPublicKey.d.ts +1 -0
  269. package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
  270. package/dist/api/nostr/NostrSignEvent.d.ts +1 -0
  271. package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
  272. package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -0
  273. package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
  274. package/dist/api/polkadot/PolkadotGetAddress.d.ts +1 -0
  275. package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
  276. package/dist/api/polkadot/PolkadotSignTransaction.d.ts +1 -0
  277. package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -1
  278. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +1 -0
  279. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
  280. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +1 -0
  281. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
  282. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -0
  283. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
  284. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -0
  285. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
  286. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +7 -0
  287. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
  288. package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -1
  289. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
  290. package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
  291. package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
  292. package/dist/api/protocol-v2/DeviceStatusGet.d.ts +7 -0
  293. package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
  294. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +27 -0
  295. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
  296. package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
  297. package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
  298. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +1 -0
  299. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
  300. package/dist/api/protocol-v2/Ping.d.ts +3 -0
  301. package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
  302. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
  303. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
  304. package/dist/api/protocol-v2/helpers.d.ts +1 -1
  305. package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
  306. package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
  307. package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
  308. package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
  309. package/dist/api/solana/SolGetAddress.d.ts +1 -0
  310. package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
  311. package/dist/api/solana/SolSignMessage.d.ts +1 -0
  312. package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
  313. package/dist/api/solana/SolSignOffchainMessage.d.ts +1 -0
  314. package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
  315. package/dist/api/solana/SolSignTransaction.d.ts +1 -0
  316. package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
  317. package/dist/api/starcoin/StarcoinGetAddress.d.ts +1 -0
  318. package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
  319. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +1 -0
  320. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
  321. package/dist/api/starcoin/StarcoinSignMessage.d.ts +1 -0
  322. package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
  323. package/dist/api/starcoin/StarcoinSignTransaction.d.ts +1 -0
  324. package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
  325. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +1 -0
  326. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
  327. package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
  328. package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
  329. package/dist/api/stellar/StellarSignTransaction.d.ts +2 -3
  330. package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
  331. package/dist/api/sui/SuiGetAddress.d.ts +1 -0
  332. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  333. package/dist/api/sui/SuiGetPublicKey.d.ts +1 -0
  334. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  335. package/dist/api/sui/SuiSignMessage.d.ts +1 -0
  336. package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
  337. package/dist/api/sui/SuiSignTransaction.d.ts +1 -0
  338. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  339. package/dist/api/ton/TonGetAddress.d.ts +1 -0
  340. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  341. package/dist/api/ton/TonSignData.d.ts +1 -0
  342. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  343. package/dist/api/ton/TonSignMessage.d.ts +1 -0
  344. package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
  345. package/dist/api/ton/TonSignProof.d.ts +1 -0
  346. package/dist/api/ton/TonSignProof.d.ts.map +1 -1
  347. package/dist/api/tron/TronGetAddress.d.ts +1 -0
  348. package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
  349. package/dist/api/tron/TronSignMessage.d.ts +5 -0
  350. package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
  351. package/dist/api/tron/TronSignTransaction.d.ts +1 -0
  352. package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
  353. package/dist/api/utils.d.ts +2 -1
  354. package/dist/api/utils.d.ts.map +1 -1
  355. package/dist/api/xrp/XrpGetAddress.d.ts +1 -0
  356. package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
  357. package/dist/api/xrp/XrpSignTransaction.d.ts +1 -0
  358. package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -1
  359. package/dist/constants/index.d.ts +1 -1
  360. package/dist/constants/index.d.ts.map +1 -1
  361. package/dist/core/RequestQueue.d.ts.map +1 -1
  362. package/dist/core/deviceEventRegistration.d.ts +11 -0
  363. package/dist/core/deviceEventRegistration.d.ts.map +1 -0
  364. package/dist/core/index.d.ts +3 -1
  365. package/dist/core/index.d.ts.map +1 -1
  366. package/dist/data-manager/DataManager.d.ts +1 -0
  367. package/dist/data-manager/DataManager.d.ts.map +1 -1
  368. package/dist/data-manager/connectSettings.d.ts.map +1 -1
  369. package/dist/device/Device.d.ts +45 -14
  370. package/dist/device/Device.d.ts.map +1 -1
  371. package/dist/device/DeviceCommands.d.ts +8 -6
  372. package/dist/device/DeviceCommands.d.ts.map +1 -1
  373. package/dist/device/DeviceConnector.d.ts +1 -1
  374. package/dist/device/DeviceConnector.d.ts.map +1 -1
  375. package/dist/device/DeviceFeaturesState.d.ts +3 -0
  376. package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
  377. package/dist/device/DevicePool.d.ts +5 -2
  378. package/dist/device/DevicePool.d.ts.map +1 -1
  379. package/dist/device/DeviceStateMapper.d.ts +13 -0
  380. package/dist/device/DeviceStateMapper.d.ts.map +1 -0
  381. package/dist/device/DeviceStateProjector.d.ts +7 -0
  382. package/dist/device/DeviceStateProjector.d.ts.map +1 -0
  383. package/dist/device/DeviceStateStore.d.ts +21 -0
  384. package/dist/device/DeviceStateStore.d.ts.map +1 -0
  385. package/dist/device/DeviceWalletSessionStore.d.ts +27 -0
  386. package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
  387. package/dist/device/cloneDeviceState.d.ts +2 -0
  388. package/dist/device/cloneDeviceState.d.ts.map +1 -0
  389. package/dist/device/deviceIdentity.d.ts +5 -0
  390. package/dist/device/deviceIdentity.d.ts.map +1 -0
  391. package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
  392. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
  393. package/dist/deviceProfile/index.d.ts +0 -1
  394. package/dist/deviceProfile/index.d.ts.map +1 -1
  395. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts +7 -0
  396. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts.map +1 -0
  397. package/dist/events/device.d.ts +12 -2
  398. package/dist/events/device.d.ts.map +1 -1
  399. package/dist/events/logBlockEvent.d.ts +2 -0
  400. package/dist/events/logBlockEvent.d.ts.map +1 -1
  401. package/dist/events/ui-request.d.ts +19 -2
  402. package/dist/events/ui-request.d.ts.map +1 -1
  403. package/dist/index.d.ts +1564 -739
  404. package/dist/index.d.ts.map +1 -1
  405. package/dist/index.js +9262 -3918
  406. package/dist/inject.d.ts.map +1 -1
  407. package/dist/lowLevelInject.d.ts.map +1 -1
  408. package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
  409. package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
  410. package/dist/protocols/protocol-v2/features.d.ts +25 -17
  411. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  412. package/dist/protocols/protocol-v2/index.d.ts +3 -2
  413. package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
  414. package/dist/protocols/protocol-v2/lockedError.d.ts +2 -0
  415. package/dist/protocols/protocol-v2/lockedError.d.ts.map +1 -0
  416. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +17 -0
  417. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
  418. package/dist/protocols/protocol-v2/uiInteraction.d.ts +39 -0
  419. package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
  420. package/dist/protocols/protocol-v2/unlockPolicy.d.ts +4 -0
  421. package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -0
  422. package/dist/protocols/protocol-v2/unlockRetry.d.ts +10 -0
  423. package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -0
  424. package/dist/protocols/protocol-v2/walletSession.d.ts +22 -0
  425. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
  426. package/dist/topLevelInject.d.ts.map +1 -1
  427. package/dist/types/api/checkAllFirmwareRelease.d.ts +29 -4
  428. package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
  429. package/dist/types/api/deviceSettings.d.ts +11 -2
  430. package/dist/types/api/deviceSettings.d.ts.map +1 -1
  431. package/dist/types/api/deviceUnlock.d.ts +1 -1
  432. package/dist/types/api/deviceUnlock.d.ts.map +1 -1
  433. package/dist/types/api/deviceUpdateBootloader.d.ts +6 -0
  434. package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
  435. package/dist/types/api/export.d.ts +6 -2
  436. package/dist/types/api/export.d.ts.map +1 -1
  437. package/dist/types/api/firmwareUpdate.d.ts +75 -1
  438. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  439. package/dist/types/api/firmwareUpdateCapabilities.d.ts +9 -0
  440. package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +1 -0
  441. package/dist/types/api/firmwareUpdatePlan.d.ts +28 -0
  442. package/dist/types/api/firmwareUpdatePlan.d.ts.map +1 -0
  443. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +42 -0
  444. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +1 -0
  445. package/dist/types/api/getDeviceState.d.ts +12 -0
  446. package/dist/types/api/getDeviceState.d.ts.map +1 -0
  447. package/dist/types/api/getFeatures.d.ts.map +1 -1
  448. package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
  449. package/dist/types/api/getPassphraseState.d.ts +2 -10
  450. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  451. package/dist/types/api/index.d.ts +27 -31
  452. package/dist/types/api/index.d.ts.map +1 -1
  453. package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
  454. package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
  455. package/dist/types/api/openWalletSession.d.ts +35 -0
  456. package/dist/types/api/openWalletSession.d.ts.map +1 -0
  457. package/dist/types/api/protocolV2.d.ts +15 -84
  458. package/dist/types/api/protocolV2.d.ts.map +1 -1
  459. package/dist/types/api/sessionCache.d.ts +13 -0
  460. package/dist/types/api/sessionCache.d.ts.map +1 -0
  461. package/dist/types/device.d.ts +132 -8
  462. package/dist/types/device.d.ts.map +1 -1
  463. package/dist/types/params.d.ts.map +1 -1
  464. package/dist/types/settings.d.ts +20 -14
  465. package/dist/types/settings.d.ts.map +1 -1
  466. package/dist/utils/assets.d.ts +2 -1
  467. package/dist/utils/assets.d.ts.map +1 -1
  468. package/dist/utils/deviceFeaturesCompat.d.ts +14 -0
  469. package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
  470. package/dist/utils/deviceFeaturesUtils.d.ts +6 -3
  471. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  472. package/dist/utils/deviceInfoUtils.d.ts +9 -9
  473. package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
  474. package/dist/utils/deviceSettings.d.ts +38 -7
  475. package/dist/utils/deviceSettings.d.ts.map +1 -1
  476. package/dist/utils/deviceVersionUtils.d.ts +7 -5
  477. package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
  478. package/dist/utils/homescreen.d.ts.map +1 -1
  479. package/dist/utils/index.d.ts +5 -2
  480. package/dist/utils/index.d.ts.map +1 -1
  481. package/dist/utils/networkUtils.d.ts +10 -1
  482. package/dist/utils/networkUtils.d.ts.map +1 -1
  483. package/dist/utils/patch.d.ts +1 -1
  484. package/dist/utils/patch.d.ts.map +1 -1
  485. package/dist/utils/pro2Wallpaper.d.ts +12 -0
  486. package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
  487. package/dist/utils/tracing.d.ts.map +1 -1
  488. package/package.json +4 -4
  489. package/src/api/BaseMethod.ts +52 -17
  490. package/src/api/CheckAllFirmwareRelease.ts +344 -4
  491. package/src/api/CheckBootloaderRelease.ts +1 -2
  492. package/src/api/CheckFirmwareRelease.ts +1 -2
  493. package/src/api/CipherKeyValue.ts +4 -0
  494. package/src/api/ClearSessionCache.ts +32 -0
  495. package/src/api/DirList.ts +9 -4
  496. package/src/api/DirMake.ts +7 -4
  497. package/src/api/DirRemove.ts +7 -4
  498. package/src/api/FileDelete.ts +7 -4
  499. package/src/api/FileRead.ts +15 -9
  500. package/src/api/FileWrite.ts +26 -181
  501. package/src/api/FirmwareUpdate.ts +24 -13
  502. package/src/api/FirmwareUpdateV2.ts +386 -113
  503. package/src/api/FirmwareUpdateV3.ts +266 -68
  504. package/src/api/FirmwareUpdateV4.ts +1222 -635
  505. package/src/api/GetDeviceState.ts +59 -0
  506. package/src/api/GetFeatures.ts +6 -4
  507. package/src/api/GetOnekeyFeatures.ts +1 -75
  508. package/src/api/GetPassphraseState.ts +30 -21
  509. package/src/api/OpenWalletSession.ts +214 -0
  510. package/src/api/PathInfo.ts +9 -4
  511. package/src/api/PromptWebDeviceAccess.ts +2 -7
  512. package/src/api/SearchDevices.ts +29 -4
  513. package/src/api/UploadPortfolio.ts +40 -0
  514. package/src/api/alephium/AlephiumGetAddress.ts +0 -4
  515. package/src/api/alephium/AlephiumSignMessage.ts +0 -4
  516. package/src/api/alephium/AlephiumSignTransaction.ts +2 -6
  517. package/src/api/algo/AlgoGetAddress.ts +4 -0
  518. package/src/api/algo/AlgoSignTransaction.ts +4 -0
  519. package/src/api/allnetwork/AllNetworkGetAddressBase.ts +9 -21
  520. package/src/api/aptos/AptosGetAddress.ts +4 -0
  521. package/src/api/aptos/AptosGetPublicKey.ts +4 -0
  522. package/src/api/aptos/AptosSignInMessage.ts +4 -0
  523. package/src/api/aptos/AptosSignMessage.ts +4 -0
  524. package/src/api/aptos/AptosSignTransaction.ts +4 -0
  525. package/src/api/benfen/BenfenGetAddress.ts +11 -7
  526. package/src/api/benfen/BenfenGetPublicKey.ts +0 -4
  527. package/src/api/benfen/BenfenSignMessage.ts +0 -4
  528. package/src/api/benfen/BenfenSignTransaction.ts +0 -4
  529. package/src/api/btc/BTCGetAddress.ts +8 -1
  530. package/src/api/btc/BTCGetPublicKey.ts +9 -2
  531. package/src/api/btc/BTCSignMessage.ts +8 -1
  532. package/src/api/btc/BTCSignPsbt.ts +4 -0
  533. package/src/api/btc/BTCSignTransaction.ts +8 -1
  534. package/src/api/btc/BTCVerifyMessage.ts +8 -1
  535. package/src/api/btc/helpers/versionLimit.ts +7 -4
  536. package/src/api/cardano/CardanoGetAddress.ts +4 -0
  537. package/src/api/cardano/CardanoGetPublicKey.ts +4 -0
  538. package/src/api/cardano/CardanoSignMessage.ts +5 -1
  539. package/src/api/cardano/CardanoSignTransaction.ts +5 -1
  540. package/src/api/conflux/ConfluxGetAddress.ts +6 -0
  541. package/src/api/conflux/ConfluxSignMessage.ts +6 -0
  542. package/src/api/conflux/ConfluxSignMessageCIP23.ts +6 -0
  543. package/src/api/conflux/ConfluxSignTransaction.ts +8 -5
  544. package/src/api/cosmos/CosmosGetAddress.ts +4 -0
  545. package/src/api/cosmos/CosmosGetPublicKey.ts +4 -0
  546. package/src/api/cosmos/CosmosSignTransaction.ts +4 -0
  547. package/src/api/device/DeviceCancel.ts +5 -0
  548. package/src/api/device/DeviceChangePin.ts +28 -0
  549. package/src/api/device/DeviceFullyUploadResource.ts +4 -5
  550. package/src/api/device/DeviceLock.ts +5 -0
  551. package/src/api/device/DeviceRebootToBoardloader.ts +5 -0
  552. package/src/api/device/DeviceRebootToBootloader.ts +5 -0
  553. package/src/api/device/DeviceSettings.ts +194 -1
  554. package/src/api/device/DeviceSupportFeatures.ts +4 -0
  555. package/src/api/device/DeviceUnlock.ts +13 -0
  556. package/src/api/device/DeviceUpdateBootloader.ts +126 -8
  557. package/src/api/device/DeviceWipe.ts +25 -0
  558. package/src/api/device/PreInitialize.ts +4 -0
  559. package/src/api/dynex/DnxGetAddress.ts +0 -6
  560. package/src/api/dynex/DnxSignTransaction.ts +0 -6
  561. package/src/api/evm/EVMGetAddress.ts +6 -2
  562. package/src/api/evm/EVMGetPublicKey.ts +6 -2
  563. package/src/api/evm/EVMSignMessage.ts +6 -2
  564. package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
  565. package/src/api/evm/EVMSignTransaction.ts +6 -2
  566. package/src/api/evm/EVMSignTypedData.ts +42 -50
  567. package/src/api/evm/EVMVerifyMessage.ts +6 -2
  568. package/src/api/evm/legacyV1/getAddress.ts +2 -2
  569. package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
  570. package/src/api/evm/legacyV1/signMessage.ts +2 -2
  571. package/src/api/evm/legacyV1/signTypedData.ts +2 -2
  572. package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
  573. package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
  574. package/src/api/evm/protocol.ts +6 -0
  575. package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
  576. package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
  577. package/src/api/firmware/FirmwareArtifactSource.ts +278 -0
  578. package/src/api/firmware/FirmwareHostBinding.ts +100 -0
  579. package/src/api/firmware/FirmwarePreparationError.ts +12 -0
  580. package/src/api/firmware/FirmwareUpdateBaseMethod.ts +75 -4
  581. package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
  582. package/src/api/firmware/FirmwareUpdatePlan.ts +772 -0
  583. package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +449 -0
  584. package/src/api/firmware/getBinary.ts +8 -3
  585. package/src/api/firmware/updateBootloader.ts +19 -4
  586. package/src/api/firmware/uploadFirmware.ts +140 -22
  587. package/src/api/helpers/batchGetPublickeys.ts +2 -2
  588. package/src/api/helpers/filesystemValidation.ts +61 -0
  589. package/src/api/helpers/paramsValidator.ts +1 -1
  590. package/src/api/helpers/protocolV2FileWrite.ts +199 -0
  591. package/src/api/index.ts +8 -26
  592. package/src/api/kaspa/KaspaGetAddress.ts +7 -0
  593. package/src/api/kaspa/KaspaSignTransaction.ts +380 -29
  594. package/src/api/kaspa/helpers/TransferSerialize.ts +17 -7
  595. package/src/api/lightning/LnurlAuth.ts +0 -4
  596. package/src/api/near/NearGetAddress.ts +4 -0
  597. package/src/api/near/NearSignTransaction.ts +4 -0
  598. package/src/api/nem/NEMGetAddress.ts +4 -0
  599. package/src/api/nem/NEMSignTransaction.ts +4 -0
  600. package/src/api/neo/NeoGetAddress.ts +0 -4
  601. package/src/api/neo/NeoSignTransaction.ts +0 -4
  602. package/src/api/nervos/NervosGetAddress.ts +0 -4
  603. package/src/api/nervos/NervosSignTransaction.ts +2 -6
  604. package/src/api/nexa/NexaGetAddress.ts +0 -4
  605. package/src/api/nexa/NexaSignTransaction.ts +3 -5
  606. package/src/api/nostr/NostrDecryptMessage.ts +4 -0
  607. package/src/api/nostr/NostrEncryptMessage.ts +4 -0
  608. package/src/api/nostr/NostrGetPublicKey.ts +4 -0
  609. package/src/api/nostr/NostrSignEvent.ts +4 -0
  610. package/src/api/nostr/NostrSignSchnorr.ts +4 -0
  611. package/src/api/polkadot/PolkadotGetAddress.ts +4 -0
  612. package/src/api/polkadot/PolkadotSignTransaction.ts +4 -0
  613. package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +5 -2
  614. package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +5 -2
  615. package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +8 -5
  616. package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +10 -6
  617. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +21 -0
  618. package/src/api/protocol-v2/DeviceInfoGet.ts +8 -15
  619. package/src/api/protocol-v2/DeviceReboot.ts +7 -3
  620. package/src/api/protocol-v2/DeviceStatusGet.ts +19 -0
  621. package/src/api/protocol-v2/DeviceUploadWallpaper.ts +134 -0
  622. package/src/api/protocol-v2/FilesystemFormat.ts +9 -3
  623. package/src/api/protocol-v2/FilesystemPermissionFix.ts +5 -2
  624. package/src/api/protocol-v2/Ping.ts +37 -3
  625. package/src/api/protocol-v2/ProtocolInfoRequest.ts +5 -2
  626. package/src/api/protocol-v2/helpers.ts +17 -17
  627. package/src/api/scdo/ScdoGetAddress.ts +0 -4
  628. package/src/api/scdo/ScdoSignMessage.ts +0 -4
  629. package/src/api/scdo/ScdoSignTransaction.ts +0 -4
  630. package/src/api/solana/SolGetAddress.ts +4 -0
  631. package/src/api/solana/SolSignMessage.ts +4 -0
  632. package/src/api/solana/SolSignOffchainMessage.ts +4 -0
  633. package/src/api/solana/SolSignTransaction.ts +4 -0
  634. package/src/api/starcoin/StarcoinGetAddress.ts +4 -0
  635. package/src/api/starcoin/StarcoinGetPublicKey.ts +4 -0
  636. package/src/api/starcoin/StarcoinSignMessage.ts +4 -0
  637. package/src/api/starcoin/StarcoinSignTransaction.ts +4 -0
  638. package/src/api/starcoin/StarcoinVerifyMessage.ts +4 -0
  639. package/src/api/stellar/StellarGetAddress.ts +1 -10
  640. package/src/api/stellar/StellarSignTransaction.ts +1 -14
  641. package/src/api/sui/SuiGetAddress.ts +4 -0
  642. package/src/api/sui/SuiGetPublicKey.ts +4 -0
  643. package/src/api/sui/SuiSignMessage.ts +4 -0
  644. package/src/api/sui/SuiSignTransaction.ts +4 -0
  645. package/src/api/ton/TonGetAddress.ts +4 -0
  646. package/src/api/ton/TonSignData.ts +5 -1
  647. package/src/api/ton/TonSignMessage.ts +4 -0
  648. package/src/api/ton/TonSignProof.ts +4 -0
  649. package/src/api/tron/TronGetAddress.ts +4 -0
  650. package/src/api/tron/TronSignMessage.ts +18 -7
  651. package/src/api/tron/TronSignTransaction.ts +4 -0
  652. package/src/api/utils.ts +7 -3
  653. package/src/api/xrp/XrpGetAddress.ts +4 -0
  654. package/src/api/xrp/XrpSignTransaction.ts +5 -1
  655. package/src/constants/index.ts +1 -4
  656. package/src/core/RequestQueue.ts +1 -0
  657. package/src/core/deviceEventRegistration.ts +23 -0
  658. package/src/core/index.ts +164 -53
  659. package/src/data/messages/messages-protocol-v2.json +1155 -483
  660. package/src/data/messages/messages.json +286 -1
  661. package/src/data-manager/DataManager.ts +39 -39
  662. package/src/data-manager/TransportManager.ts +1 -1
  663. package/src/data-manager/connectSettings.ts +15 -0
  664. package/src/device/Device.ts +652 -281
  665. package/src/device/DeviceCommands.ts +166 -158
  666. package/src/device/DeviceConnector.ts +10 -7
  667. package/src/device/DeviceFeaturesState.ts +25 -0
  668. package/src/device/DevicePool.ts +66 -16
  669. package/src/device/DeviceStateMapper.ts +374 -0
  670. package/src/device/DeviceStateProjector.ts +94 -0
  671. package/src/device/DeviceStateStore.ts +201 -0
  672. package/src/device/DeviceWalletSessionStore.ts +144 -0
  673. package/src/device/cloneDeviceState.ts +39 -0
  674. package/src/device/deviceIdentity.ts +18 -0
  675. package/src/deviceProfile/buildDeviceFeatures.ts +224 -190
  676. package/src/deviceProfile/index.ts +0 -1
  677. package/src/deviceProfile/protocolV2DeviceIdentity.ts +32 -0
  678. package/src/events/device.ts +18 -1
  679. package/src/events/logBlockEvent.ts +79 -2
  680. package/src/events/ui-request.ts +25 -2
  681. package/src/index.ts +5 -0
  682. package/src/inject.ts +37 -43
  683. package/src/lowLevelInject.ts +5 -1
  684. package/src/protocols/protocol-v2/deviceSession.ts +24 -0
  685. package/src/protocols/protocol-v2/features.ts +96 -32
  686. package/src/protocols/protocol-v2/firmware.ts +1 -1
  687. package/src/protocols/protocol-v2/index.ts +8 -1
  688. package/src/protocols/protocol-v2/lockedError.ts +10 -0
  689. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +65 -0
  690. package/src/protocols/protocol-v2/uiInteraction.ts +210 -0
  691. package/src/protocols/protocol-v2/unlockPolicy.ts +105 -0
  692. package/src/protocols/protocol-v2/unlockRetry.ts +109 -0
  693. package/src/protocols/protocol-v2/walletSession.ts +285 -0
  694. package/src/topLevelInject.ts +5 -1
  695. package/src/types/api/checkAllFirmwareRelease.ts +50 -4
  696. package/src/types/api/deviceSettings.ts +26 -2
  697. package/src/types/api/deviceUnlock.ts +1 -1
  698. package/src/types/api/deviceUpdateBootloader.ts +6 -0
  699. package/src/types/api/export.ts +26 -0
  700. package/src/types/api/firmwareUpdate.ts +99 -5
  701. package/src/types/api/firmwareUpdateCapabilities.ts +9 -0
  702. package/src/types/api/firmwareUpdatePlan.ts +38 -0
  703. package/src/types/api/firmwareUpdatePreparedPlan.ts +53 -0
  704. package/src/types/api/getDeviceState.ts +19 -0
  705. package/src/types/api/getFeatures.ts +3 -0
  706. package/src/types/api/getOnekeyFeatures.ts +3 -0
  707. package/src/types/api/getPassphraseState.ts +9 -11
  708. package/src/types/api/index.ts +39 -64
  709. package/src/types/api/kaspaSignTransaction.ts +60 -4
  710. package/src/types/api/openWalletSession.ts +54 -0
  711. package/src/types/api/protocolV2.ts +24 -145
  712. package/src/types/api/sessionCache.ts +19 -0
  713. package/src/types/device.ts +185 -7
  714. package/src/types/params.ts +3 -2
  715. package/src/types/settings.ts +30 -16
  716. package/src/utils/assets.ts +4 -1
  717. package/src/utils/deviceFeaturesCompat.ts +186 -0
  718. package/src/utils/deviceFeaturesUtils.ts +52 -45
  719. package/src/utils/deviceInfoUtils.ts +27 -69
  720. package/src/utils/deviceSettings.ts +171 -39
  721. package/src/utils/deviceVersionUtils.ts +25 -44
  722. package/src/utils/findDefectiveBatchDevice.ts +3 -3
  723. package/src/utils/homescreen.ts +10 -0
  724. package/src/utils/index.ts +21 -2
  725. package/src/utils/networkUtils.ts +274 -16
  726. package/src/utils/pro2Wallpaper.ts +103 -0
  727. package/src/utils/tracing.ts +3 -1
  728. package/tsconfig.type-tests.json +12 -0
  729. package/dist/api/GetDeviceInfo.d.ts +0 -9
  730. package/dist/api/GetDeviceInfo.d.ts.map +0 -1
  731. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
  732. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
  733. package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
  734. package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
  735. package/dist/types/api/getDeviceInfo.d.ts +0 -87
  736. package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
  737. package/src/api/GetDeviceInfo.ts +0 -145
  738. package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
  739. package/src/deviceProfile/buildDeviceProfile.ts +0 -352
  740. package/src/types/api/getDeviceInfo.ts +0 -101
@@ -79,8 +79,6 @@
79
79
  "MessageType_ResetDevice": 14,
80
80
  "MessageType_SetBusy": 16,
81
81
  "MessageType_Features": 17,
82
- "MessageType_PinMatrixRequest": 18,
83
- "MessageType_PinMatrixAck": 19,
84
82
  "MessageType_Cancel": 20,
85
83
  "MessageType_LockDevice": 24,
86
84
  "MessageType_ApplySettings": 25,
@@ -107,8 +105,6 @@
107
105
  "MessageType_FirmwareHash": 89,
108
106
  "MessageType_UnlockPath": 93,
109
107
  "MessageType_UnlockedPathRequest": 94,
110
- "MessageType_UnLockDevice": 10030,
111
- "MessageType_UnLockDeviceResponse": 10031,
112
108
  "MessageType_SetU2FCounter": 63,
113
109
  "MessageType_GetNextU2FCounter": 80,
114
110
  "MessageType_NextU2FCounter": 81,
@@ -144,20 +140,6 @@
144
140
  "MessageType_CosiSignature": 74,
145
141
  "MessageType_BatchGetPublickeys": 10016,
146
142
  "MessageType_EcdsaPublicKeys": 10017,
147
- "MessageType_DebugLinkDecision": 100,
148
- "MessageType_DebugLinkGetState": 101,
149
- "MessageType_DebugLinkState": 102,
150
- "MessageType_DebugLinkStop": 103,
151
- "MessageType_DebugLinkLog": 104,
152
- "MessageType_DebugLinkMemoryRead": 110,
153
- "MessageType_DebugLinkMemory": 111,
154
- "MessageType_DebugLinkMemoryWrite": 112,
155
- "MessageType_DebugLinkFlashErase": 113,
156
- "MessageType_DebugLinkLayout": 9001,
157
- "MessageType_DebugLinkReseedRandom": 9002,
158
- "MessageType_DebugLinkRecordScreen": 9003,
159
- "MessageType_DebugLinkEraseSdCard": 9005,
160
- "MessageType_DebugLinkWatchLayout": 9006,
161
143
  "MessageType_EthereumGetPublicKey": 450,
162
144
  "MessageType_EthereumPublicKey": 451,
163
145
  "MessageType_EthereumGetAddress": 56,
@@ -197,6 +179,7 @@
197
179
  "MessageType_EthereumGnosisSafeTxAck": 20118,
198
180
  "MessageType_EthereumGnosisSafeTxRequest": 20119,
199
181
  "MessageType_EthereumSignTxEIP7702OneKey": 20120,
182
+ "MessageType_EthereumSignTypedDataQR": 20121,
200
183
  "MessageType_NEMGetAddress": 67,
201
184
  "MessageType_NEMAddress": 68,
202
185
  "MessageType_NEMSignTx": 69,
@@ -420,13 +403,6 @@
420
403
  "MessageType_TonSignProof": 11905,
421
404
  "MessageType_TonSignedProof": 11906,
422
405
  "MessageType_TonTxAck": 11907,
423
- "MessageType_ScdoGetAddress": 12001,
424
- "MessageType_ScdoAddress": 12002,
425
- "MessageType_ScdoSignTx": 12003,
426
- "MessageType_ScdoSignedTx": 12004,
427
- "MessageType_ScdoTxAck": 12005,
428
- "MessageType_ScdoSignMessage": 12006,
429
- "MessageType_ScdoSignedMessage": 12007,
430
406
  "MessageType_AlephiumGetAddress": 12101,
431
407
  "MessageType_AlephiumAddress": 12102,
432
408
  "MessageType_AlephiumSignTx": 12103,
@@ -449,11 +425,6 @@
449
425
  "MessageType_NeoAddress": 12302,
450
426
  "MessageType_NeoSignTx": 12303,
451
427
  "MessageType_NeoSignedTx": 12304,
452
- "MessageType_UiviewShowAddressRequest": 30200,
453
- "MessageType_UiviewShowPublicKeyRequest": 30201,
454
- "MessageType_UiviewConfirmTxRequest": 30202,
455
- "MessageType_UiviewConfirmSignMessageRequest": 30203,
456
- "MessageType_UiviewResponse": 30204,
457
428
  "MessageType_DeviceFactoryInfoSet": 60000,
458
429
  "MessageType_DeviceFactoryInfoGet": 60001,
459
430
  "MessageType_DeviceFactoryInfo": 60002,
@@ -468,16 +439,17 @@
468
439
  "MessageType_DeviceSettings": 60410,
469
440
  "MessageType_DeviceSettingsGet": 60411,
470
441
  "MessageType_DeviceSettingsSet": 60412,
442
+ "MessageType_DeviceSettingsPageShow": 60413,
471
443
  "MessageType_DeviceCertificate": 60420,
472
444
  "MessageType_DeviceCertificateWrite": 60421,
473
445
  "MessageType_DeviceCertificateRead": 60422,
474
446
  "MessageType_DeviceCertificateSignature": 60423,
475
447
  "MessageType_DeviceCertificateSign": 60424,
476
- "MessageType_SetWallpaper": 60430,
477
- "MessageType_GetWallpaper": 60431,
478
- "MessageType_Wallpaper": 60432,
448
+ "MessageType_DeviceMiscUsbMscControl": 60440,
479
449
  "MessageType_DeviceInfoGet": 60600,
480
450
  "MessageType_DeviceInfo": 60601,
451
+ "MessageType_DeviceStatusGet": 60602,
452
+ "MessageType_DeviceStatus": 60603,
481
453
  "MessageType_FilesystemPermissionFix": 60800,
482
454
  "MessageType_FilesystemPathInfo": 60801,
483
455
  "MessageType_FilesystemPathInfoQuery": 60802,
@@ -492,7 +464,14 @@
492
464
  "MessageType_FilesystemFormat": 60811,
493
465
  "MessageType_DeviceFirmwareUpdateRequest": 61000,
494
466
  "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
495
- "MessageType_DeviceFirmwareUpdateStatus": 61002
467
+ "MessageType_DeviceFirmwareUpdateStatus": 61002,
468
+ "MessageType_DeviceSessionGet": 61200,
469
+ "MessageType_DeviceSession": 61201,
470
+ "MessageType_DeviceSessionAskPin": 61202,
471
+ "MessageType_DeviceSessionAskPassphrase": 61203,
472
+ "MessageType_PortfolioUpdate": 61400,
473
+ "MessageType_OnboardingStatusGet": 61600,
474
+ "MessageType_OnboardingStatus": 61601
496
475
  },
497
476
  "reserved": [
498
477
  [90, 92],
@@ -5395,6 +5374,37 @@
5395
5374
  }
5396
5375
  }
5397
5376
  },
5377
+ "EthereumSignTypedDataQR": {
5378
+ "fields": {
5379
+ "address_n": {
5380
+ "rule": "repeated",
5381
+ "type": "uint32",
5382
+ "id": 1,
5383
+ "options": {
5384
+ "packed": false
5385
+ }
5386
+ },
5387
+ "json_data": {
5388
+ "type": "bytes",
5389
+ "id": 2
5390
+ },
5391
+ "chain_id": {
5392
+ "type": "uint64",
5393
+ "id": 3
5394
+ },
5395
+ "metamask_v4_compat": {
5396
+ "type": "bool",
5397
+ "id": 4,
5398
+ "options": {
5399
+ "default": true
5400
+ }
5401
+ },
5402
+ "request_id": {
5403
+ "type": "bytes",
5404
+ "id": 5
5405
+ }
5406
+ }
5407
+ },
5398
5408
  "EthereumGetPublicKeyOneKey": {
5399
5409
  "fields": {
5400
5410
  "address_n": {
@@ -5920,30 +5930,6 @@
5920
5930
  }
5921
5931
  }
5922
5932
  },
5923
- "InternalMyAddressRequest": {
5924
- "fields": {
5925
- "coin_type": {
5926
- "rule": "required",
5927
- "type": "uint32",
5928
- "id": 1
5929
- },
5930
- "chain_id": {
5931
- "rule": "required",
5932
- "type": "uint32",
5933
- "id": 2
5934
- },
5935
- "account_index": {
5936
- "rule": "required",
5937
- "type": "uint32",
5938
- "id": 3
5939
- },
5940
- "derive_type": {
5941
- "rule": "required",
5942
- "type": "uint32",
5943
- "id": 4
5944
- }
5945
- }
5946
- },
5947
5933
  "KaspaGetAddress": {
5948
5934
  "fields": {
5949
5935
  "address_n": {
@@ -6121,7 +6107,7 @@
6121
6107
  "PromptTemporarily": 2
6122
6108
  }
6123
6109
  },
6124
- "StartSession": {
6110
+ "Initialize": {
6125
6111
  "fields": {
6126
6112
  "session_id": {
6127
6113
  "type": "bytes",
@@ -6137,10 +6123,21 @@
6137
6123
  "derive_cardano": {
6138
6124
  "type": "bool",
6139
6125
  "id": 3
6126
+ },
6127
+ "passphrase_state": {
6128
+ "type": "string",
6129
+ "id": 8000
6130
+ },
6131
+ "is_contains_attach": {
6132
+ "type": "bool",
6133
+ "id": 8001
6140
6134
  }
6141
6135
  }
6142
6136
  },
6143
- "EndSession": {
6137
+ "GetFeatures": {
6138
+ "fields": {}
6139
+ },
6140
+ "OnekeyGetFeatures": {
6144
6141
  "fields": {}
6145
6142
  },
6146
6143
  "OneKeyDeviceType": {
@@ -6164,220 +6161,602 @@
6164
6161
  "APP": 1
6165
6162
  }
6166
6163
  },
6167
- "OnekeyFeatures": {
6164
+ "Features": {
6168
6165
  "fields": {
6169
- "onekey_device_type": {
6170
- "type": "OneKeyDeviceType",
6166
+ "vendor": {
6167
+ "type": "string",
6171
6168
  "id": 1
6172
6169
  },
6173
- "onekey_romloader_version": {
6174
- "type": "string",
6170
+ "major_version": {
6171
+ "rule": "required",
6172
+ "type": "uint32",
6175
6173
  "id": 2
6176
6174
  },
6177
- "onekey_bootloader_version": {
6178
- "type": "string",
6175
+ "minor_version": {
6176
+ "rule": "required",
6177
+ "type": "uint32",
6179
6178
  "id": 3
6180
6179
  },
6181
- "onekey_firmware_version": {
6182
- "type": "string",
6180
+ "patch_version": {
6181
+ "rule": "required",
6182
+ "type": "uint32",
6183
6183
  "id": 4
6184
6184
  },
6185
- "onekey_romloader_hash": {
6186
- "type": "bytes",
6185
+ "bootloader_mode": {
6186
+ "type": "bool",
6187
6187
  "id": 5
6188
6188
  },
6189
- "onekey_bootloader_hash": {
6190
- "type": "bytes",
6189
+ "device_id": {
6190
+ "type": "string",
6191
6191
  "id": 6
6192
6192
  },
6193
- "onekey_firmware_hash": {
6194
- "type": "bytes",
6193
+ "pin_protection": {
6194
+ "type": "bool",
6195
6195
  "id": 7
6196
6196
  },
6197
- "onekey_romloader_build_id": {
6198
- "type": "string",
6197
+ "passphrase_protection": {
6198
+ "type": "bool",
6199
6199
  "id": 8
6200
6200
  },
6201
- "onekey_bootloader_build_id": {
6201
+ "language": {
6202
6202
  "type": "string",
6203
6203
  "id": 9
6204
6204
  },
6205
- "onekey_firmware_build_id": {
6205
+ "label": {
6206
6206
  "type": "string",
6207
6207
  "id": 10
6208
6208
  },
6209
- "onekey_serial_no": {
6210
- "type": "string",
6211
- "id": 11
6212
- },
6213
- "onekey_coprocessor_bt_name": {
6214
- "type": "string",
6209
+ "initialized": {
6210
+ "type": "bool",
6215
6211
  "id": 12
6216
6212
  },
6217
- "onekey_coprocessor_version": {
6218
- "type": "string",
6213
+ "revision": {
6214
+ "type": "bytes",
6219
6215
  "id": 13
6220
6216
  },
6221
- "onekey_coprocessor_build_id": {
6222
- "type": "string",
6217
+ "bootloader_hash": {
6218
+ "type": "bytes",
6223
6219
  "id": 14
6224
6220
  },
6225
- "onekey_coprocessor_hash": {
6226
- "type": "bytes",
6221
+ "imported": {
6222
+ "type": "bool",
6227
6223
  "id": 15
6228
6224
  },
6229
- "onekey_se_type": {
6230
- "type": "OneKeySeType",
6225
+ "unlocked": {
6226
+ "type": "bool",
6231
6227
  "id": 16
6232
6228
  },
6233
- "onekey_se01_state": {
6234
- "type": "OneKeySEState",
6235
- "id": 17
6229
+ "_passphrase_cached": {
6230
+ "type": "bool",
6231
+ "id": 17,
6232
+ "options": {
6233
+ "deprecated": true
6234
+ }
6236
6235
  },
6237
- "onekey_se02_state": {
6238
- "type": "OneKeySEState",
6236
+ "firmware_present": {
6237
+ "type": "bool",
6239
6238
  "id": 18
6240
6239
  },
6241
- "onekey_se03_state": {
6242
- "type": "OneKeySEState",
6240
+ "needs_backup": {
6241
+ "type": "bool",
6243
6242
  "id": 19
6244
6243
  },
6245
- "onekey_se04_state": {
6246
- "type": "OneKeySEState",
6244
+ "flags": {
6245
+ "type": "uint32",
6247
6246
  "id": 20
6248
6247
  },
6249
- "onekey_se01_version": {
6248
+ "model": {
6250
6249
  "type": "string",
6251
6250
  "id": 21
6252
6251
  },
6253
- "onekey_se02_version": {
6254
- "type": "string",
6252
+ "fw_major": {
6253
+ "type": "uint32",
6255
6254
  "id": 22
6256
6255
  },
6257
- "onekey_se03_version": {
6258
- "type": "string",
6256
+ "fw_minor": {
6257
+ "type": "uint32",
6259
6258
  "id": 23
6260
6259
  },
6261
- "onekey_se04_version": {
6262
- "type": "string",
6260
+ "fw_patch": {
6261
+ "type": "uint32",
6263
6262
  "id": 24
6264
6263
  },
6265
- "onekey_se01_hash": {
6266
- "type": "bytes",
6264
+ "fw_vendor": {
6265
+ "type": "string",
6267
6266
  "id": 25
6268
6267
  },
6269
- "onekey_se02_hash": {
6270
- "type": "bytes",
6271
- "id": 26
6272
- },
6273
- "onekey_se03_hash": {
6274
- "type": "bytes",
6268
+ "unfinished_backup": {
6269
+ "type": "bool",
6275
6270
  "id": 27
6276
6271
  },
6277
- "onekey_se04_hash": {
6278
- "type": "bytes",
6272
+ "no_backup": {
6273
+ "type": "bool",
6279
6274
  "id": 28
6280
6275
  },
6281
- "onekey_se01_build_id": {
6282
- "type": "string",
6276
+ "recovery_mode": {
6277
+ "type": "bool",
6283
6278
  "id": 29
6284
6279
  },
6285
- "onekey_se02_build_id": {
6286
- "type": "string",
6287
- "id": 30
6280
+ "capabilities": {
6281
+ "rule": "repeated",
6282
+ "type": "Capability",
6283
+ "id": 30,
6284
+ "options": {
6285
+ "packed": false
6286
+ }
6288
6287
  },
6289
- "onekey_se03_build_id": {
6290
- "type": "string",
6288
+ "backup_type": {
6289
+ "type": "BackupType",
6291
6290
  "id": 31
6292
6291
  },
6293
- "onekey_se04_build_id": {
6294
- "type": "string",
6292
+ "sd_card_present": {
6293
+ "type": "bool",
6295
6294
  "id": 32
6296
6295
  },
6297
- "onekey_se01_bootloader_version": {
6298
- "type": "string",
6296
+ "sd_protection": {
6297
+ "type": "bool",
6299
6298
  "id": 33
6300
6299
  },
6301
- "onekey_se02_bootloader_version": {
6302
- "type": "string",
6300
+ "wipe_code_protection": {
6301
+ "type": "bool",
6303
6302
  "id": 34
6304
6303
  },
6305
- "onekey_se03_bootloader_version": {
6306
- "type": "string",
6304
+ "session_id": {
6305
+ "type": "bytes",
6307
6306
  "id": 35
6308
6307
  },
6309
- "onekey_se04_bootloader_version": {
6310
- "type": "string",
6308
+ "passphrase_always_on_device": {
6309
+ "type": "bool",
6311
6310
  "id": 36
6312
6311
  },
6313
- "onekey_se01_bootloader_hash": {
6314
- "type": "bytes",
6312
+ "safety_checks": {
6313
+ "type": "SafetyCheckLevel",
6315
6314
  "id": 37
6316
6315
  },
6317
- "onekey_se02_bootloader_hash": {
6318
- "type": "bytes",
6316
+ "auto_lock_delay_ms": {
6317
+ "type": "uint32",
6319
6318
  "id": 38
6320
6319
  },
6321
- "onekey_se03_bootloader_hash": {
6322
- "type": "bytes",
6320
+ "display_rotation": {
6321
+ "type": "uint32",
6323
6322
  "id": 39
6324
6323
  },
6325
- "onekey_se04_bootloader_hash": {
6326
- "type": "bytes",
6324
+ "experimental_features": {
6325
+ "type": "bool",
6327
6326
  "id": 40
6328
6327
  },
6329
- "onekey_se01_bootloader_build_id": {
6328
+ "offset": {
6329
+ "type": "uint32",
6330
+ "id": 500
6331
+ },
6332
+ "coprocessor_bt_name": {
6330
6333
  "type": "string",
6331
- "id": 41
6334
+ "id": 501
6332
6335
  },
6333
- "onekey_se02_bootloader_build_id": {
6336
+ "coprocessor_version": {
6334
6337
  "type": "string",
6335
- "id": 42
6338
+ "id": 502
6336
6339
  },
6337
- "onekey_se03_bootloader_build_id": {
6340
+ "coprocessor_bt_enable": {
6341
+ "type": "bool",
6342
+ "id": 503
6343
+ },
6344
+ "se_enable": {
6345
+ "type": "bool",
6346
+ "id": 504
6347
+ },
6348
+ "se_ver": {
6338
6349
  "type": "string",
6339
- "id": 43
6350
+ "id": 506
6340
6351
  },
6341
- "onekey_se04_bootloader_build_id": {
6352
+ "backup_only": {
6353
+ "type": "bool",
6354
+ "id": 507
6355
+ },
6356
+ "onekey_version": {
6342
6357
  "type": "string",
6343
- "id": 44
6344
- }
6345
- }
6346
- },
6347
- "LockDevice": {
6348
- "fields": {}
6349
- },
6350
- "SetBusy": {
6351
- "fields": {
6352
- "expiry_ms": {
6353
- "type": "uint32",
6354
- "id": 1
6355
- }
6356
- }
6357
- },
6358
- "ApplySettings": {
6359
- "fields": {
6360
- "language": {
6358
+ "id": 508
6359
+ },
6360
+ "onekey_serial": {
6361
6361
  "type": "string",
6362
- "id": 1
6362
+ "id": 509
6363
6363
  },
6364
- "label": {
6364
+ "bootloader_version": {
6365
6365
  "type": "string",
6366
- "id": 2
6366
+ "id": 510
6367
6367
  },
6368
- "use_passphrase": {
6369
- "type": "bool",
6370
- "id": 3
6368
+ "serial_no": {
6369
+ "type": "string",
6370
+ "id": 511
6371
6371
  },
6372
- "homescreen": {
6373
- "type": "bytes",
6374
- "id": 4
6372
+ "spi_flash": {
6373
+ "type": "string",
6374
+ "id": 512
6375
6375
  },
6376
- "_passphrase_source": {
6376
+ "initstates": {
6377
6377
  "type": "uint32",
6378
- "id": 5,
6379
- "options": {
6380
- "deprecated": true
6378
+ "id": 513
6379
+ },
6380
+ "NFT_voucher": {
6381
+ "type": "bytes",
6382
+ "id": 514
6383
+ },
6384
+ "cpu_info": {
6385
+ "type": "string",
6386
+ "id": 515
6387
+ },
6388
+ "pre_firmware": {
6389
+ "type": "string",
6390
+ "id": 516
6391
+ },
6392
+ "coin_switch": {
6393
+ "type": "uint32",
6394
+ "id": 517
6395
+ },
6396
+ "build_id": {
6397
+ "type": "bytes",
6398
+ "id": 518
6399
+ },
6400
+ "romloader_version": {
6401
+ "type": "string",
6402
+ "id": 519
6403
+ },
6404
+ "busy": {
6405
+ "type": "bool",
6406
+ "id": 41
6407
+ },
6408
+ "onekey_device_type": {
6409
+ "type": "OneKeyDeviceType",
6410
+ "id": 600
6411
+ },
6412
+ "onekey_se_type": {
6413
+ "type": "OneKeySeType",
6414
+ "id": 601
6415
+ },
6416
+ "onekey_romloader_version": {
6417
+ "type": "string",
6418
+ "id": 602
6419
+ },
6420
+ "onekey_romloader_hash": {
6421
+ "type": "bytes",
6422
+ "id": 603
6423
+ },
6424
+ "onekey_bootloader_version": {
6425
+ "type": "string",
6426
+ "id": 604
6427
+ },
6428
+ "onekey_bootloader_hash": {
6429
+ "type": "bytes",
6430
+ "id": 605
6431
+ },
6432
+ "onekey_se01_version": {
6433
+ "type": "string",
6434
+ "id": 606
6435
+ },
6436
+ "onekey_se01_hash": {
6437
+ "type": "bytes",
6438
+ "id": 607
6439
+ },
6440
+ "onekey_se01_build_id": {
6441
+ "type": "string",
6442
+ "id": 608
6443
+ },
6444
+ "onekey_firmware_version": {
6445
+ "type": "string",
6446
+ "id": 609
6447
+ },
6448
+ "onekey_firmware_hash": {
6449
+ "type": "bytes",
6450
+ "id": 610
6451
+ },
6452
+ "onekey_firmware_build_id": {
6453
+ "type": "string",
6454
+ "id": 611
6455
+ },
6456
+ "onekey_serial_no": {
6457
+ "type": "string",
6458
+ "id": 612
6459
+ },
6460
+ "onekey_bootloader_build_id": {
6461
+ "type": "string",
6462
+ "id": 613
6463
+ },
6464
+ "onekey_coprocessor_bt_name": {
6465
+ "type": "string",
6466
+ "id": 614
6467
+ },
6468
+ "onekey_coprocessor_version": {
6469
+ "type": "string",
6470
+ "id": 615
6471
+ },
6472
+ "onekey_coprocessor_build_id": {
6473
+ "type": "string",
6474
+ "id": 616
6475
+ },
6476
+ "onekey_coprocessor_hash": {
6477
+ "type": "bytes",
6478
+ "id": 617
6479
+ },
6480
+ "onekey_se02_version": {
6481
+ "type": "string",
6482
+ "id": 618
6483
+ },
6484
+ "onekey_se03_version": {
6485
+ "type": "string",
6486
+ "id": 619
6487
+ },
6488
+ "onekey_se04_version": {
6489
+ "type": "string",
6490
+ "id": 620
6491
+ },
6492
+ "onekey_se01_state": {
6493
+ "type": "OneKeySEState",
6494
+ "id": 621
6495
+ },
6496
+ "onekey_se02_state": {
6497
+ "type": "OneKeySEState",
6498
+ "id": 622
6499
+ },
6500
+ "onekey_se03_state": {
6501
+ "type": "OneKeySEState",
6502
+ "id": 623
6503
+ },
6504
+ "onekey_se04_state": {
6505
+ "type": "OneKeySEState",
6506
+ "id": 624
6507
+ },
6508
+ "attach_to_pin_user": {
6509
+ "type": "bool",
6510
+ "id": 625
6511
+ },
6512
+ "unlocked_attach_pin": {
6513
+ "type": "bool",
6514
+ "id": 626
6515
+ }
6516
+ },
6517
+ "nested": {
6518
+ "Capability": {
6519
+ "options": {
6520
+ "(has_bitcoin_only_values)": true
6521
+ },
6522
+ "values": {
6523
+ "Capability_Bitcoin": 1,
6524
+ "Capability_Bitcoin_like": 2,
6525
+ "Capability_Binance": 3,
6526
+ "Capability_Cardano": 4,
6527
+ "Capability_Crypto": 5,
6528
+ "Capability_EOS": 6,
6529
+ "Capability_Ethereum": 7,
6530
+ "Capability_Lisk": 8,
6531
+ "Capability_Monero": 9,
6532
+ "Capability_NEM": 10,
6533
+ "Capability_Ripple": 11,
6534
+ "Capability_Stellar": 12,
6535
+ "Capability_Tezos": 13,
6536
+ "Capability_U2F": 14,
6537
+ "Capability_Shamir": 15,
6538
+ "Capability_ShamirGroups": 16,
6539
+ "Capability_PassphraseEntry": 17,
6540
+ "Capability_AttachToPin": 18,
6541
+ "Capability_EthereumTypedData": 1000
6542
+ }
6543
+ }
6544
+ }
6545
+ },
6546
+ "OnekeyFeatures": {
6547
+ "fields": {
6548
+ "onekey_device_type": {
6549
+ "type": "OneKeyDeviceType",
6550
+ "id": 1
6551
+ },
6552
+ "onekey_romloader_version": {
6553
+ "type": "string",
6554
+ "id": 2
6555
+ },
6556
+ "onekey_bootloader_version": {
6557
+ "type": "string",
6558
+ "id": 3
6559
+ },
6560
+ "onekey_firmware_version": {
6561
+ "type": "string",
6562
+ "id": 4
6563
+ },
6564
+ "onekey_romloader_hash": {
6565
+ "type": "bytes",
6566
+ "id": 5
6567
+ },
6568
+ "onekey_bootloader_hash": {
6569
+ "type": "bytes",
6570
+ "id": 6
6571
+ },
6572
+ "onekey_firmware_hash": {
6573
+ "type": "bytes",
6574
+ "id": 7
6575
+ },
6576
+ "onekey_romloader_build_id": {
6577
+ "type": "string",
6578
+ "id": 8
6579
+ },
6580
+ "onekey_bootloader_build_id": {
6581
+ "type": "string",
6582
+ "id": 9
6583
+ },
6584
+ "onekey_firmware_build_id": {
6585
+ "type": "string",
6586
+ "id": 10
6587
+ },
6588
+ "onekey_serial_no": {
6589
+ "type": "string",
6590
+ "id": 11
6591
+ },
6592
+ "onekey_coprocessor_bt_name": {
6593
+ "type": "string",
6594
+ "id": 12
6595
+ },
6596
+ "onekey_coprocessor_version": {
6597
+ "type": "string",
6598
+ "id": 13
6599
+ },
6600
+ "onekey_coprocessor_build_id": {
6601
+ "type": "string",
6602
+ "id": 14
6603
+ },
6604
+ "onekey_coprocessor_hash": {
6605
+ "type": "bytes",
6606
+ "id": 15
6607
+ },
6608
+ "onekey_se_type": {
6609
+ "type": "OneKeySeType",
6610
+ "id": 16
6611
+ },
6612
+ "onekey_se01_state": {
6613
+ "type": "OneKeySEState",
6614
+ "id": 17
6615
+ },
6616
+ "onekey_se02_state": {
6617
+ "type": "OneKeySEState",
6618
+ "id": 18
6619
+ },
6620
+ "onekey_se03_state": {
6621
+ "type": "OneKeySEState",
6622
+ "id": 19
6623
+ },
6624
+ "onekey_se04_state": {
6625
+ "type": "OneKeySEState",
6626
+ "id": 20
6627
+ },
6628
+ "onekey_se01_version": {
6629
+ "type": "string",
6630
+ "id": 21
6631
+ },
6632
+ "onekey_se02_version": {
6633
+ "type": "string",
6634
+ "id": 22
6635
+ },
6636
+ "onekey_se03_version": {
6637
+ "type": "string",
6638
+ "id": 23
6639
+ },
6640
+ "onekey_se04_version": {
6641
+ "type": "string",
6642
+ "id": 24
6643
+ },
6644
+ "onekey_se01_hash": {
6645
+ "type": "bytes",
6646
+ "id": 25
6647
+ },
6648
+ "onekey_se02_hash": {
6649
+ "type": "bytes",
6650
+ "id": 26
6651
+ },
6652
+ "onekey_se03_hash": {
6653
+ "type": "bytes",
6654
+ "id": 27
6655
+ },
6656
+ "onekey_se04_hash": {
6657
+ "type": "bytes",
6658
+ "id": 28
6659
+ },
6660
+ "onekey_se01_build_id": {
6661
+ "type": "string",
6662
+ "id": 29
6663
+ },
6664
+ "onekey_se02_build_id": {
6665
+ "type": "string",
6666
+ "id": 30
6667
+ },
6668
+ "onekey_se03_build_id": {
6669
+ "type": "string",
6670
+ "id": 31
6671
+ },
6672
+ "onekey_se04_build_id": {
6673
+ "type": "string",
6674
+ "id": 32
6675
+ },
6676
+ "onekey_se01_bootloader_version": {
6677
+ "type": "string",
6678
+ "id": 33
6679
+ },
6680
+ "onekey_se02_bootloader_version": {
6681
+ "type": "string",
6682
+ "id": 34
6683
+ },
6684
+ "onekey_se03_bootloader_version": {
6685
+ "type": "string",
6686
+ "id": 35
6687
+ },
6688
+ "onekey_se04_bootloader_version": {
6689
+ "type": "string",
6690
+ "id": 36
6691
+ },
6692
+ "onekey_se01_bootloader_hash": {
6693
+ "type": "bytes",
6694
+ "id": 37
6695
+ },
6696
+ "onekey_se02_bootloader_hash": {
6697
+ "type": "bytes",
6698
+ "id": 38
6699
+ },
6700
+ "onekey_se03_bootloader_hash": {
6701
+ "type": "bytes",
6702
+ "id": 39
6703
+ },
6704
+ "onekey_se04_bootloader_hash": {
6705
+ "type": "bytes",
6706
+ "id": 40
6707
+ },
6708
+ "onekey_se01_bootloader_build_id": {
6709
+ "type": "string",
6710
+ "id": 41
6711
+ },
6712
+ "onekey_se02_bootloader_build_id": {
6713
+ "type": "string",
6714
+ "id": 42
6715
+ },
6716
+ "onekey_se03_bootloader_build_id": {
6717
+ "type": "string",
6718
+ "id": 43
6719
+ },
6720
+ "onekey_se04_bootloader_build_id": {
6721
+ "type": "string",
6722
+ "id": 44
6723
+ }
6724
+ }
6725
+ },
6726
+ "LockDevice": {
6727
+ "fields": {}
6728
+ },
6729
+ "SetBusy": {
6730
+ "fields": {
6731
+ "expiry_ms": {
6732
+ "type": "uint32",
6733
+ "id": 1
6734
+ }
6735
+ }
6736
+ },
6737
+ "ApplySettings": {
6738
+ "fields": {
6739
+ "language": {
6740
+ "type": "string",
6741
+ "id": 1
6742
+ },
6743
+ "label": {
6744
+ "type": "string",
6745
+ "id": 2
6746
+ },
6747
+ "use_passphrase": {
6748
+ "type": "bool",
6749
+ "id": 3
6750
+ },
6751
+ "homescreen": {
6752
+ "type": "bytes",
6753
+ "id": 4
6754
+ },
6755
+ "_passphrase_source": {
6756
+ "type": "uint32",
6757
+ "id": 5,
6758
+ "options": {
6759
+ "deprecated": true
6381
6760
  }
6382
6761
  },
6383
6762
  "auto_lock_delay_ms": {
@@ -6877,49 +7256,6 @@
6877
7256
  }
6878
7257
  }
6879
7258
  },
6880
- "WallpaperTarget": {
6881
- "values": {
6882
- "Home": 0,
6883
- "Lock": 1
6884
- }
6885
- },
6886
- "SetWallpaper": {
6887
- "fields": {
6888
- "target": {
6889
- "rule": "required",
6890
- "type": "WallpaperTarget",
6891
- "id": 1
6892
- },
6893
- "path": {
6894
- "rule": "required",
6895
- "type": "string",
6896
- "id": 2
6897
- }
6898
- }
6899
- },
6900
- "GetWallpaper": {
6901
- "fields": {
6902
- "target": {
6903
- "rule": "required",
6904
- "type": "WallpaperTarget",
6905
- "id": 1
6906
- }
6907
- }
6908
- },
6909
- "Wallpaper": {
6910
- "fields": {
6911
- "target": {
6912
- "rule": "required",
6913
- "type": "WallpaperTarget",
6914
- "id": 1
6915
- },
6916
- "path": {
6917
- "rule": "required",
6918
- "type": "string",
6919
- "id": 2
6920
- }
6921
- }
6922
- },
6923
7259
  "ResourceUpdate": {
6924
7260
  "fields": {
6925
7261
  "file_name": {
@@ -7006,14 +7342,6 @@
7006
7342
  "passphrase_state": {
7007
7343
  "type": "string",
7008
7344
  "id": 1
7009
- },
7010
- "_only_main_pin": {
7011
- "type": "bool",
7012
- "id": 2
7013
- },
7014
- "allow_create_attach_pin": {
7015
- "type": "bool",
7016
- "id": 3
7017
7345
  }
7018
7346
  }
7019
7347
  },
@@ -11059,105 +11387,30 @@
11059
11387
  }
11060
11388
  }
11061
11389
  },
11062
- "ViewAmount": {
11063
- "fields": {
11064
- "is_unlimited": {
11065
- "rule": "required",
11066
- "type": "bool",
11067
- "id": 1
11068
- },
11069
- "num": {
11070
- "rule": "required",
11071
- "type": "string",
11072
- "id": 2
11073
- }
11074
- }
11075
- },
11076
- "ViewDetail": {
11077
- "fields": {
11078
- "key": {
11079
- "rule": "required",
11080
- "type": "uint32",
11081
- "id": 1
11082
- },
11083
- "value": {
11084
- "rule": "required",
11085
- "type": "string",
11086
- "id": 2
11087
- },
11088
- "is_overview": {
11089
- "rule": "required",
11090
- "type": "bool",
11091
- "id": 3
11092
- },
11093
- "has_icon": {
11094
- "rule": "required",
11095
- "type": "bool",
11096
- "id": 4
11097
- }
11098
- }
11099
- },
11100
- "ViewTipType": {
11390
+ "UiAnimationType": {
11101
11391
  "values": {
11102
- "Default": 0,
11103
- "Highlight": 1,
11104
- "Recommend": 2,
11105
- "Warning": 3,
11106
- "Danger": 4
11107
- }
11108
- },
11109
- "ViewTip": {
11110
- "fields": {
11111
- "type": {
11112
- "rule": "required",
11113
- "type": "ViewTipType",
11114
- "id": 1
11115
- },
11116
- "text": {
11117
- "rule": "required",
11118
- "type": "string",
11119
- "id": 2
11120
- }
11392
+ "Unknown": 0,
11393
+ "Signing": 1
11121
11394
  }
11122
11395
  },
11123
- "ViewSignPage": {
11124
- "fields": {
11125
- "title": {
11126
- "rule": "required",
11127
- "type": "string",
11128
- "id": 1
11129
- },
11130
- "amount": {
11131
- "type": "ViewAmount",
11132
- "id": 2
11133
- },
11134
- "general": {
11135
- "rule": "repeated",
11136
- "type": "ViewDetail",
11137
- "id": 3
11138
- },
11139
- "tip": {
11140
- "type": "ViewTip",
11141
- "id": 4
11142
- }
11396
+ "UiAnimationCommand": {
11397
+ "values": {
11398
+ "CommandUnknown": 0,
11399
+ "Start": 1,
11400
+ "Stop": 2,
11401
+ "Refresh": 3
11143
11402
  }
11144
11403
  },
11145
- "ViewVerifyPage": {
11404
+ "UiAnimationRequest": {
11146
11405
  "fields": {
11147
- "title": {
11406
+ "command": {
11148
11407
  "rule": "required",
11149
- "type": "string",
11408
+ "type": "UiAnimationCommand",
11150
11409
  "id": 1
11151
11410
  },
11152
- "address": {
11153
- "rule": "required",
11154
- "type": "string",
11411
+ "type": {
11412
+ "type": "UiAnimationType",
11155
11413
  "id": 2
11156
- },
11157
- "path": {
11158
- "rule": "required",
11159
- "type": "string",
11160
- "id": 3
11161
11414
  }
11162
11415
  }
11163
11416
  },
@@ -11244,7 +11497,15 @@
11244
11497
  }
11245
11498
  },
11246
11499
  "ProtocolInfoRequest": {
11247
- "fields": {}
11500
+ "fields": {
11501
+ "eventless_wallet_session": {
11502
+ "type": "bool",
11503
+ "id": 1,
11504
+ "options": {
11505
+ "default": false
11506
+ }
11507
+ }
11508
+ }
11248
11509
  },
11249
11510
  "ProtocolInfo": {
11250
11511
  "fields": {
@@ -11253,17 +11514,18 @@
11253
11514
  "type": "uint32",
11254
11515
  "id": 1
11255
11516
  },
11517
+ "build_fingerprint": {
11518
+ "rule": "required",
11519
+ "type": "string",
11520
+ "id": 2
11521
+ },
11256
11522
  "supported_messages": {
11257
11523
  "rule": "repeated",
11258
11524
  "type": "uint32",
11259
- "id": 2,
11525
+ "id": 3,
11260
11526
  "options": {
11261
11527
  "packed": false
11262
11528
  }
11263
- },
11264
- "protobuf_definition": {
11265
- "type": "string",
11266
- "id": 3
11267
11529
  }
11268
11530
  }
11269
11531
  },
@@ -11298,66 +11560,153 @@
11298
11560
  },
11299
11561
  "subcode": {
11300
11562
  "type": "uint32",
11301
- "id": 2
11563
+ "id": 2
11564
+ },
11565
+ "message": {
11566
+ "type": "string",
11567
+ "id": 3
11568
+ }
11569
+ },
11570
+ "nested": {
11571
+ "FailureType": {
11572
+ "values": {
11573
+ "Failure_InvalidMessage": 1,
11574
+ "Failure_UndefinedError": 2,
11575
+ "Failure_UsageError": 3,
11576
+ "Failure_DataError": 4,
11577
+ "Failure_ProcessError": 5
11578
+ }
11579
+ }
11580
+ }
11581
+ },
11582
+ "DeviceErrorCode": {
11583
+ "values": {
11584
+ "DeviceError_None": 0,
11585
+ "DeviceError_Busy": 1,
11586
+ "DeviceError_NotInitialized": 2,
11587
+ "DeviceError_ActionCancelled": 3,
11588
+ "DeviceError_PinAlreadyUsed": 4,
11589
+ "DeviceError_PersistFailed": 5,
11590
+ "DeviceError_SeError": 6,
11591
+ "DeviceError_InvalidLanguage": 7,
11592
+ "DeviceError_WallpaperNotUsable": 8,
11593
+ "DeviceError_DeviceLocked": 9
11594
+ }
11595
+ },
11596
+ "DeviceRebootType": {
11597
+ "values": {
11598
+ "Normal": 0,
11599
+ "Romloader": 1,
11600
+ "Bootloader": 2
11601
+ }
11602
+ },
11603
+ "DeviceReboot": {
11604
+ "fields": {
11605
+ "reboot_type": {
11606
+ "rule": "required",
11607
+ "type": "DeviceRebootType",
11608
+ "id": 1
11609
+ }
11610
+ }
11611
+ },
11612
+ "DeviceSettings": {
11613
+ "fields": {
11614
+ "bt_enable": {
11615
+ "type": "bool",
11616
+ "id": 1
11617
+ },
11618
+ "language": {
11619
+ "type": "string",
11620
+ "id": 2
11621
+ },
11622
+ "wallpaper_path": {
11623
+ "type": "string",
11624
+ "id": 3
11625
+ },
11626
+ "brightness": {
11627
+ "type": "uint32",
11628
+ "id": 4
11629
+ },
11630
+ "animation_enable": {
11631
+ "type": "bool",
11632
+ "id": 5
11633
+ },
11634
+ "tap_to_wake": {
11635
+ "type": "bool",
11636
+ "id": 6
11637
+ },
11638
+ "haptic_feedback": {
11639
+ "type": "bool",
11640
+ "id": 7
11641
+ },
11642
+ "device_name_display_enabled": {
11643
+ "type": "bool",
11644
+ "id": 8
11645
+ },
11646
+ "airgap_mode": {
11647
+ "type": "bool",
11648
+ "id": 9
11649
+ },
11650
+ "usb_lock_enable": {
11651
+ "type": "bool",
11652
+ "id": 10
11653
+ },
11654
+ "random_keypad": {
11655
+ "type": "bool",
11656
+ "id": 11
11657
+ },
11658
+ "passphrase_enable": {
11659
+ "type": "bool",
11660
+ "id": 100
11661
+ },
11662
+ "fido_enabled": {
11663
+ "type": "bool",
11664
+ "id": 101
11665
+ },
11666
+ "autolock_delay_ms": {
11667
+ "type": "uint32",
11668
+ "id": 102
11669
+ },
11670
+ "autoshutdown_delay_ms": {
11671
+ "type": "uint32",
11672
+ "id": 103
11302
11673
  },
11303
- "message": {
11674
+ "label": {
11304
11675
  "type": "string",
11305
- "id": 3
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
- }
11676
+ "id": 104
11317
11677
  }
11318
11678
  }
11319
11679
  },
11320
- "DeviceRebootType": {
11321
- "values": {
11322
- "Normal": 0,
11323
- "Romloader": 1,
11324
- "Bootloader": 2
11325
- }
11680
+ "DeviceSettingsGet": {
11681
+ "fields": {}
11326
11682
  },
11327
- "DeviceReboot": {
11683
+ "DeviceSettingsSet": {
11328
11684
  "fields": {
11329
- "reboot_type": {
11685
+ "settings": {
11330
11686
  "rule": "required",
11331
- "type": "DeviceRebootType",
11687
+ "type": "DeviceSettings",
11332
11688
  "id": 1
11333
11689
  }
11334
11690
  }
11335
11691
  },
11336
- "DeviceSettings": {
11337
- "fields": {
11338
- "label": {
11339
- "type": "string",
11340
- "id": 1
11341
- },
11342
- "bt_enable": {
11343
- "type": "bool",
11344
- "id": 2
11345
- },
11346
- "language": {
11347
- "type": "string",
11348
- "id": 3
11349
- }
11692
+ "DeviceSettingsPage": {
11693
+ "values": {
11694
+ "DeviceReset": 0,
11695
+ "DevicePinChange": 1,
11696
+ "DevicePassphrase": 2,
11697
+ "DeviceAirgap": 3
11350
11698
  }
11351
11699
  },
11352
- "DeviceSettingsGet": {
11353
- "fields": {}
11354
- },
11355
- "DeviceSettingsSet": {
11700
+ "DeviceSettingsPageShow": {
11356
11701
  "fields": {
11357
- "settings": {
11702
+ "page": {
11358
11703
  "rule": "required",
11359
- "type": "DeviceSettings",
11704
+ "type": "DeviceSettingsPage",
11360
11705
  "id": 1
11706
+ },
11707
+ "field_name": {
11708
+ "type": "string",
11709
+ "id": 2
11361
11710
  }
11362
11711
  }
11363
11712
  },
@@ -11404,109 +11753,11 @@
11404
11753
  }
11405
11754
  }
11406
11755
  },
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
11443
- },
11444
- "path": {
11445
- "rule": "required",
11446
- "type": "string",
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": {
11756
+ "DeviceMiscUsbMscControl": {
11461
11757
  "fields": {
11462
- "target_id": {
11758
+ "enable": {
11463
11759
  "rule": "required",
11464
- "type": "DeviceFirmwareTargetType",
11465
- "id": 1
11466
- },
11467
- "status": {
11468
- "type": "DeviceFirmwareUpdateTaskStatus",
11469
- "id": 10
11470
- },
11471
- "payload_version": {
11472
- "type": "uint32",
11473
- "id": 20
11474
- },
11475
- "path": {
11476
- "type": "string",
11477
- "id": 30
11478
- }
11479
- }
11480
- },
11481
- "DeviceFirmwareUpdateRecordFields": {
11482
- "fields": {
11483
- "status": {
11484
11760
  "type": "bool",
11485
- "id": 10
11486
- },
11487
- "payload_version": {
11488
- "type": "bool",
11489
- "id": 20
11490
- },
11491
- "path": {
11492
- "type": "bool",
11493
- "id": 30
11494
- }
11495
- }
11496
- },
11497
- "DeviceFirmwareUpdateStatusGet": {
11498
- "fields": {
11499
- "fields": {
11500
- "type": "DeviceFirmwareUpdateRecordFields",
11501
- "id": 1
11502
- }
11503
- }
11504
- },
11505
- "DeviceFirmwareUpdateStatus": {
11506
- "fields": {
11507
- "records": {
11508
- "rule": "repeated",
11509
- "type": "DeviceFirmwareUpdateRecord",
11510
11761
  "id": 1
11511
11762
  }
11512
11763
  }
@@ -11601,11 +11852,118 @@
11601
11852
  }
11602
11853
  }
11603
11854
  },
11604
- "DeviceFactoryTest": {
11855
+ "DeviceFactoryTest": {
11856
+ "fields": {
11857
+ "burn_in_test": {
11858
+ "rule": "required",
11859
+ "type": "bool",
11860
+ "id": 1
11861
+ }
11862
+ }
11863
+ },
11864
+ "DeviceFirmwareTargetType": {
11865
+ "values": {
11866
+ "FW_MGMT_TARGET_INVALID": 0,
11867
+ "FW_MGMT_TARGET_CRATE": 1,
11868
+ "FW_MGMT_TARGET_ROMLOADER": 2,
11869
+ "FW_MGMT_TARGET_BOOTLOADER": 3,
11870
+ "FW_MGMT_TARGET_APPLICATION_P1": 4,
11871
+ "FW_MGMT_TARGET_APPLICATION_P2": 5,
11872
+ "FW_MGMT_TARGET_COPROCESSOR": 6,
11873
+ "FW_MGMT_TARGET_SE01": 7,
11874
+ "FW_MGMT_TARGET_SE02": 8,
11875
+ "FW_MGMT_TARGET_SE03": 9,
11876
+ "FW_MGMT_TARGET_SE04": 10
11877
+ }
11878
+ },
11879
+ "DeviceFirmwareUpdateTaskStatus": {
11880
+ "values": {
11881
+ "FW_MGMT_UPDATER_TASK_STATUS_PENDING": 0,
11882
+ "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS": 1,
11883
+ "FW_MGMT_UPDATER_TASK_STATUS_FINISHED": 2,
11884
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND": 3,
11885
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ": 4,
11886
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE": 5,
11887
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY": 6,
11888
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL": 7,
11889
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT": 8,
11890
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY": 9,
11891
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS": 10
11892
+ }
11893
+ },
11894
+ "DeviceFirmwareTarget": {
11895
+ "fields": {
11896
+ "target_id": {
11897
+ "rule": "required",
11898
+ "type": "DeviceFirmwareTargetType",
11899
+ "id": 1
11900
+ },
11901
+ "path": {
11902
+ "rule": "required",
11903
+ "type": "string",
11904
+ "id": 2
11905
+ }
11906
+ }
11907
+ },
11908
+ "DeviceFirmwareUpdateRequest": {
11909
+ "fields": {
11910
+ "targets": {
11911
+ "rule": "repeated",
11912
+ "type": "DeviceFirmwareTarget",
11913
+ "id": 1
11914
+ }
11915
+ }
11916
+ },
11917
+ "DeviceFirmwareUpdateRecord": {
11918
+ "fields": {
11919
+ "target_id": {
11920
+ "rule": "required",
11921
+ "type": "DeviceFirmwareTargetType",
11922
+ "id": 1
11923
+ },
11924
+ "status": {
11925
+ "type": "DeviceFirmwareUpdateTaskStatus",
11926
+ "id": 10
11927
+ },
11928
+ "payload_version": {
11929
+ "type": "uint32",
11930
+ "id": 20
11931
+ },
11932
+ "path": {
11933
+ "type": "string",
11934
+ "id": 30
11935
+ }
11936
+ }
11937
+ },
11938
+ "DeviceFirmwareUpdateRecordFields": {
11939
+ "fields": {
11940
+ "status": {
11941
+ "type": "bool",
11942
+ "id": 10
11943
+ },
11944
+ "payload_version": {
11945
+ "type": "bool",
11946
+ "id": 20
11947
+ },
11948
+ "path": {
11949
+ "type": "bool",
11950
+ "id": 30
11951
+ }
11952
+ }
11953
+ },
11954
+ "DeviceFirmwareUpdateStatusGet": {
11955
+ "fields": {
11956
+ "fields": {
11957
+ "type": "DeviceFirmwareUpdateRecordFields",
11958
+ "id": 1
11959
+ }
11960
+ }
11961
+ },
11962
+ "DeviceFirmwareUpdateStatus": {
11605
11963
  "fields": {
11606
- "burn_in_test": {
11607
- "rule": "required",
11608
- "type": "bool",
11964
+ "records": {
11965
+ "rule": "repeated",
11966
+ "type": "DeviceFirmwareUpdateRecord",
11609
11967
  "id": 1
11610
11968
  }
11611
11969
  }
@@ -11760,10 +12118,6 @@
11760
12118
  "se4": {
11761
12119
  "type": "bool",
11762
12120
  "id": 430
11763
- },
11764
- "status": {
11765
- "type": "bool",
11766
- "id": 10000
11767
12121
  }
11768
12122
  }
11769
12123
  },
@@ -11833,13 +12187,19 @@
11833
12187
  "se4": {
11834
12188
  "type": "DeviceSEInfo",
11835
12189
  "id": 430
11836
- },
11837
- "status": {
11838
- "type": "DeviceStatus",
11839
- "id": 10000
11840
12190
  }
11841
12191
  }
11842
12192
  },
12193
+ "DeviceSessionErrorCode": {
12194
+ "values": {
12195
+ "DeviceSessionError_None": 0,
12196
+ "DeviceSessionError_UserCancelled": 1,
12197
+ "DeviceSessionError_InvalidSession": 2,
12198
+ "DeviceSessionError_AttachPinUnavailable": 3,
12199
+ "DeviceSessionError_PassphraseDisabled": 4,
12200
+ "DeviceSessionError_Busy": 5
12201
+ }
12202
+ },
11843
12203
  "DeviceSessionGet": {
11844
12204
  "fields": {
11845
12205
  "session_id": {
@@ -11860,6 +12220,39 @@
11860
12220
  }
11861
12221
  }
11862
12222
  },
12223
+ "DeviceSessionPinType": {
12224
+ "values": {
12225
+ "Any": 1,
12226
+ "Main": 2,
12227
+ "AttachToPin": 3
12228
+ }
12229
+ },
12230
+ "DeviceSessionAskPin": {
12231
+ "fields": {
12232
+ "type": {
12233
+ "type": "DeviceSessionPinType",
12234
+ "id": 1
12235
+ }
12236
+ }
12237
+ },
12238
+ "DeviceSessionAskPassphrase": {
12239
+ "fields": {
12240
+ "passphrase": {
12241
+ "type": "string",
12242
+ "id": 1
12243
+ },
12244
+ "on_device": {
12245
+ "rule": "required",
12246
+ "type": "bool",
12247
+ "id": 2
12248
+ }
12249
+ }
12250
+ },
12251
+ "DeviceSessionAskPin_FailureSubCodes": {
12252
+ "values": {
12253
+ "UserCancel": 1
12254
+ }
12255
+ },
11863
12256
  "DeviceStatus": {
11864
12257
  "fields": {
11865
12258
  "device_id": {
@@ -11892,6 +12285,9 @@
11892
12285
  }
11893
12286
  }
11894
12287
  },
12288
+ "DeviceStatusGet": {
12289
+ "fields": {}
12290
+ },
11895
12291
  "FilesystemPermissionFix": {
11896
12292
  "fields": {}
11897
12293
  },
@@ -12105,8 +12501,284 @@
12105
12501
  }
12106
12502
  },
12107
12503
  "FilesystemFormat": {
12504
+ "fields": {
12505
+ "data": {
12506
+ "rule": "required",
12507
+ "type": "bool",
12508
+ "id": 1
12509
+ },
12510
+ "user": {
12511
+ "rule": "required",
12512
+ "type": "bool",
12513
+ "id": 2
12514
+ }
12515
+ }
12516
+ },
12517
+ "InternalMyAddressRequest": {
12518
+ "fields": {
12519
+ "coin_type": {
12520
+ "rule": "required",
12521
+ "type": "uint32",
12522
+ "id": 1
12523
+ },
12524
+ "chain_id": {
12525
+ "rule": "required",
12526
+ "type": "uint32",
12527
+ "id": 2
12528
+ },
12529
+ "account_index": {
12530
+ "rule": "required",
12531
+ "type": "uint32",
12532
+ "id": 3
12533
+ },
12534
+ "derive_type": {
12535
+ "rule": "required",
12536
+ "type": "uint32",
12537
+ "id": 4
12538
+ }
12539
+ }
12540
+ },
12541
+ "OnboardingStep": {
12542
+ "values": {
12543
+ "ONBOARDING_STEP_UNKNOWN": 0,
12544
+ "ONBOARDING_STEP_CHECKING": 1,
12545
+ "ONBOARDING_STEP_PERSONALIZATION": 2,
12546
+ "ONBOARDING_STEP_PIN": 3,
12547
+ "ONBOARDING_STEP_SETUP": 4,
12548
+ "ONBOARDING_STEP_DONE": 5
12549
+ }
12550
+ },
12551
+ "OnboardingPhase": {
12552
+ "values": {
12553
+ "ONBOARDING_PHASE_UNKNOWN": 0,
12554
+ "ONBOARDING_PHASE_SAFETY_CHECK": 1,
12555
+ "ONBOARDING_PHASE_PIN_SETUP": 2,
12556
+ "ONBOARDING_PHASE_FINGERPRINT_SETUP": 3,
12557
+ "ONBOARDING_PHASE_SETUP_CHOICE": 4,
12558
+ "ONBOARDING_PHASE_WALLET_CREATE_START": 5,
12559
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW": 6,
12560
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM": 7,
12561
+ "ONBOARDING_PHASE_RESTORE_METHOD_CHOICE": 8,
12562
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE": 9,
12563
+ "ONBOARDING_PHASE_SEEDCARD_RESTORE": 10,
12564
+ "ONBOARDING_PHASE_WALLET_READY": 11,
12565
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT": 12,
12566
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP": 13
12567
+ }
12568
+ },
12569
+ "OnboardingSetupKind": {
12570
+ "values": {
12571
+ "ONBOARDING_SETUP_KIND_UNKNOWN": 0,
12572
+ "ONBOARDING_SETUP_KIND_CHOICE": 1,
12573
+ "ONBOARDING_SETUP_KIND_CREATE": 2,
12574
+ "ONBOARDING_SETUP_KIND_RESTORE": 3
12575
+ }
12576
+ },
12577
+ "OnboardingSetupMethod": {
12578
+ "values": {
12579
+ "ONBOARDING_SETUP_METHOD_UNKNOWN": 0,
12580
+ "ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE": 1,
12581
+ "ONBOARDING_SETUP_METHOD_SEEDCARD": 2
12582
+ }
12583
+ },
12584
+ "OnboardingSetupStatus": {
12585
+ "fields": {
12586
+ "kind": {
12587
+ "type": "OnboardingSetupKind",
12588
+ "id": 1
12589
+ },
12590
+ "method": {
12591
+ "type": "OnboardingSetupMethod",
12592
+ "id": 2
12593
+ }
12594
+ }
12595
+ },
12596
+ "OnboardingStatusGet": {
12597
+ "fields": {}
12598
+ },
12599
+ "OnboardingStatus": {
12600
+ "fields": {
12601
+ "step": {
12602
+ "type": "OnboardingStep",
12603
+ "id": 1
12604
+ },
12605
+ "phase": {
12606
+ "type": "OnboardingPhase",
12607
+ "id": 2
12608
+ },
12609
+ "setup": {
12610
+ "type": "OnboardingSetupStatus",
12611
+ "id": 3
12612
+ },
12613
+ "pin_set": {
12614
+ "type": "bool",
12615
+ "id": 4
12616
+ },
12617
+ "wallet_initialized": {
12618
+ "type": "bool",
12619
+ "id": 5
12620
+ }
12621
+ }
12622
+ },
12623
+ "PortfolioUpdate": {
12108
12624
  "fields": {}
12109
12625
  },
12626
+ "ViewAmount": {
12627
+ "fields": {
12628
+ "is_unlimited": {
12629
+ "rule": "required",
12630
+ "type": "bool",
12631
+ "id": 1
12632
+ },
12633
+ "num": {
12634
+ "rule": "required",
12635
+ "type": "string",
12636
+ "id": 2
12637
+ }
12638
+ }
12639
+ },
12640
+ "ViewDetail": {
12641
+ "fields": {
12642
+ "key": {
12643
+ "rule": "required",
12644
+ "type": "uint32",
12645
+ "id": 1
12646
+ },
12647
+ "value": {
12648
+ "rule": "required",
12649
+ "type": "string",
12650
+ "id": 2
12651
+ },
12652
+ "is_overview": {
12653
+ "rule": "required",
12654
+ "type": "bool",
12655
+ "id": 3
12656
+ },
12657
+ "has_icon": {
12658
+ "rule": "required",
12659
+ "type": "bool",
12660
+ "id": 4
12661
+ }
12662
+ }
12663
+ },
12664
+ "ViewTipType": {
12665
+ "values": {
12666
+ "Default": 0,
12667
+ "Highlight": 1,
12668
+ "Recommend": 2,
12669
+ "Warning": 3,
12670
+ "Danger": 4
12671
+ }
12672
+ },
12673
+ "ViewTip": {
12674
+ "fields": {
12675
+ "type": {
12676
+ "rule": "required",
12677
+ "type": "ViewTipType",
12678
+ "id": 1
12679
+ },
12680
+ "text": {
12681
+ "rule": "required",
12682
+ "type": "string",
12683
+ "id": 2
12684
+ }
12685
+ }
12686
+ },
12687
+ "ViewRawData": {
12688
+ "fields": {
12689
+ "initial_data": {
12690
+ "rule": "required",
12691
+ "type": "string",
12692
+ "id": 1
12693
+ },
12694
+ "placeholder": {
12695
+ "rule": "required",
12696
+ "type": "uint32",
12697
+ "id": 2
12698
+ }
12699
+ }
12700
+ },
12701
+ "ViewSignLayout": {
12702
+ "values": {
12703
+ "LayoutDefault": 0,
12704
+ "LayoutSafeTxCreate": 1,
12705
+ "LayoutFinalConfirm": 2,
12706
+ "Layout7702": 3,
12707
+ "LayoutFlat": 4,
12708
+ "LayoutEthApprove": 5
12709
+ }
12710
+ },
12711
+ "ViewSignPage": {
12712
+ "fields": {
12713
+ "title": {
12714
+ "rule": "required",
12715
+ "type": "string",
12716
+ "id": 1
12717
+ },
12718
+ "amount": {
12719
+ "type": "ViewAmount",
12720
+ "id": 2
12721
+ },
12722
+ "general": {
12723
+ "rule": "repeated",
12724
+ "type": "ViewDetail",
12725
+ "id": 3
12726
+ },
12727
+ "tip": {
12728
+ "type": "ViewTip",
12729
+ "id": 4
12730
+ },
12731
+ "raw_data": {
12732
+ "type": "ViewRawData",
12733
+ "id": 5
12734
+ },
12735
+ "slide_to_confirm": {
12736
+ "type": "bool",
12737
+ "id": 6,
12738
+ "options": {
12739
+ "default": true
12740
+ }
12741
+ },
12742
+ "layout": {
12743
+ "type": "ViewSignLayout",
12744
+ "id": 7,
12745
+ "options": {
12746
+ "default": "LayoutDefault"
12747
+ }
12748
+ }
12749
+ }
12750
+ },
12751
+ "ViewVerifyPage": {
12752
+ "fields": {
12753
+ "title": {
12754
+ "rule": "required",
12755
+ "type": "string",
12756
+ "id": 1
12757
+ },
12758
+ "address": {
12759
+ "rule": "required",
12760
+ "type": "string",
12761
+ "id": 2
12762
+ },
12763
+ "path": {
12764
+ "rule": "required",
12765
+ "type": "string",
12766
+ "id": 3
12767
+ },
12768
+ "network": {
12769
+ "type": "string",
12770
+ "id": 4
12771
+ },
12772
+ "derive_type": {
12773
+ "type": "string",
12774
+ "id": 5
12775
+ },
12776
+ "value_key": {
12777
+ "type": "uint32",
12778
+ "id": 6
12779
+ }
12780
+ }
12781
+ },
12110
12782
  "google": {
12111
12783
  "nested": {
12112
12784
  "protobuf": {