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

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 (742) 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-lifecycle-events.test.ts +249 -0
  12. package/__tests__/device-pool-state.test.ts +144 -0
  13. package/__tests__/device-settings.test.ts +416 -0
  14. package/__tests__/device-state-contract.test.ts +27 -0
  15. package/__tests__/device-state-events.test.ts +286 -0
  16. package/__tests__/device-state-mapper.test.ts +261 -0
  17. package/__tests__/device-state-projector.test.ts +94 -0
  18. package/__tests__/device-state-store.test.ts +82 -0
  19. package/__tests__/device-utils.test.ts +107 -0
  20. package/__tests__/device-wallet-session-store.test.ts +478 -0
  21. package/__tests__/deviceFeaturesUtils.test.ts +39 -0
  22. package/__tests__/deviceSettings.test.ts +103 -0
  23. package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
  24. package/__tests__/evmSignTransaction.test.ts +69 -0
  25. package/__tests__/evmSignTypedData.test.ts +80 -0
  26. package/__tests__/filesystemValidation.test.ts +53 -0
  27. package/__tests__/firmware-update/check-all-firmware-release.test.ts +175 -0
  28. package/__tests__/firmware-update/firmware-artifact-source.test.ts +119 -0
  29. package/__tests__/firmware-update/firmware-host-binding.test.ts +70 -0
  30. package/__tests__/firmware-update/firmware-preparation-error.test.ts +27 -0
  31. package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
  32. package/__tests__/firmware-update/firmware-update-plan.test.ts +593 -0
  33. package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +213 -0
  34. package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +430 -0
  35. package/__tests__/firmware-update/firmware-update-v3-reconnect.test.ts +58 -0
  36. package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
  37. package/__tests__/get-device-state.test.ts +458 -0
  38. package/__tests__/homescreen.test.ts +24 -0
  39. package/__tests__/kaspa-public-types.type-test.ts +16 -0
  40. package/__tests__/kaspa-use-tweak-pro2.test.ts +20 -0
  41. package/__tests__/kaspaSignTransaction.test.ts +601 -0
  42. package/__tests__/known-device-public-types.type-test.ts +3 -0
  43. package/__tests__/logBlockEvent.test.ts +128 -1
  44. package/__tests__/method-protocol-support.test.ts +113 -0
  45. package/__tests__/networkUtils.test.ts +406 -0
  46. package/__tests__/open-wallet-session-error-response.test.ts +43 -0
  47. package/__tests__/open-wallet-session.test.ts +1368 -0
  48. package/__tests__/pro2Wallpaper.test.ts +39 -0
  49. package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
  50. package/__tests__/protocol-v2-firmware-targets.test.ts +37 -0
  51. package/__tests__/protocol-v2-ping.test.ts +28 -0
  52. package/__tests__/protocol-v2-unlock-policy.test.ts +45 -0
  53. package/__tests__/protocol-v2.test.ts +6082 -2422
  54. package/__tests__/protocolV2FileWrite.test.ts +92 -0
  55. package/__tests__/protocolV2UiInteraction.test.ts +266 -0
  56. package/__tests__/public-device-state-api.test.ts +275 -0
  57. package/__tests__/public-pro2-api-boundary.test.ts +106 -0
  58. package/__tests__/refresh-device-state.test.ts +101 -0
  59. package/__tests__/request-context-logging.test.ts +16 -0
  60. package/__tests__/search-devices.test.ts +136 -0
  61. package/__tests__/tron-sign-message-init.test.ts +74 -0
  62. package/dist/api/BaseMethod.d.ts +14 -1
  63. package/dist/api/BaseMethod.d.ts.map +1 -1
  64. package/dist/api/CheckAllFirmwareRelease.d.ts +24 -1
  65. package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
  66. package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
  67. package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
  68. package/dist/api/CipherKeyValue.d.ts +1 -0
  69. package/dist/api/CipherKeyValue.d.ts.map +1 -1
  70. package/dist/api/ClearSessionCache.d.ts +9 -0
  71. package/dist/api/ClearSessionCache.d.ts.map +1 -0
  72. package/dist/api/DirList.d.ts +1 -0
  73. package/dist/api/DirList.d.ts.map +1 -1
  74. package/dist/api/DirMake.d.ts +1 -0
  75. package/dist/api/DirMake.d.ts.map +1 -1
  76. package/dist/api/DirRemove.d.ts +1 -0
  77. package/dist/api/DirRemove.d.ts.map +1 -1
  78. package/dist/api/FileDelete.d.ts +1 -0
  79. package/dist/api/FileDelete.d.ts.map +1 -1
  80. package/dist/api/FileRead.d.ts +1 -0
  81. package/dist/api/FileRead.d.ts.map +1 -1
  82. package/dist/api/FileWrite.d.ts +2 -0
  83. package/dist/api/FileWrite.d.ts.map +1 -1
  84. package/dist/api/FirmwareUpdate.d.ts.map +1 -1
  85. package/dist/api/FirmwareUpdateV2.d.ts +13 -2
  86. package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
  87. package/dist/api/FirmwareUpdateV3.d.ts +7 -3
  88. package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
  89. package/dist/api/FirmwareUpdateV4.d.ts +42 -16
  90. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  91. package/dist/api/GetDeviceState.d.ts +8 -0
  92. package/dist/api/GetDeviceState.d.ts.map +1 -0
  93. package/dist/api/GetFeatures.d.ts +1 -1
  94. package/dist/api/GetFeatures.d.ts.map +1 -1
  95. package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
  96. package/dist/api/GetPassphraseState.d.ts +2 -6
  97. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  98. package/dist/api/OpenWalletSession.d.ts +8 -0
  99. package/dist/api/OpenWalletSession.d.ts.map +1 -0
  100. package/dist/api/PathInfo.d.ts +1 -0
  101. package/dist/api/PathInfo.d.ts.map +1 -1
  102. package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
  103. package/dist/api/SearchDevices.d.ts +3 -0
  104. package/dist/api/SearchDevices.d.ts.map +1 -1
  105. package/dist/api/UploadPortfolio.d.ts +17 -0
  106. package/dist/api/UploadPortfolio.d.ts.map +1 -0
  107. package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
  108. package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
  109. package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
  110. package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
  111. package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
  112. package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
  113. package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
  114. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
  115. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
  116. package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
  117. package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
  118. package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
  119. package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
  120. package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
  121. package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
  122. package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
  123. package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
  124. package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
  125. package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
  126. package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
  127. package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
  128. package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
  129. package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
  130. package/dist/api/btc/BTCGetAddress.d.ts +1 -0
  131. package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
  132. package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
  133. package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
  134. package/dist/api/btc/BTCSignMessage.d.ts +1 -0
  135. package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
  136. package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
  137. package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
  138. package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
  139. package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
  140. package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
  141. package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
  142. package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
  143. package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
  144. package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
  145. package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
  146. package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
  147. package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
  148. package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
  149. package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
  150. package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
  151. package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
  152. package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -0
  153. package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
  154. package/dist/api/conflux/ConfluxSignMessage.d.ts +2 -0
  155. package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
  156. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +2 -0
  157. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
  158. package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -0
  159. package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
  160. package/dist/api/cosmos/CosmosGetAddress.d.ts +1 -0
  161. package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
  162. package/dist/api/cosmos/CosmosGetPublicKey.d.ts +1 -0
  163. package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
  164. package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -0
  165. package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
  166. package/dist/api/device/DeviceCancel.d.ts +1 -0
  167. package/dist/api/device/DeviceCancel.d.ts.map +1 -1
  168. package/dist/api/device/DeviceChangePin.d.ts +1 -0
  169. package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
  170. package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -2
  171. package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
  172. package/dist/api/device/DeviceLock.d.ts +1 -0
  173. package/dist/api/device/DeviceLock.d.ts.map +1 -1
  174. package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -0
  175. package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
  176. package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -0
  177. package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
  178. package/dist/api/device/DeviceSettings.d.ts +1 -0
  179. package/dist/api/device/DeviceSettings.d.ts.map +1 -1
  180. package/dist/api/device/DeviceSupportFeatures.d.ts +1 -0
  181. package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
  182. package/dist/api/device/DeviceUnlock.d.ts +1 -0
  183. package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
  184. package/dist/api/device/DeviceUpdateBootloader.d.ts +5 -1
  185. package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
  186. package/dist/api/device/DeviceWipe.d.ts +1 -0
  187. package/dist/api/device/DeviceWipe.d.ts.map +1 -1
  188. package/dist/api/device/PreInitialize.d.ts +1 -0
  189. package/dist/api/device/PreInitialize.d.ts.map +1 -1
  190. package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
  191. package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
  192. package/dist/api/evm/EVMGetAddress.d.ts +1 -0
  193. package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
  194. package/dist/api/evm/EVMGetPublicKey.d.ts +1 -0
  195. package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
  196. package/dist/api/evm/EVMSignMessage.d.ts +1 -0
  197. package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
  198. package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
  199. package/dist/api/evm/EVMSignTransaction.d.ts +1 -0
  200. package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
  201. package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
  202. package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
  203. package/dist/api/evm/EVMVerifyMessage.d.ts +1 -0
  204. package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
  205. package/dist/api/evm/protocol.d.ts +3 -0
  206. package/dist/api/evm/protocol.d.ts.map +1 -0
  207. package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
  208. package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
  209. package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
  210. package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
  211. package/dist/api/firmware/FirmwareArtifactSource.d.ts +25 -0
  212. package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +1 -0
  213. package/dist/api/firmware/FirmwareHostBinding.d.ts +6 -0
  214. package/dist/api/firmware/FirmwareHostBinding.d.ts.map +1 -0
  215. package/dist/api/firmware/FirmwarePreparationError.d.ts +3 -0
  216. package/dist/api/firmware/FirmwarePreparationError.d.ts.map +1 -0
  217. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +8 -0
  218. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
  219. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +3 -0
  220. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +1 -0
  221. package/dist/api/firmware/FirmwareUpdatePlan.d.ts +25 -0
  222. package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -0
  223. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +30 -0
  224. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
  225. package/dist/api/firmware/getBinary.d.ts +15 -4
  226. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  227. package/dist/api/firmware/progressThrottle.d.ts +3 -0
  228. package/dist/api/firmware/progressThrottle.d.ts.map +1 -0
  229. package/dist/api/firmware/updateBootloader.d.ts +2 -0
  230. package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
  231. package/dist/api/firmware/uploadFirmware.d.ts +9 -1
  232. package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
  233. package/dist/api/helpers/filesystemValidation.d.ts +3 -0
  234. package/dist/api/helpers/filesystemValidation.d.ts.map +1 -1
  235. package/dist/api/helpers/paramsValidator.d.ts +1 -0
  236. package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
  237. package/dist/api/helpers/protocolV2FileWrite.d.ts +33 -0
  238. package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
  239. package/dist/api/index.d.ts +7 -25
  240. package/dist/api/index.d.ts.map +1 -1
  241. package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -0
  242. package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
  243. package/dist/api/kaspa/KaspaSignTransaction.d.ts +9 -1
  244. package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
  245. package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
  246. package/dist/api/lightning/LnurlAuth.d.ts +0 -4
  247. package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
  248. package/dist/api/near/NearGetAddress.d.ts +1 -0
  249. package/dist/api/near/NearGetAddress.d.ts.map +1 -1
  250. package/dist/api/near/NearSignTransaction.d.ts +1 -0
  251. package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
  252. package/dist/api/nem/NEMGetAddress.d.ts +1 -0
  253. package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
  254. package/dist/api/nem/NEMSignTransaction.d.ts +1 -0
  255. package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
  256. package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
  257. package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
  258. package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
  259. package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
  260. package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
  261. package/dist/api/nexa/NexaSignTransaction.d.ts +1 -0
  262. package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
  263. package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -0
  264. package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
  265. package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -0
  266. package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
  267. package/dist/api/nostr/NostrGetPublicKey.d.ts +1 -0
  268. package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
  269. package/dist/api/nostr/NostrSignEvent.d.ts +1 -0
  270. package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
  271. package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -0
  272. package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
  273. package/dist/api/polkadot/PolkadotGetAddress.d.ts +1 -0
  274. package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
  275. package/dist/api/polkadot/PolkadotSignTransaction.d.ts +1 -0
  276. package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -1
  277. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +1 -0
  278. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
  279. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +1 -0
  280. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
  281. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -0
  282. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
  283. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +4 -2
  284. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
  285. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +7 -0
  286. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
  287. package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -1
  288. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
  289. package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
  290. package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
  291. package/dist/api/protocol-v2/DeviceStatusGet.d.ts +7 -0
  292. package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
  293. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +27 -0
  294. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
  295. package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
  296. package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
  297. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +1 -0
  298. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
  299. package/dist/api/protocol-v2/Ping.d.ts +3 -0
  300. package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
  301. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
  302. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
  303. package/dist/api/protocol-v2/helpers.d.ts +4 -1
  304. package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
  305. package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
  306. package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
  307. package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
  308. package/dist/api/solana/SolGetAddress.d.ts +1 -0
  309. package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
  310. package/dist/api/solana/SolSignMessage.d.ts +1 -0
  311. package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
  312. package/dist/api/solana/SolSignOffchainMessage.d.ts +1 -0
  313. package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
  314. package/dist/api/solana/SolSignTransaction.d.ts +1 -0
  315. package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
  316. package/dist/api/starcoin/StarcoinGetAddress.d.ts +1 -0
  317. package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
  318. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +1 -0
  319. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
  320. package/dist/api/starcoin/StarcoinSignMessage.d.ts +1 -0
  321. package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
  322. package/dist/api/starcoin/StarcoinSignTransaction.d.ts +1 -0
  323. package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
  324. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +1 -0
  325. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
  326. package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
  327. package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
  328. package/dist/api/stellar/StellarSignTransaction.d.ts +2 -3
  329. package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
  330. package/dist/api/sui/SuiGetAddress.d.ts +1 -0
  331. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  332. package/dist/api/sui/SuiGetPublicKey.d.ts +1 -0
  333. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  334. package/dist/api/sui/SuiSignMessage.d.ts +1 -0
  335. package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
  336. package/dist/api/sui/SuiSignTransaction.d.ts +1 -0
  337. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  338. package/dist/api/ton/TonGetAddress.d.ts +1 -0
  339. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  340. package/dist/api/ton/TonSignData.d.ts +1 -0
  341. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  342. package/dist/api/ton/TonSignMessage.d.ts +1 -0
  343. package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
  344. package/dist/api/ton/TonSignProof.d.ts +1 -0
  345. package/dist/api/ton/TonSignProof.d.ts.map +1 -1
  346. package/dist/api/tron/TronGetAddress.d.ts +1 -0
  347. package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
  348. package/dist/api/tron/TronSignMessage.d.ts +5 -0
  349. package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
  350. package/dist/api/tron/TronSignTransaction.d.ts +1 -0
  351. package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
  352. package/dist/api/utils.d.ts +2 -1
  353. package/dist/api/utils.d.ts.map +1 -1
  354. package/dist/api/xrp/XrpGetAddress.d.ts +1 -0
  355. package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
  356. package/dist/api/xrp/XrpSignTransaction.d.ts +1 -0
  357. package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -1
  358. package/dist/constants/index.d.ts +1 -1
  359. package/dist/constants/index.d.ts.map +1 -1
  360. package/dist/core/RequestQueue.d.ts.map +1 -1
  361. package/dist/core/deviceEventRegistration.d.ts +11 -0
  362. package/dist/core/deviceEventRegistration.d.ts.map +1 -0
  363. package/dist/core/index.d.ts +3 -1
  364. package/dist/core/index.d.ts.map +1 -1
  365. package/dist/data-manager/DataManager.d.ts +1 -0
  366. package/dist/data-manager/DataManager.d.ts.map +1 -1
  367. package/dist/data-manager/connectSettings.d.ts.map +1 -1
  368. package/dist/device/Device.d.ts +44 -14
  369. package/dist/device/Device.d.ts.map +1 -1
  370. package/dist/device/DeviceCommands.d.ts +8 -6
  371. package/dist/device/DeviceCommands.d.ts.map +1 -1
  372. package/dist/device/DeviceConnector.d.ts +1 -1
  373. package/dist/device/DeviceConnector.d.ts.map +1 -1
  374. package/dist/device/DeviceFeaturesState.d.ts +3 -0
  375. package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
  376. package/dist/device/DevicePool.d.ts +5 -2
  377. package/dist/device/DevicePool.d.ts.map +1 -1
  378. package/dist/device/DeviceStateMapper.d.ts +13 -0
  379. package/dist/device/DeviceStateMapper.d.ts.map +1 -0
  380. package/dist/device/DeviceStateProjector.d.ts +7 -0
  381. package/dist/device/DeviceStateProjector.d.ts.map +1 -0
  382. package/dist/device/DeviceStateStore.d.ts +21 -0
  383. package/dist/device/DeviceStateStore.d.ts.map +1 -0
  384. package/dist/device/DeviceWalletSessionStore.d.ts +27 -0
  385. package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
  386. package/dist/device/cloneDeviceState.d.ts +2 -0
  387. package/dist/device/cloneDeviceState.d.ts.map +1 -0
  388. package/dist/device/deviceIdentity.d.ts +5 -0
  389. package/dist/device/deviceIdentity.d.ts.map +1 -0
  390. package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
  391. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
  392. package/dist/deviceProfile/index.d.ts +0 -1
  393. package/dist/deviceProfile/index.d.ts.map +1 -1
  394. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts +7 -0
  395. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts.map +1 -0
  396. package/dist/events/device.d.ts +12 -2
  397. package/dist/events/device.d.ts.map +1 -1
  398. package/dist/events/logBlockEvent.d.ts +2 -0
  399. package/dist/events/logBlockEvent.d.ts.map +1 -1
  400. package/dist/events/ui-request.d.ts +19 -2
  401. package/dist/events/ui-request.d.ts.map +1 -1
  402. package/dist/index.d.ts +1559 -736
  403. package/dist/index.d.ts.map +1 -1
  404. package/dist/index.js +9238 -3898
  405. package/dist/inject.d.ts.map +1 -1
  406. package/dist/lowLevelInject.d.ts.map +1 -1
  407. package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
  408. package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
  409. package/dist/protocols/protocol-v2/features.d.ts +25 -17
  410. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  411. package/dist/protocols/protocol-v2/firmware.d.ts +1 -0
  412. package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
  413. package/dist/protocols/protocol-v2/index.d.ts +3 -2
  414. package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
  415. package/dist/protocols/protocol-v2/lockedError.d.ts +2 -0
  416. package/dist/protocols/protocol-v2/lockedError.d.ts.map +1 -0
  417. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +17 -0
  418. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
  419. package/dist/protocols/protocol-v2/uiInteraction.d.ts +39 -0
  420. package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
  421. package/dist/protocols/protocol-v2/unlockPolicy.d.ts +4 -0
  422. package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -0
  423. package/dist/protocols/protocol-v2/unlockRetry.d.ts +10 -0
  424. package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -0
  425. package/dist/protocols/protocol-v2/walletSession.d.ts +22 -0
  426. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
  427. package/dist/topLevelInject.d.ts.map +1 -1
  428. package/dist/types/api/checkAllFirmwareRelease.d.ts +29 -4
  429. package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
  430. package/dist/types/api/deviceSettings.d.ts +11 -2
  431. package/dist/types/api/deviceSettings.d.ts.map +1 -1
  432. package/dist/types/api/deviceUnlock.d.ts +1 -1
  433. package/dist/types/api/deviceUnlock.d.ts.map +1 -1
  434. package/dist/types/api/deviceUpdateBootloader.d.ts +6 -0
  435. package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
  436. package/dist/types/api/export.d.ts +6 -2
  437. package/dist/types/api/export.d.ts.map +1 -1
  438. package/dist/types/api/firmwareUpdate.d.ts +75 -1
  439. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  440. package/dist/types/api/firmwareUpdateCapabilities.d.ts +9 -0
  441. package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +1 -0
  442. package/dist/types/api/firmwareUpdatePlan.d.ts +28 -0
  443. package/dist/types/api/firmwareUpdatePlan.d.ts.map +1 -0
  444. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +42 -0
  445. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +1 -0
  446. package/dist/types/api/getDeviceState.d.ts +12 -0
  447. package/dist/types/api/getDeviceState.d.ts.map +1 -0
  448. package/dist/types/api/getFeatures.d.ts.map +1 -1
  449. package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
  450. package/dist/types/api/getPassphraseState.d.ts +2 -10
  451. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  452. package/dist/types/api/index.d.ts +27 -31
  453. package/dist/types/api/index.d.ts.map +1 -1
  454. package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
  455. package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
  456. package/dist/types/api/openWalletSession.d.ts +35 -0
  457. package/dist/types/api/openWalletSession.d.ts.map +1 -0
  458. package/dist/types/api/protocolV2.d.ts +15 -84
  459. package/dist/types/api/protocolV2.d.ts.map +1 -1
  460. package/dist/types/api/sessionCache.d.ts +13 -0
  461. package/dist/types/api/sessionCache.d.ts.map +1 -0
  462. package/dist/types/device.d.ts +132 -8
  463. package/dist/types/device.d.ts.map +1 -1
  464. package/dist/types/params.d.ts.map +1 -1
  465. package/dist/types/settings.d.ts +20 -14
  466. package/dist/types/settings.d.ts.map +1 -1
  467. package/dist/utils/assets.d.ts +2 -1
  468. package/dist/utils/assets.d.ts.map +1 -1
  469. package/dist/utils/deviceFeaturesCompat.d.ts +13 -0
  470. package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
  471. package/dist/utils/deviceFeaturesUtils.d.ts +6 -3
  472. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  473. package/dist/utils/deviceInfoUtils.d.ts +9 -9
  474. package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
  475. package/dist/utils/deviceSettings.d.ts +38 -7
  476. package/dist/utils/deviceSettings.d.ts.map +1 -1
  477. package/dist/utils/deviceVersionUtils.d.ts +7 -5
  478. package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
  479. package/dist/utils/homescreen.d.ts.map +1 -1
  480. package/dist/utils/index.d.ts +5 -2
  481. package/dist/utils/index.d.ts.map +1 -1
  482. package/dist/utils/networkUtils.d.ts +10 -1
  483. package/dist/utils/networkUtils.d.ts.map +1 -1
  484. package/dist/utils/patch.d.ts +1 -1
  485. package/dist/utils/patch.d.ts.map +1 -1
  486. package/dist/utils/pro2Wallpaper.d.ts +12 -0
  487. package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
  488. package/dist/utils/tracing.d.ts.map +1 -1
  489. package/package.json +4 -4
  490. package/src/api/BaseMethod.ts +52 -17
  491. package/src/api/CheckAllFirmwareRelease.ts +344 -4
  492. package/src/api/CheckBootloaderRelease.ts +1 -2
  493. package/src/api/CheckFirmwareRelease.ts +1 -2
  494. package/src/api/CipherKeyValue.ts +4 -0
  495. package/src/api/ClearSessionCache.ts +32 -0
  496. package/src/api/DirList.ts +9 -4
  497. package/src/api/DirMake.ts +7 -4
  498. package/src/api/DirRemove.ts +7 -4
  499. package/src/api/FileDelete.ts +7 -4
  500. package/src/api/FileRead.ts +15 -9
  501. package/src/api/FileWrite.ts +26 -181
  502. package/src/api/FirmwareUpdate.ts +11 -12
  503. package/src/api/FirmwareUpdateV2.ts +370 -112
  504. package/src/api/FirmwareUpdateV3.ts +266 -68
  505. package/src/api/FirmwareUpdateV4.ts +1276 -651
  506. package/src/api/GetDeviceState.ts +59 -0
  507. package/src/api/GetFeatures.ts +6 -4
  508. package/src/api/GetOnekeyFeatures.ts +1 -75
  509. package/src/api/GetPassphraseState.ts +30 -21
  510. package/src/api/OpenWalletSession.ts +214 -0
  511. package/src/api/PathInfo.ts +9 -4
  512. package/src/api/PromptWebDeviceAccess.ts +2 -7
  513. package/src/api/SearchDevices.ts +29 -4
  514. package/src/api/UploadPortfolio.ts +40 -0
  515. package/src/api/alephium/AlephiumGetAddress.ts +0 -4
  516. package/src/api/alephium/AlephiumSignMessage.ts +0 -4
  517. package/src/api/alephium/AlephiumSignTransaction.ts +2 -6
  518. package/src/api/algo/AlgoGetAddress.ts +4 -0
  519. package/src/api/algo/AlgoSignTransaction.ts +4 -0
  520. package/src/api/allnetwork/AllNetworkGetAddressBase.ts +9 -21
  521. package/src/api/aptos/AptosGetAddress.ts +4 -0
  522. package/src/api/aptos/AptosGetPublicKey.ts +4 -0
  523. package/src/api/aptos/AptosSignInMessage.ts +4 -0
  524. package/src/api/aptos/AptosSignMessage.ts +4 -0
  525. package/src/api/aptos/AptosSignTransaction.ts +4 -0
  526. package/src/api/benfen/BenfenGetAddress.ts +11 -7
  527. package/src/api/benfen/BenfenGetPublicKey.ts +0 -4
  528. package/src/api/benfen/BenfenSignMessage.ts +0 -4
  529. package/src/api/benfen/BenfenSignTransaction.ts +0 -4
  530. package/src/api/btc/BTCGetAddress.ts +8 -1
  531. package/src/api/btc/BTCGetPublicKey.ts +9 -2
  532. package/src/api/btc/BTCSignMessage.ts +8 -1
  533. package/src/api/btc/BTCSignPsbt.ts +4 -0
  534. package/src/api/btc/BTCSignTransaction.ts +8 -1
  535. package/src/api/btc/BTCVerifyMessage.ts +8 -1
  536. package/src/api/btc/helpers/versionLimit.ts +7 -4
  537. package/src/api/cardano/CardanoGetAddress.ts +4 -0
  538. package/src/api/cardano/CardanoGetPublicKey.ts +4 -0
  539. package/src/api/cardano/CardanoSignMessage.ts +5 -1
  540. package/src/api/cardano/CardanoSignTransaction.ts +5 -1
  541. package/src/api/conflux/ConfluxGetAddress.ts +6 -0
  542. package/src/api/conflux/ConfluxSignMessage.ts +6 -0
  543. package/src/api/conflux/ConfluxSignMessageCIP23.ts +6 -0
  544. package/src/api/conflux/ConfluxSignTransaction.ts +8 -5
  545. package/src/api/cosmos/CosmosGetAddress.ts +4 -0
  546. package/src/api/cosmos/CosmosGetPublicKey.ts +4 -0
  547. package/src/api/cosmos/CosmosSignTransaction.ts +4 -0
  548. package/src/api/device/DeviceCancel.ts +5 -0
  549. package/src/api/device/DeviceChangePin.ts +28 -0
  550. package/src/api/device/DeviceFullyUploadResource.ts +4 -5
  551. package/src/api/device/DeviceLock.ts +5 -0
  552. package/src/api/device/DeviceRebootToBoardloader.ts +5 -0
  553. package/src/api/device/DeviceRebootToBootloader.ts +5 -0
  554. package/src/api/device/DeviceSettings.ts +194 -1
  555. package/src/api/device/DeviceSupportFeatures.ts +4 -0
  556. package/src/api/device/DeviceUnlock.ts +13 -0
  557. package/src/api/device/DeviceUpdateBootloader.ts +123 -8
  558. package/src/api/device/DeviceWipe.ts +25 -0
  559. package/src/api/device/PreInitialize.ts +4 -0
  560. package/src/api/dynex/DnxGetAddress.ts +0 -6
  561. package/src/api/dynex/DnxSignTransaction.ts +0 -6
  562. package/src/api/evm/EVMGetAddress.ts +6 -2
  563. package/src/api/evm/EVMGetPublicKey.ts +6 -2
  564. package/src/api/evm/EVMSignMessage.ts +6 -2
  565. package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
  566. package/src/api/evm/EVMSignTransaction.ts +6 -2
  567. package/src/api/evm/EVMSignTypedData.ts +42 -50
  568. package/src/api/evm/EVMVerifyMessage.ts +6 -2
  569. package/src/api/evm/legacyV1/getAddress.ts +2 -2
  570. package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
  571. package/src/api/evm/legacyV1/signMessage.ts +2 -2
  572. package/src/api/evm/legacyV1/signTypedData.ts +2 -2
  573. package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
  574. package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
  575. package/src/api/evm/protocol.ts +6 -0
  576. package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
  577. package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
  578. package/src/api/firmware/FirmwareArtifactSource.ts +278 -0
  579. package/src/api/firmware/FirmwareHostBinding.ts +100 -0
  580. package/src/api/firmware/FirmwarePreparationError.ts +12 -0
  581. package/src/api/firmware/FirmwareUpdateBaseMethod.ts +60 -3
  582. package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
  583. package/src/api/firmware/FirmwareUpdatePlan.ts +745 -0
  584. package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +392 -0
  585. package/src/api/firmware/getBinary.ts +8 -3
  586. package/src/api/firmware/progressThrottle.ts +44 -0
  587. package/src/api/firmware/updateBootloader.ts +19 -4
  588. package/src/api/firmware/uploadFirmware.ts +140 -22
  589. package/src/api/helpers/batchGetPublickeys.ts +2 -2
  590. package/src/api/helpers/filesystemValidation.ts +61 -0
  591. package/src/api/helpers/paramsValidator.ts +1 -1
  592. package/src/api/helpers/protocolV2FileWrite.ts +199 -0
  593. package/src/api/index.ts +8 -26
  594. package/src/api/kaspa/KaspaGetAddress.ts +7 -0
  595. package/src/api/kaspa/KaspaSignTransaction.ts +380 -29
  596. package/src/api/kaspa/helpers/TransferSerialize.ts +17 -7
  597. package/src/api/lightning/LnurlAuth.ts +0 -4
  598. package/src/api/near/NearGetAddress.ts +4 -0
  599. package/src/api/near/NearSignTransaction.ts +4 -0
  600. package/src/api/nem/NEMGetAddress.ts +4 -0
  601. package/src/api/nem/NEMSignTransaction.ts +4 -0
  602. package/src/api/neo/NeoGetAddress.ts +0 -4
  603. package/src/api/neo/NeoSignTransaction.ts +0 -4
  604. package/src/api/nervos/NervosGetAddress.ts +0 -4
  605. package/src/api/nervos/NervosSignTransaction.ts +2 -6
  606. package/src/api/nexa/NexaGetAddress.ts +0 -4
  607. package/src/api/nexa/NexaSignTransaction.ts +3 -5
  608. package/src/api/nostr/NostrDecryptMessage.ts +4 -0
  609. package/src/api/nostr/NostrEncryptMessage.ts +4 -0
  610. package/src/api/nostr/NostrGetPublicKey.ts +4 -0
  611. package/src/api/nostr/NostrSignEvent.ts +4 -0
  612. package/src/api/nostr/NostrSignSchnorr.ts +4 -0
  613. package/src/api/polkadot/PolkadotGetAddress.ts +4 -0
  614. package/src/api/polkadot/PolkadotSignTransaction.ts +4 -0
  615. package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +5 -2
  616. package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +5 -2
  617. package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +8 -5
  618. package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +43 -5
  619. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +21 -0
  620. package/src/api/protocol-v2/DeviceInfoGet.ts +8 -15
  621. package/src/api/protocol-v2/DeviceReboot.ts +7 -3
  622. package/src/api/protocol-v2/DeviceStatusGet.ts +19 -0
  623. package/src/api/protocol-v2/DeviceUploadWallpaper.ts +134 -0
  624. package/src/api/protocol-v2/FilesystemFormat.ts +9 -3
  625. package/src/api/protocol-v2/FilesystemPermissionFix.ts +5 -2
  626. package/src/api/protocol-v2/Ping.ts +37 -3
  627. package/src/api/protocol-v2/ProtocolInfoRequest.ts +5 -2
  628. package/src/api/protocol-v2/helpers.ts +21 -16
  629. package/src/api/scdo/ScdoGetAddress.ts +0 -4
  630. package/src/api/scdo/ScdoSignMessage.ts +0 -4
  631. package/src/api/scdo/ScdoSignTransaction.ts +0 -4
  632. package/src/api/solana/SolGetAddress.ts +4 -0
  633. package/src/api/solana/SolSignMessage.ts +4 -0
  634. package/src/api/solana/SolSignOffchainMessage.ts +4 -0
  635. package/src/api/solana/SolSignTransaction.ts +4 -0
  636. package/src/api/starcoin/StarcoinGetAddress.ts +4 -0
  637. package/src/api/starcoin/StarcoinGetPublicKey.ts +4 -0
  638. package/src/api/starcoin/StarcoinSignMessage.ts +4 -0
  639. package/src/api/starcoin/StarcoinSignTransaction.ts +4 -0
  640. package/src/api/starcoin/StarcoinVerifyMessage.ts +4 -0
  641. package/src/api/stellar/StellarGetAddress.ts +1 -10
  642. package/src/api/stellar/StellarSignTransaction.ts +1 -14
  643. package/src/api/sui/SuiGetAddress.ts +4 -0
  644. package/src/api/sui/SuiGetPublicKey.ts +4 -0
  645. package/src/api/sui/SuiSignMessage.ts +4 -0
  646. package/src/api/sui/SuiSignTransaction.ts +4 -0
  647. package/src/api/ton/TonGetAddress.ts +4 -0
  648. package/src/api/ton/TonSignData.ts +5 -1
  649. package/src/api/ton/TonSignMessage.ts +4 -0
  650. package/src/api/ton/TonSignProof.ts +4 -0
  651. package/src/api/tron/TronGetAddress.ts +4 -0
  652. package/src/api/tron/TronSignMessage.ts +18 -7
  653. package/src/api/tron/TronSignTransaction.ts +4 -0
  654. package/src/api/utils.ts +7 -3
  655. package/src/api/xrp/XrpGetAddress.ts +4 -0
  656. package/src/api/xrp/XrpSignTransaction.ts +5 -1
  657. package/src/constants/index.ts +1 -4
  658. package/src/core/RequestQueue.ts +1 -0
  659. package/src/core/deviceEventRegistration.ts +23 -0
  660. package/src/core/index.ts +164 -53
  661. package/src/data/messages/messages-protocol-v2.json +1155 -481
  662. package/src/data/messages/messages.json +286 -1
  663. package/src/data-manager/DataManager.ts +39 -39
  664. package/src/data-manager/TransportManager.ts +1 -1
  665. package/src/data-manager/connectSettings.ts +15 -0
  666. package/src/device/Device.ts +647 -281
  667. package/src/device/DeviceCommands.ts +166 -158
  668. package/src/device/DeviceConnector.ts +10 -7
  669. package/src/device/DeviceFeaturesState.ts +25 -0
  670. package/src/device/DevicePool.ts +66 -16
  671. package/src/device/DeviceStateMapper.ts +374 -0
  672. package/src/device/DeviceStateProjector.ts +94 -0
  673. package/src/device/DeviceStateStore.ts +201 -0
  674. package/src/device/DeviceWalletSessionStore.ts +144 -0
  675. package/src/device/cloneDeviceState.ts +39 -0
  676. package/src/device/deviceIdentity.ts +18 -0
  677. package/src/deviceProfile/buildDeviceFeatures.ts +224 -190
  678. package/src/deviceProfile/index.ts +0 -1
  679. package/src/deviceProfile/protocolV2DeviceIdentity.ts +32 -0
  680. package/src/events/device.ts +18 -1
  681. package/src/events/logBlockEvent.ts +79 -2
  682. package/src/events/ui-request.ts +25 -2
  683. package/src/index.ts +5 -0
  684. package/src/inject.ts +37 -43
  685. package/src/lowLevelInject.ts +5 -1
  686. package/src/protocols/protocol-v2/deviceSession.ts +24 -0
  687. package/src/protocols/protocol-v2/features.ts +96 -32
  688. package/src/protocols/protocol-v2/firmware.ts +2 -1
  689. package/src/protocols/protocol-v2/index.ts +8 -1
  690. package/src/protocols/protocol-v2/lockedError.ts +10 -0
  691. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +65 -0
  692. package/src/protocols/protocol-v2/uiInteraction.ts +210 -0
  693. package/src/protocols/protocol-v2/unlockPolicy.ts +105 -0
  694. package/src/protocols/protocol-v2/unlockRetry.ts +109 -0
  695. package/src/protocols/protocol-v2/walletSession.ts +285 -0
  696. package/src/topLevelInject.ts +5 -1
  697. package/src/types/api/checkAllFirmwareRelease.ts +50 -4
  698. package/src/types/api/deviceSettings.ts +26 -2
  699. package/src/types/api/deviceUnlock.ts +1 -1
  700. package/src/types/api/deviceUpdateBootloader.ts +6 -0
  701. package/src/types/api/export.ts +26 -0
  702. package/src/types/api/firmwareUpdate.ts +99 -5
  703. package/src/types/api/firmwareUpdateCapabilities.ts +9 -0
  704. package/src/types/api/firmwareUpdatePlan.ts +38 -0
  705. package/src/types/api/firmwareUpdatePreparedPlan.ts +53 -0
  706. package/src/types/api/getDeviceState.ts +19 -0
  707. package/src/types/api/getFeatures.ts +3 -0
  708. package/src/types/api/getOnekeyFeatures.ts +3 -0
  709. package/src/types/api/getPassphraseState.ts +9 -11
  710. package/src/types/api/index.ts +39 -64
  711. package/src/types/api/kaspaSignTransaction.ts +60 -4
  712. package/src/types/api/openWalletSession.ts +54 -0
  713. package/src/types/api/protocolV2.ts +24 -143
  714. package/src/types/api/sessionCache.ts +19 -0
  715. package/src/types/device.ts +185 -7
  716. package/src/types/params.ts +3 -2
  717. package/src/types/settings.ts +30 -16
  718. package/src/utils/assets.ts +4 -1
  719. package/src/utils/deviceFeaturesCompat.ts +180 -0
  720. package/src/utils/deviceFeaturesUtils.ts +52 -45
  721. package/src/utils/deviceInfoUtils.ts +27 -69
  722. package/src/utils/deviceSettings.ts +171 -39
  723. package/src/utils/deviceVersionUtils.ts +25 -44
  724. package/src/utils/findDefectiveBatchDevice.ts +3 -3
  725. package/src/utils/homescreen.ts +10 -0
  726. package/src/utils/index.ts +21 -2
  727. package/src/utils/networkUtils.ts +274 -16
  728. package/src/utils/pro2Wallpaper.ts +103 -0
  729. package/src/utils/tracing.ts +3 -1
  730. package/tsconfig.type-tests.json +12 -0
  731. package/dist/api/GetDeviceInfo.d.ts +0 -9
  732. package/dist/api/GetDeviceInfo.d.ts.map +0 -1
  733. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
  734. package/dist/api/protocol-v2/FilesystemDiskControl.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 -87
  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/FilesystemDiskControl.ts +0 -50
  741. package/src/deviceProfile/buildDeviceProfile.ts +0 -352
  742. package/src/types/api/getDeviceInfo.ts +0 -101
package/dist/index.d.ts CHANGED
@@ -1,24 +1,65 @@
1
1
  import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
2
- import { DeviceFirmwareTargetType, DeviceRebootType, DeviceFirmwareTarget, Messages, Transport, TransportCallOptions, OneKeyDeviceInfo, ProtocolV2DeviceInfo, Success as Success$1, LowlevelTransportSharedPlugin, ProtocolInfo, DeviceFirmwareUpdateStatus, DeviceFactoryInfo, OneKeyDeviceCommType, Features as Features$1, ProtocolType, RecoveryDeviceType, SafetyCheckLevel, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
2
+ import * as _onekeyfe_hd_transport from '@onekeyfe/hd-transport';
3
+ import { DeviceRebootType, Messages, Transport, TransportCallOptions, OneKeyDeviceCommType, ProtocolInfo, ProtocolV2DeviceInfo, DeviceStatus as DeviceStatus$1, Enum_SafetyCheckLevel, OneKeyDeviceInfo, Success as Success$1, DeviceSessionPinType, LowlevelTransportSharedPlugin, OnboardingStatus, RecoveryDeviceType, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, SafetyCheckLevel, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
3
4
  export { Success as DeviceSuccess, HDNodeType, Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion } from '@onekeyfe/hd-transport';
4
5
  import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
5
- import { HardwareConnectProtocol, Deferred, EFirmwareType, EDeviceType } from '@onekeyfe/hd-shared';
6
+ import { HardwareConnectProtocol, EFirmwareType, EDeviceType, Deferred } from '@onekeyfe/hd-shared';
6
7
 
7
8
  interface CommonParams {
8
9
  keepSession?: boolean;
10
+ /**
11
+ * polling connect max retry count
12
+ */
9
13
  retryCount?: number;
14
+ /**
15
+ * polling interval time
16
+ */
10
17
  pollIntervalTime?: number;
18
+ /**
19
+ * Timeout time for single polling
20
+ */
11
21
  timeout?: number;
22
+ /**
23
+ * DeviceInfoGet timeout during Protocol V2 initialization.
24
+ */
12
25
  protocolV2DeviceInfoTimeoutMs?: number;
26
+ /**
27
+ * passphrase state
28
+ */
13
29
  passphraseState?: string;
30
+ /**
31
+ * Use empty passphrase
32
+ */
14
33
  useEmptyPassphrase?: boolean;
34
+ /**
35
+ * Every init session
36
+ */
15
37
  initSession?: boolean;
38
+ /**
39
+ * Use derive cardano
40
+ */
16
41
  deriveCardano?: boolean;
17
42
  detectBootloaderDevice?: boolean;
43
+ /**
44
+ * Skip web device prompt
45
+ */
18
46
  skipWebDevicePrompt?: boolean;
47
+ /**
48
+ * Skip passphrase check
49
+ */
19
50
  skipPassphraseCheck?: boolean;
51
+ /**
52
+ * Only connect device, not initialize device, only ble connect
53
+ */
20
54
  onlyConnectBleDevice?: boolean;
55
+ /**
56
+ * Use pre-initialized device state (BLE only)
57
+ */
21
58
  usePreInitialize?: boolean;
59
+ /**
60
+ * Strictly expected transport protocol. The SDK actively verifies this value and
61
+ * rejects a mismatch. If omitted, a cached protocol only influences probe order.
62
+ */
22
63
  connectProtocol?: HardwareConnectProtocol;
23
64
  }
24
65
  type Params<T> = CommonParams & T & {
@@ -44,31 +85,6 @@ type DeviceRebootParams = {
44
85
  rebootType?: RebootTypeInput;
45
86
  reboot_type?: RebootTypeInput;
46
87
  };
47
- type DeviceFirmwareTargetInput = DeviceFirmwareTarget | {
48
- targetId?: DeviceFirmwareTargetType | string | number;
49
- target_id?: DeviceFirmwareTargetType | string | number;
50
- path: string;
51
- };
52
- type DeviceFirmwareUpdateParams = {
53
- targets?: DeviceFirmwareTargetInput[];
54
- targetId?: DeviceFirmwareTargetType | string | number;
55
- target_id?: DeviceFirmwareTargetType | string | number;
56
- path?: string;
57
- };
58
- type DeviceFactoryInfoSetParams = {
59
- version?: number;
60
- serial_number?: string;
61
- burn_in_completed?: boolean;
62
- factory_test_completed?: boolean;
63
- manufacture_time?: {
64
- year: number;
65
- month: number;
66
- day: number;
67
- hour: number;
68
- minute: number;
69
- second: number;
70
- };
71
- };
72
88
 
73
89
  type PassphrasePromptResponse = {
74
90
  passphrase?: string;
@@ -86,15 +102,19 @@ type TypedCallResponseMap = {
86
102
  [K in MessageKey]: TypedResponseMessage<K>;
87
103
  };
88
104
  type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
105
+ /**
106
+ * The life cycle begins with the acquisition of the device and ends with the disposal device commands
107
+ * acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
108
+ */
89
109
  declare class DeviceCommands {
90
110
  instanceId: string;
91
111
  currentResponseID?: number;
92
- device: Device$1;
112
+ device: Device;
93
113
  transport: Transport;
94
114
  mainId: string;
95
115
  disposed: boolean;
96
116
  callPromise?: Promise<DefaultMessageResponse>;
97
- constructor(device: Device$1, mainId: string);
117
+ constructor(device: Device, mainId: string);
98
118
  dispose(_cancelRequest: boolean): Promise<void>;
99
119
  checkDisposed(): void;
100
120
  cancelDeviceOnOneKeyDevice(): Promise<{
@@ -111,7 +131,7 @@ declare class DeviceCommands {
111
131
  };
112
132
  } | {
113
133
  success: boolean;
114
- error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 900 | 901 | 902;
134
+ error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
115
135
  payload: {
116
136
  message: string;
117
137
  };
@@ -130,7 +150,7 @@ declare class DeviceCommands {
130
150
  };
131
151
  } | {
132
152
  success: boolean;
133
- error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 900 | 901 | 902;
153
+ error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
134
154
  payload: {
135
155
  message: string;
136
156
  };
@@ -142,389 +162,188 @@ declare class DeviceCommands {
142
162
  _commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
143
163
  _filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
144
164
  _promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
145
- _promptPassphrase(options: PassphraseRequestPayload): Promise<PassphrasePromptResponse>;
165
+ promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
166
+ cancelDeviceOnReject?: boolean;
167
+ }): Promise<PassphrasePromptResponse>;
146
168
  }
147
169
 
148
- type DeviceDescriptorDiff = {
149
- didUpdate: boolean;
150
- connected: OneKeyDeviceInfo[];
151
- disconnected: OneKeyDeviceInfo[];
152
- changedSessions: OneKeyDeviceInfo[];
153
- changedDebugSessions: OneKeyDeviceInfo[];
154
- acquired: OneKeyDeviceInfo[];
155
- debugAcquired: OneKeyDeviceInfo[];
156
- released: OneKeyDeviceInfo[];
157
- debugReleased: OneKeyDeviceInfo[];
158
- descriptors: OneKeyDeviceInfo[];
170
+ type ProtocolV2RuntimeMode = 'normal' | 'bootloader' | 'romloader';
171
+
172
+ type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
173
+ type ConnectSettings = {
174
+ connectSrc?: string;
175
+ debug?: boolean;
176
+ transportReconnect?: boolean;
177
+ lazyLoad?: boolean;
178
+ origin?: string;
179
+ parentOrigin?: string;
180
+ configSrc: string;
181
+ iframeSrc: string;
182
+ version: string;
183
+ priority: number;
184
+ trustedHost: boolean;
185
+ supportedBrowser?: boolean;
186
+ env: transportEnv;
187
+ timestamp: number;
188
+ isFrame?: boolean;
189
+ preRelease?: boolean;
190
+ firmwareManifestMode?: 'sdk-managed' | 'external-only';
191
+ preloadedConfig?: RemoteConfigResponse;
192
+ fetchConfig?: boolean;
193
+ extension?: string;
194
+ configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
195
+ };
196
+ type IVersionArray = [number, number, number];
197
+ type ILocale = 'zh-CN' | 'en-US';
198
+ type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
199
+ type IProtocolV2FirmwareComponent = {
200
+ target: IProtocolV2FirmwareComponentTarget;
201
+ url: string;
202
+ /** SHA-256 of the complete okpkg, used after downloading the package. */
203
+ fingerprint?: string;
204
+ /** OKPP payload hash, used to detect same-version package changes. */
205
+ payloadHash?: string;
206
+ expectedSize?: number;
207
+ version?: IVersionArray;
208
+ };
209
+ /** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
210
+ type IProtocolV2ResourceBundle = {
211
+ /** Bundle name, such as images, animation, translations, or fonts_roobert. */
212
+ name: string;
213
+ /** Download URL. */
214
+ url: string;
215
+ fingerprint?: string;
216
+ expectedSize?: number;
217
+ /** Device target path, such as vol0:/bundles/images/images.okpkg. */
218
+ devicePath: string;
219
+ /** okpkg payload_version used to skip matching content after FileRead. */
220
+ version?: IVersionArray;
221
+ /** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
222
+ payloadHash?: string;
223
+ /** okpkg header_hash used for SHA3-512 comparison after FileRead. */
224
+ headerHash?: string;
225
+ };
226
+ /** STM32 firmware config */
227
+ type IFirmwareReleaseInfo = {
228
+ required: boolean;
229
+ url: string;
230
+ /**
231
+ * Firmware type (bitcoinonly or universal)
232
+ * This field is not present in the remote config, but will be inferred from the firmware field name
233
+ */
234
+ firmwareType?: EFirmwareType;
235
+ /** Firmware UI resource */
236
+ resource?: string;
237
+ resourceFingerprint?: string;
238
+ resourceExpectedSize?: number;
239
+ /** Firmware full UI resource */
240
+ fullResource?: string;
241
+ fullResourceFingerprint?: string;
242
+ fullResourceExpectedSize?: number;
243
+ fullResourceRange?: string[];
244
+ bootloaderResource?: string;
245
+ bootloaderFingerprint?: string;
246
+ bootloaderExpectedSize?: number;
247
+ bootloaderVersion?: IVersionArray;
248
+ displayBootloaderVersion?: IVersionArray;
249
+ bootloaderRelatedFirmwareVersion?: IVersionArray;
250
+ upgradeType?: 'payload-package-set' | string;
251
+ components?: Record<string, IProtocolV2FirmwareComponent>;
252
+ installOrder?: string[];
253
+ /** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
254
+ resourceBundles?: IProtocolV2ResourceBundle[];
255
+ bootloaderChangelog?: {
256
+ [k in ILocale]: string;
257
+ };
258
+ fingerprint: string;
259
+ expectedSize?: number;
260
+ version: IVersionArray;
261
+ changelog: {
262
+ [k in ILocale]: string;
263
+ };
264
+ };
265
+ /** BLE firmware config */
266
+ type IBLEFirmwareReleaseInfo = {
267
+ required: boolean;
268
+ /** bluetooth dfu version */
269
+ url: string;
270
+ /** stm bluetooth update version */
271
+ webUpdate: string;
272
+ fingerprint: string;
273
+ fingerprintWeb: string;
274
+ expectedSize?: number;
275
+ version: IVersionArray;
276
+ changelog: {
277
+ [k in ILocale]: string;
278
+ };
279
+ };
280
+ type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
281
+ type DeviceTypeMap = {
282
+ [k in IKnownDevice]: {
283
+ firmware: IFirmwareReleaseInfo[];
284
+ /** Pro2 Protocol V2 payload package set */
285
+ 'firmware-v1'?: IFirmwareReleaseInfo[];
286
+ 'firmware-v2'?: IFirmwareReleaseInfo[];
287
+ 'firmware-v8'?: IFirmwareReleaseInfo[];
288
+ 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
289
+ ble: IBLEFirmwareReleaseInfo[];
290
+ };
291
+ };
292
+ type AssetsMap = {
293
+ bridge: {
294
+ version: IVersionArray;
295
+ linux32Rpm: string;
296
+ linux64Rpm: string;
297
+ linux32Deb: string;
298
+ linux64Deb: string;
299
+ win: string;
300
+ mac: string;
301
+ sha256sumAsc: string;
302
+ changelog: {
303
+ [k in ILocale]: string;
304
+ };
305
+ };
159
306
  };
307
+ type RemoteConfigResponse = {
308
+ bridge: AssetsMap['bridge'];
309
+ } & DeviceTypeMap;
160
310
 
161
- declare class DeviceConnector {
162
- transport: Transport;
163
- listenTimestamp: number;
164
- current: OneKeyDeviceInfo[] | null;
165
- upcoming: OneKeyDeviceInfo[];
166
- listening: boolean;
167
- constructor();
168
- enumerate(): Promise<DeviceDescriptorDiff | undefined>;
169
- listen(): Promise<void>;
170
- stop(): void;
171
- acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
172
- release(session: string, onclose: boolean): Promise<void>;
173
- disconnect(session: string | undefined | null): Promise<void>;
174
- promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
175
- _reportDevicesChange(): void;
311
+ type DeviceStatus = 'available' | 'occupied' | 'used';
312
+ declare enum EOneKeyDeviceMode {
313
+ bootloader = "bootloader",
314
+ normal = "normal",
315
+ notInitialized = "notInitialized",
316
+ backupMode = "backupMode"
176
317
  }
177
-
178
- type InitOptions = {
179
- initSession?: boolean;
180
- deviceId?: string;
181
- passphraseState?: string;
182
- deriveCardano?: boolean;
183
- connectProtocol?: HardwareConnectProtocol;
184
- protocolV2DeviceInfoTimeoutMs?: number;
318
+ type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
319
+ type UnavailableCapabilities = {
320
+ [key: string]: UnavailableCapability;
185
321
  };
186
- type RunOptions = {
187
- keepSession?: boolean;
188
- skipInitialize?: boolean;
189
- } & InitOptions;
190
- interface DeviceEvents {
191
- [DEVICE.PIN]: [Device$1, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
192
- [DEVICE.PASSPHRASE_ON_DEVICE]: [Device$1, ((response: any) => void)?];
193
- [DEVICE.BUTTON]: [Device$1, DeviceButtonRequestPayload];
194
- [DEVICE.FEATURES]: [Device$1, DeviceFeaturesPayload];
195
- [DEVICE.PASSPHRASE]: [
196
- Device$1,
197
- PassphraseRequestPayload,
198
- (response: PassphrasePromptResponse, error?: Error) => void
199
- ];
200
- [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
201
- Device$1,
202
- (err: any, deviceId: string) => void
203
- ];
204
- [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
205
- Device$1,
206
- (err: any, deviceId: string) => void
207
- ];
208
- }
209
- declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
210
- interface Device$1 {
211
- on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
212
- off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
213
- emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
214
- }
215
- declare class Device$1 extends EventEmitter {
216
- originalDescriptor: OneKeyDeviceInfo;
217
- sdkInstanceId?: string;
218
- instanceId: string;
219
- createdAt: number;
220
- mainId?: string | null;
221
- deviceConnector?: DeviceConnector | null;
222
- commands: DeviceCommands;
223
- private cancelableAction?;
224
- private deviceAcquired;
225
- features: Features | undefined;
226
- featuresNeedsReload: boolean;
227
- runPromise?: Deferred<void> | null;
228
- externalState: string[];
229
- unavailableCapabilities: UnavailableCapabilities;
230
- instance: number;
231
- internalState: string[];
232
- needReloadDevice: boolean;
233
- keepSession: boolean;
234
- passphraseState: string | undefined;
235
- pendingCallbackPromise?: Deferred<void>;
236
- private preInitializedAt?;
237
- private preInitializeMeta?;
238
- private lastInitializeDurationMs?;
239
- constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
240
- static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device$1;
241
- toMessageObject(): Device | null;
242
- connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
243
- acquire(connectProtocol?: HardwareConnectProtocol, options?: {
244
- throwOnRunPromiseError?: boolean;
245
- }): Promise<void>;
246
- release(): Promise<void>;
247
- preInitialize(initOptions?: InitOptions): Promise<void>;
248
- markPreInitialized(meta?: {
249
- passphraseState?: string;
250
- }): void;
251
- clearPreInitialized(): void;
252
- isPreInitializeMetaMatch(payload?: {
253
- passphraseState?: string;
254
- }): boolean;
255
- isPreInitializedValid(ttlMs: number): boolean;
256
- setLastInitializeDuration(durationMs: number): void;
257
- getLastInitializeDuration(): number | undefined;
258
- getCommands(): DeviceCommands;
259
- getProtocol(): 'V1' | 'V2';
260
- isProtocolV2(): boolean;
261
- getCurrentDeviceType(): IDeviceType;
262
- getCurrentDeviceId(): string | undefined;
263
- getCurrentSerialNo(): string;
264
- getConnectId(): string;
265
- getCurrentBleName(): string | null;
266
- getCurrentLabel(): string | null;
267
- getCurrentPassphraseProtection(): boolean | null | undefined;
268
- getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
269
- getCurrentFirmwareVersionString(): string;
270
- getCurrentBLEFirmwareVersionString(): string | undefined;
271
- getCurrentSafetyChecks(): string | null | undefined;
272
- getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
273
- supportNewPassphrase(): SupportFeatureType;
274
- supportInputPinOnSoftware(): SupportFeatureType;
275
- supportModifyHomescreen(): SupportFeatureType;
276
- private generateStateKey;
277
- private getSessionCacheDeviceKey;
278
- getInternalState(_deviceId?: string): string | undefined;
279
- updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
280
- private setInternalState;
281
- clearInternalState(_deviceId?: string): void;
282
- initialize(options?: InitOptions): Promise<void>;
283
- private _initializeProtocolV2;
284
- private _refreshProtocolV2Status;
285
- getFeatures(): Promise<Features | undefined>;
286
- _updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
287
- updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
288
- updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
289
- updateFromCache(device: Device$1): void;
290
- run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
291
- _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
292
- interruptionFromOutside(): Promise<void>;
293
- interruptionFromUser(): Promise<void>;
294
- setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
295
- clearCancelableAction(): void;
296
- getMode(): EOneKeyDeviceMode;
297
- getFirmwareVersion(): IVersionArray | null;
298
- getBLEFirmwareVersion(): IVersionArray | null;
299
- isUsed(): boolean;
300
- hasDeviceAcquire(): boolean;
301
- isUsedHere(): boolean;
302
- isUsedElsewhere(): boolean;
303
- isBootloader(): boolean | undefined;
304
- isInitialized(): boolean | undefined;
305
- isSeedless(): boolean | undefined;
306
- isUnacquired(): boolean;
307
- hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
308
- hasUsePassphrase(): boolean;
309
- checkDeviceId(deviceId: string): boolean;
310
- lockDevice(): Promise<Success$1>;
311
- supportUnlockVersionRange(): DeviceFirmwareRange;
312
- unlockDevice(): Promise<Features | undefined>;
313
- checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
314
- }
315
-
316
- declare function generateSdkInstanceId(): string;
317
- declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
318
- interface RequestContext {
319
- responseID: number;
320
- sdkInstanceId?: string;
321
- methodName: string;
322
- connectId?: string;
323
- deviceInstanceId?: string;
324
- commandsInstanceId?: string;
325
- parentResponseID?: number;
326
- startTime: number;
327
- endTime?: number;
328
- status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
329
- error?: string;
330
- }
331
- interface SdkTracingContext {
332
- sdkInstanceId: string;
333
- createdAt: number;
334
- activeRequests: Map<number, RequestContext>;
335
- }
336
- declare function createSdkTracingContext(): SdkTracingContext;
337
- declare function createRequestContext(responseID: number, methodName: string, options?: {
338
- sdkInstanceId?: string;
339
- connectId?: string;
340
- deviceInstanceId?: string;
341
- commandsInstanceId?: string;
342
- parentResponseID?: number;
343
- }): RequestContext;
344
- declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
345
- declare function completeRequestContext(responseID: number, error?: Error): void;
346
- declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
347
- declare function formatRequestContext(context: RequestContext): string;
348
- declare function cleanupSdkInstance(sdkInstanceId: string): void;
349
-
350
- declare class Core extends EventEmitter {
351
- private tracingContext;
352
- readonly sdkInstanceId: string;
353
- private requestQueue;
354
- private prePendingCallPromise;
355
- private methodSynchronize;
356
- constructor();
357
- private getCoreContext;
358
- handleMessage(message: CoreMessage): Promise<any>;
359
- dispose(): void;
360
- }
361
- declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
362
- declare const switchTransport: ({ env, Transport, plugin, }: {
363
- env: ConnectSettings['env'];
364
- Transport: any;
365
- plugin?: LowlevelTransportSharedPlugin | undefined;
366
- }) => void;
367
-
368
- type DeviceInfoGetTargets = {
369
- hw?: boolean;
370
- fw?: boolean;
371
- coprocessor?: boolean;
372
- se1?: boolean;
373
- se2?: boolean;
374
- se3?: boolean;
375
- se4?: boolean;
376
- status?: boolean;
377
- };
378
- type DeviceInfoGetTypes = {
379
- version?: boolean;
380
- build_id?: boolean;
381
- hash?: boolean;
382
- specific?: boolean;
383
- };
384
- type DeviceInfoGetParams = {
385
- targets?: DeviceInfoGetTargets;
386
- types?: DeviceInfoGetTypes;
387
- };
388
-
389
- type FileOpSuccess = {
390
- message?: string;
391
- };
392
- type FileInfo = {
393
- path: string;
394
- offset: number;
395
- total_size: number;
396
- data?: Uint8Array;
397
- data_hash?: number;
398
- processed_byte?: number;
399
- chunks?: number;
400
- };
401
- type DirInfo = {
402
- path: string;
403
- child_dirs?: string;
404
- child_files?: string;
405
- };
406
- type PathInfoResult = {
407
- exist: boolean;
408
- size: number;
409
- year: number;
410
- month: number;
411
- day: number;
412
- hour: number;
413
- minute: number;
414
- second: number;
415
- readonly: boolean;
416
- hidden: boolean;
417
- system: boolean;
418
- archive: boolean;
419
- directory: boolean;
420
- };
421
- declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
422
- declare function ping(connectId: string, params?: CommonParams & {
423
- message?: string;
424
- }): Response<Success$1>;
425
- declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
426
- declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
427
- declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DeviceFirmwareUpdateStatus>;
428
- declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams): Response<DeviceFirmwareUpdateStatus>;
429
- declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success$1>;
430
- declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
431
- declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success$1>;
432
- declare function fileRead(connectId: string, params: {
433
- path: string;
434
- offset?: number;
435
- totalSize?: number;
436
- chunkLen?: number;
437
- uiPercentage?: number;
438
- }): Response<FileInfo>;
439
- declare function fileWrite(connectId: string, params: {
440
- path: string;
441
- offset?: number;
442
- totalSize?: number;
443
- chunkSize?: number;
444
- chunkLen?: number;
445
- data: ArrayBuffer | Uint8Array | Blob | string;
446
- overwrite?: boolean;
447
- append?: boolean;
448
- uiPercentage?: number;
449
- timeoutMs?: number | string;
450
- }): Response<FileInfo>;
451
- declare function fileDelete(connectId: string, params: {
452
- path: string;
453
- }): Response<FileOpSuccess>;
454
- declare function dirList(connectId: string, params: {
455
- path: string;
456
- depth?: number;
457
- }): Response<DirInfo>;
458
- declare function dirMake(connectId: string, params: {
459
- path: string;
460
- }): Response<FileOpSuccess>;
461
- declare function dirRemove(connectId: string, params: {
462
- path: string;
463
- }): Response<FileOpSuccess>;
464
- declare function pathInfo(connectId: string, params: {
465
- path: string;
466
- timeoutMs?: number | string;
467
- }): Response<PathInfoResult>;
468
- declare const filesystemFileRead: typeof fileRead;
469
- declare const filesystemFileWrite: typeof fileWrite;
470
- declare const filesystemFileDelete: typeof fileDelete;
471
- declare const filesystemDirList: typeof dirList;
472
- declare const filesystemDirMake: typeof dirMake;
473
- declare const filesystemDirRemove: typeof dirRemove;
474
- declare const filesystemPathInfoQuery: typeof pathInfo;
475
- declare function filesystemFormat(connectId: string): Response<Success$1>;
476
- declare function filesystemDiskControl(connectId: string, params: CommonParams & {
477
- enable: boolean | 0 | 1;
478
- timeoutMs?: number | string;
479
- }): Response<Success$1>;
480
-
481
- declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
482
- declare const off: (type: any, fn: any) => void;
483
- declare const removeAllListeners: (type: any) => void;
484
-
485
- declare function uiResponse(response: UiResponseEvent): void;
486
-
487
- type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
488
- interface LowLevelInjectApi {
489
- call: CallMethod;
490
- eventEmitter: EventEmitter$1;
491
- init: CoreApi['init'];
492
- dispose: CoreApi['dispose'];
493
- uiResponse: CoreApi['uiResponse'];
494
- cancel: CoreApi['cancel'];
495
- updateSettings: CoreApi['updateSettings'];
496
- switchTransport: CoreApi['switchTransport'];
497
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
498
- }
499
- type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
500
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
501
- };
502
-
503
- type DeviceStatus = 'available' | 'occupied' | 'used';
504
- declare enum EOneKeyDeviceMode {
505
- bootloader = "bootloader",
506
- normal = "normal",
507
- notInitialized = "notInitialized",
508
- backupMode = "backupMode"
509
- }
510
- type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
511
- type UnavailableCapabilities = {
512
- [key: string]: UnavailableCapability;
513
- };
514
- type KnownDevice = {
515
- connectId: string | null;
516
- uuid: string;
517
- deviceId: string | null;
518
- deviceType: IDeviceType | null;
519
- commType: OneKeyDeviceCommType | null;
520
- path: string;
521
- label: string;
522
- bleName: string | null;
523
- name: string;
524
- error?: typeof undefined;
525
- mode: EOneKeyDeviceMode;
526
- features?: Features;
527
- sessionId?: string | null;
322
+ type KnownDevice = {
323
+ connectId: string | null;
324
+ /** Protocol family confirmed by the transport's active probe. */
325
+ connectProtocol?: HardwareConnectProtocol;
326
+ /**
327
+ * Stable physical-device identity. Current SDK responses always include this
328
+ * value; it remains optional in the type during the uuid compatibility window.
329
+ */
330
+ serialNo?: string;
331
+ /** @deprecated Use serialNo instead. */
332
+ uuid: string;
333
+ deviceId: string | null;
334
+ deviceType: IDeviceType | null;
335
+ commType: OneKeyDeviceCommType | null;
336
+ path: string;
337
+ label: string;
338
+ bleName: string | null;
339
+ name: string;
340
+ error?: typeof undefined;
341
+ /** Current SDK/transport usage state for connection indicators. */
342
+ status?: DeviceStatus;
343
+ mode: EOneKeyDeviceMode;
344
+ features: Features;
345
+ /** Unified SDK device-state snapshot; features remains a legacy projection. */
346
+ state?: DeviceState;
528
347
  unavailableCapabilities: UnavailableCapabilities;
529
348
  bleFirmwareVersion: IVersionArray | null;
530
349
  firmwareVersion: IVersionArray | null;
@@ -534,18 +353,35 @@ type KnownDevice = {
534
353
  };
535
354
  type SearchDevice = {
536
355
  connectId: string | null;
356
+ /** Protocol family confirmed by the transport's active probe. */
357
+ connectProtocol?: HardwareConnectProtocol;
358
+ /**
359
+ * Available after device initialization. BLE discovery does not connect to the
360
+ * device, so it returns null until a later initialized device response. Current
361
+ * SDK responses always include the field; it remains optional in the type during
362
+ * the uuid compatibility window.
363
+ */
364
+ serialNo?: string | null;
365
+ /**
366
+ * @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
367
+ * and connectId for transport routing.
368
+ */
537
369
  uuid: string;
538
370
  deviceId: string | null;
539
371
  deviceType: IDeviceType;
540
372
  name: string;
541
373
  commType: OneKeyDeviceCommType;
542
374
  };
543
- type Device = KnownDevice;
375
+ type Device$1 = KnownDevice;
544
376
  type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
545
- type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
377
+ type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
546
378
  type DeviceFeaturesVerify = {
547
379
  firmwareBuildId?: string;
548
380
  firmwareHash?: string;
381
+ applicationP1BuildId?: string;
382
+ applicationP1Hash?: string;
383
+ applicationP2BuildId?: string;
384
+ applicationP2Hash?: string;
549
385
  bootloaderBuildId?: string;
550
386
  bootloaderHash?: string;
551
387
  boardBuildId?: string;
@@ -572,9 +408,115 @@ type DeviceFeaturesVerify = {
572
408
  type DeviceFeaturesRaw = {
573
409
  protocolV1Features?: Messages.Features;
574
410
  protocolV1OneKeyFeatures?: OnekeyFeatures;
411
+ protocolV2ProtocolInfo?: ProtocolInfo;
575
412
  protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
413
+ protocolV2DeviceStatus?: DeviceStatus$1;
414
+ };
415
+ type DeviceFeaturesRawPatch = {
416
+ [Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
417
+ };
418
+ type DeviceStateProtocol = DeviceFeaturesProtocol;
419
+ type DeviceStateMode = DeviceFeaturesMode;
420
+ type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
421
+ type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'settings-read' | 'settings-write' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
422
+ type DeviceStateIdentity = {
423
+ deviceType: IDeviceType;
424
+ firmwareType: EFirmwareType;
425
+ model: string | null;
426
+ vendor: string | null;
427
+ deviceId: string | null;
428
+ serialNo: string;
429
+ label: string | null;
430
+ bleName: string | null;
431
+ };
432
+ type DeviceStateStatus = {
433
+ mode: DeviceStateMode;
434
+ initialized: boolean | null;
435
+ unlocked: boolean | null;
436
+ firmwarePresent: boolean | null;
437
+ backupRequired: boolean | null;
438
+ noBackup: boolean | null;
439
+ unfinishedBackup: boolean | null;
440
+ recoveryMode: boolean | null;
441
+ passphraseProtection: boolean | null;
442
+ pinProtection: boolean | null;
443
+ attachToPinEnabled: boolean | null;
444
+ unlockedAttachPin: boolean | null;
445
+ };
446
+ type DeviceStateSettings = {
447
+ language: string | null;
448
+ bleEnabled: boolean | null;
449
+ sdCardPresent: boolean | null;
450
+ sdProtection: boolean | null;
451
+ wipeCodeProtection: boolean | null;
452
+ passphraseAlwaysOnDevice: boolean | null;
453
+ safetyChecks: Enum_SafetyCheckLevel | null;
454
+ autoLockDelayMs: number | null;
455
+ autoShutdownDelayMs: number | null;
456
+ displayRotation: number | null;
457
+ experimentalFeatures: boolean | null;
458
+ wallpaperPath: string | null;
459
+ brightness: number | null;
460
+ animationEnabled: boolean | null;
461
+ tapToWake: boolean | null;
462
+ hapticFeedback: boolean | null;
463
+ deviceNameDisplayEnabled: boolean | null;
464
+ airgapMode: boolean | null;
465
+ fidoEnabled: boolean | null;
466
+ usbLockEnabled: boolean | null;
467
+ randomKeypad: boolean | null;
468
+ };
469
+ type DeviceStateVersions = {
470
+ firmware: string | null;
471
+ applicationP1?: string | null;
472
+ applicationP2?: string | null;
473
+ bootloader: string | null;
474
+ board: string | null;
475
+ ble: string | null;
476
+ /** @deprecated Kept for legacy consumers; new code should read se01. */
477
+ se?: string | null;
478
+ se01?: string | null;
479
+ se02?: string | null;
480
+ se03?: string | null;
481
+ se04?: string | null;
482
+ se01Boot?: string | null;
483
+ se02Boot?: string | null;
484
+ se03Boot?: string | null;
485
+ se04Boot?: string | null;
486
+ };
487
+ type DeviceState = {
488
+ schemaVersion: 1;
489
+ revision: number;
490
+ updatedAt: number;
491
+ protocol: DeviceStateProtocol;
492
+ /** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
493
+ protocolVersion: number | null;
494
+ identity: DeviceStateIdentity;
495
+ status: DeviceStateStatus;
496
+ settings: DeviceStateSettings;
497
+ versions: DeviceStateVersions;
498
+ capabilities: Array<number | string>;
499
+ verification?: Partial<DeviceFeaturesVerify>;
500
+ };
501
+ type DeviceStatePatch = {
502
+ protocol?: DeviceStateProtocol;
503
+ protocolVersion?: number | null;
504
+ identity?: Partial<DeviceStateIdentity>;
505
+ status?: Partial<DeviceStateStatus>;
506
+ settings?: Partial<DeviceStateSettings>;
507
+ versions?: Partial<DeviceStateVersions>;
508
+ capabilities?: Array<number | string>;
509
+ verification?: DeviceFeaturesVerify;
510
+ raw?: DeviceFeaturesRawPatch;
511
+ };
512
+ type DeviceStateEvent = {
513
+ connectId: string | null;
514
+ state: DeviceState;
515
+ revision: number;
516
+ source: DeviceStateUpdateSource;
517
+ changedKeys: string[];
576
518
  };
577
- type Features = {
519
+ type NormalizedFeatures = {
578
520
  protocol: DeviceFeaturesProtocol;
579
521
  protocolVersion?: number | null;
580
522
  deviceType: IDeviceType;
@@ -604,10 +546,21 @@ type Features = {
604
546
  wipeCodeProtection: boolean | null;
605
547
  passphraseAlwaysOnDevice: boolean | null;
606
548
  attachToPinEnabled?: boolean | null;
607
- safetyChecks: string | null;
549
+ safetyChecks: Enum_SafetyCheckLevel | null;
608
550
  autoLockDelayMs: number | null;
551
+ autoShutdownDelayMs: number | null;
609
552
  displayRotation: number | null;
610
553
  experimentalFeatures: boolean | null;
554
+ wallpaperPath: string | null;
555
+ brightness: number | null;
556
+ animationEnabled: boolean | null;
557
+ tapToWake: boolean | null;
558
+ hapticFeedback: boolean | null;
559
+ deviceNameDisplayEnabled: boolean | null;
560
+ airgapMode: boolean | null;
561
+ fidoEnabled: boolean | null;
562
+ usbLockEnabled: boolean | null;
563
+ randomKeypad: boolean | null;
611
564
  firmwareVersion: string | null;
612
565
  bootloaderVersion: string | null;
613
566
  boardVersion: string | null;
@@ -627,8 +580,14 @@ type Features = {
627
580
  unlockedAttachPin?: boolean;
628
581
  raw?: DeviceFeaturesRaw;
629
582
  };
583
+ type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
630
584
  type OnekeyFeatures = Messages.OnekeyFeatures;
631
585
  type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
586
+ /**
587
+ * model_classic: 'classic' | 'classic1s' | 'classicpure'
588
+ * model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
589
+ * model_touch: 'touch' | 'pro'
590
+ */
632
591
  type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
633
592
  declare const DeviceModelToTypes: {
634
593
  [deviceModel in IDeviceModel]: IDeviceType[];
@@ -642,7 +601,6 @@ type ITransportStatus = 'valid' | 'outdated';
642
601
  type IVersionRange = {
643
602
  min: string;
644
603
  max?: string;
645
- unsupported?: boolean;
646
604
  };
647
605
  type DeviceFirmwareRange = {
648
606
  [deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
@@ -693,117 +651,466 @@ type SupportFeatures = {
693
651
  modifyHomescreen: SupportFeatureType;
694
652
  };
695
653
 
696
- type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
697
- type ConnectSettings = {
698
- connectSrc?: string;
699
- debug?: boolean;
700
- transportReconnect?: boolean;
701
- lazyLoad?: boolean;
702
- origin?: string;
703
- parentOrigin?: string;
704
- configSrc: string;
705
- iframeSrc: string;
706
- version: string;
707
- priority: number;
708
- trustedHost: boolean;
709
- supportedBrowser?: boolean;
710
- env: transportEnv;
711
- timestamp: number;
712
- isFrame?: boolean;
713
- preRelease?: boolean;
714
- fetchConfig?: boolean;
715
- extension?: string;
716
- configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
717
- };
718
- type IVersionArray = [number, number, number];
719
- type ILocale = 'zh-CN' | 'en-US';
720
- type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04' | 'CRATE';
721
- type IProtocolV2FirmwareComponent = {
722
- target: IProtocolV2FirmwareComponentTarget;
723
- url: string;
724
- fingerprint?: string;
725
- version?: IVersionArray;
726
- resourceManifest?: IProtocolV2ResourceManifest;
654
+ type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
655
+ type GetDeviceStateParams = CommonParams & {
656
+ scope?: DeviceStateScope;
727
657
  };
728
- type IProtocolV2ResourceManifestPackage = {
729
- name?: string;
730
- path: string;
731
- type?: string;
732
- version?: IVersionArray;
733
- sha256?: string;
734
- payloadHash?: string;
735
- headerHash?: string;
658
+ /** Internal state-read options, not part of the public CoreApi. */
659
+ type DeviceStateReadOptions = {
660
+ refreshSections?: DeviceStateSection[];
661
+ includeRaw?: boolean;
736
662
  };
737
- type IProtocolV2ResourceManifest = {
738
- format?: 'okpkg-crate' | string;
739
- target?: 'CRATE' | string;
740
- version?: IVersionArray;
741
- packages: IProtocolV2ResourceManifestPackage[];
663
+ declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
664
+
665
+ type DeviceDescriptorDiff = {
666
+ didUpdate: boolean;
667
+ connected: OneKeyDeviceInfo[];
668
+ disconnected: OneKeyDeviceInfo[];
669
+ changedSessions: OneKeyDeviceInfo[];
670
+ changedDebugSessions: OneKeyDeviceInfo[];
671
+ acquired: OneKeyDeviceInfo[];
672
+ debugAcquired: OneKeyDeviceInfo[];
673
+ released: OneKeyDeviceInfo[];
674
+ debugReleased: OneKeyDeviceInfo[];
675
+ descriptors: OneKeyDeviceInfo[];
742
676
  };
743
- type IFirmwareReleaseInfo = {
744
- required: boolean;
745
- url: string;
746
- firmwareType?: EFirmwareType;
747
- resource?: string;
748
- fullResource?: string;
749
- fullResourceRange?: string[];
750
- bootloaderResource?: string;
751
- bootloaderVersion?: IVersionArray;
752
- displayBootloaderVersion?: IVersionArray;
753
- bootloaderRelatedFirmwareVersion?: IVersionArray;
754
- upgradeType?: 'payload-package-set' | string;
755
- components?: Record<string, IProtocolV2FirmwareComponent>;
756
- installOrder?: string[];
757
- resourceManifest?: IProtocolV2ResourceManifest;
758
- bootloaderChangelog?: {
759
- [k in ILocale]: string;
760
- };
761
- fingerprint: string;
762
- version: IVersionArray;
763
- changelog: {
764
- [k in ILocale]: string;
765
- };
677
+
678
+ declare class DeviceConnector {
679
+ transport: Transport;
680
+ listenTimestamp: number;
681
+ current: OneKeyDeviceInfo[] | null;
682
+ upcoming: OneKeyDeviceInfo[];
683
+ listening: boolean;
684
+ constructor();
685
+ enumerate(): Promise<DeviceDescriptorDiff | undefined>;
686
+ listen(): Promise<void>;
687
+ stop(): void;
688
+ acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, expectedProtocol?: HardwareConnectProtocol, protocolHint?: HardwareConnectProtocol): Promise<string | undefined>;
689
+ release(session: string, onclose: boolean): Promise<void>;
690
+ disconnect(session: string | undefined | null): Promise<void>;
691
+ promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
692
+ _reportDevicesChange(): void;
693
+ }
694
+
695
+ type InitOptions = {
696
+ initSession?: boolean;
697
+ deviceId?: string;
698
+ passphraseState?: string;
699
+ deriveCardano?: boolean;
700
+ connectProtocol?: HardwareConnectProtocol;
701
+ protocolV2DeviceInfoTimeoutMs?: number;
702
+ /** Refresh Protocol V2 runtime state before returning discovery results. */
703
+ refreshRuntimeState?: boolean;
766
704
  };
767
- type IBLEFirmwareReleaseInfo = {
768
- required: boolean;
769
- url: string;
770
- webUpdate: string;
771
- fingerprint: string;
772
- fingerprintWeb: string;
773
- version: IVersionArray;
774
- changelog: {
775
- [k in ILocale]: string;
705
+ type RunOptions = {
706
+ keepSession?: boolean;
707
+ skipInitialize?: boolean;
708
+ } & InitOptions;
709
+ interface DeviceEvents {
710
+ [DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
711
+ [DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
712
+ [DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
713
+ [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
714
+ [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
715
+ [DEVICE.STATE]: [Device, DeviceStateEvent];
716
+ [DEVICE.PASSPHRASE]: [
717
+ Device,
718
+ PassphraseRequestPayload,
719
+ (response: PassphrasePromptResponse, error?: Error) => void
720
+ ];
721
+ [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
722
+ Device,
723
+ (err: any, deviceId: string) => void
724
+ ];
725
+ [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
726
+ Device,
727
+ (err: any, deviceId: string) => void
728
+ ];
729
+ }
730
+ /**
731
+ * Pre-populate the device session cache with a known session ID.
732
+ *
733
+ * This allows short-lived processes (e.g. CLI) to restore a previously
734
+ * obtained session, avoiding the need to re-enter passphrase on every
735
+ * invocation. The session must have been obtained from a prior
736
+ * wallet-session call on the same device. This compatibility hook is intended
737
+ * for a trusted CLI process restoring its own OS-keychain entry.
738
+ *
739
+ * @param deviceId - The device's device_id (from features)
740
+ * @param passphraseState - The passphrase state token
741
+ * @param sessionId - The session_id to cache (from features.session_id)
742
+ */
743
+ declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
744
+ interface Device {
745
+ on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
746
+ off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
747
+ emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
748
+ }
749
+ declare class Device extends EventEmitter {
750
+ /**
751
+ * 设备标识对象
752
+ */
753
+ originalDescriptor: OneKeyDeviceInfo;
754
+ sdkInstanceId?: string;
755
+ /**
756
+ * 设备实例唯一标识
757
+ */
758
+ instanceId: string;
759
+ createdAt: number;
760
+ /**
761
+ * 设备主 ID
762
+ * 蓝牙连接时是设备的 UUID
763
+ * USB连接时是设备的 sessionID
764
+ */
765
+ mainId?: string | null;
766
+ /**
767
+ * 通信管道,向设备发送请求
768
+ */
769
+ deviceConnector?: DeviceConnector | null;
770
+ /**
771
+ * 固件命令
772
+ */
773
+ commands: DeviceCommands;
774
+ /**
775
+ * 可取消的操作
776
+ */
777
+ private cancelableAction?;
778
+ /**
779
+ * 设备是否被占用
780
+ */
781
+ private deviceAcquired;
782
+ /** Canonical device-state cache; legacy Features is a compatibility projection. */
783
+ private stateStore;
784
+ /** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
785
+ private protocolV2StateNeedsReload;
786
+ get state(): (DeviceState & {
787
+ raw?: DeviceFeaturesRaw | undefined;
788
+ }) | undefined;
789
+ get features(): Features | undefined;
790
+ set features(features: Features | undefined);
791
+ runPromise?: Deferred<void> | null;
792
+ externalState: string[];
793
+ unavailableCapabilities: UnavailableCapabilities;
794
+ instance: number;
795
+ internalState: string[];
796
+ needReloadDevice: boolean;
797
+ /**
798
+ * 执行 API 方法后是否保留 SessionID
799
+ */
800
+ keepSession: boolean;
801
+ passphraseState: string | undefined;
802
+ pendingCallbackPromise?: Deferred<void>;
803
+ /** Pre-initialize timestamp (ms) */
804
+ private preInitializedAt?;
805
+ /** Pre-initialize context, used to verify state consistency before skipping */
806
+ private preInitializeMeta?;
807
+ /** Last Initialize duration (ms), reported as "saved" when a skip happens */
808
+ private lastInitializeDurationMs?;
809
+ constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
810
+ static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
811
+ toMessageObject(): Device$1 | null;
812
+ /**
813
+ * Device connect
814
+ * @returns {Promise<boolean>}
815
+ */
816
+ connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
817
+ acquire(expectedProtocol?: HardwareConnectProtocol, options?: {
818
+ throwOnRunPromiseError?: boolean;
819
+ }): Promise<void>;
820
+ release(): Promise<void>;
821
+ /**
822
+ * Pre-initialize: connect + Initialize ahead of the sign.
823
+ */
824
+ preInitialize(initOptions?: InitOptions): Promise<void>;
825
+ markPreInitialized(meta?: {
826
+ passphraseState?: string;
827
+ }): void;
828
+ clearPreInitialized(): void;
829
+ isPreInitializeMetaMatch(payload?: {
830
+ passphraseState?: string;
831
+ }): boolean;
832
+ isPreInitializedValid(ttlMs: number): boolean;
833
+ setLastInitializeDuration(durationMs: number): void;
834
+ getLastInitializeDuration(): number | undefined;
835
+ getCommands(): DeviceCommands;
836
+ /**
837
+ * Canonical protocol discriminator.
838
+ *
839
+ * descriptor.protocolType is established by active probing; V2 features are mapped
840
+ * from DeviceInfoGet. All protocol branches must use this method instead of reading
841
+ * originalDescriptor.protocolType directly or inferring a protocol from features.
842
+ */
843
+ getProtocol(): 'V1' | 'V2';
844
+ isProtocolV2(): boolean;
845
+ getCurrentDeviceType(): IDeviceType;
846
+ getCurrentDeviceId(): string | undefined;
847
+ getCurrentSerialNo(): string;
848
+ getConnectId(): string;
849
+ getCurrentBleName(): string | null;
850
+ getCurrentLabel(): string | null;
851
+ getCurrentDisplayName(): string | null;
852
+ getCurrentPassphraseProtection(): boolean | null | undefined;
853
+ getCurrentFirmwareType(): EFirmwareType;
854
+ getCurrentFirmwareVersionString(): string;
855
+ getCurrentBLEFirmwareVersionString(): string | undefined;
856
+ getCurrentBootloaderVersionString(): string | undefined;
857
+ getCurrentSafetyChecks(): _onekeyfe_hd_transport.Enum_SafetyCheckLevel | null | undefined;
858
+ getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
859
+ supportNewPassphrase(): SupportFeatureType;
860
+ supportInputPinOnSoftware(): SupportFeatureType;
861
+ supportModifyHomescreen(): SupportFeatureType;
862
+ private getSessionCacheDeviceKey;
863
+ private reconcileSessionCacheDeviceIdentity;
864
+ getInternalState(_deviceId?: string): string | undefined;
865
+ getStandardInternalState(_deviceId?: string): {
866
+ passphraseState: string;
867
+ sessionId: string;
868
+ } | undefined;
869
+ updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null, walletType?: 'standard' | 'hidden'): void;
870
+ private setInternalState;
871
+ clearInternalState(_deviceId?: string): void;
872
+ clearStandardInternalState(_deviceId?: string): void;
873
+ initialize(options?: InitOptions): Promise<void>;
874
+ /**
875
+ * Device initialization over Protocol V2.
876
+ *
877
+ * Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
878
+ * features state directly from DeviceInfoGet.
879
+ */
880
+ private _initializeProtocolV2;
881
+ getFeatures(): Promise<Features | undefined>;
882
+ getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
883
+ _updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
884
+ updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
885
+ raw?: DeviceFeaturesRaw | undefined;
776
886
  };
887
+ updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
888
+ probeProtocolV2RuntimeState(deviceInfo: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
889
+ updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode, protocolInfo?: ProtocolInfo): Features;
890
+ updateProtocolV2Status(status: DeviceStatus$1): Features;
891
+ markTransportDisconnected(): void;
892
+ invalidateAfterWipe(): void;
893
+ markProtocolV2Reboot(rebootType: DeviceRebootType): void;
894
+ /**
895
+ * 暂时只在 acquire 后更新 Session ID
896
+ * 后续看是否有需要依据 listen 返回结果更新
897
+ * @param descriptor
898
+ */
899
+ updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
900
+ updateFromCache(device: Device): void;
901
+ run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
902
+ _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
903
+ interruptionFromOutside(): Promise<void>;
904
+ interruptionFromUser(): Promise<void>;
905
+ setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
906
+ clearCancelableAction(): void;
907
+ getMode(): EOneKeyDeviceMode;
908
+ getStatus(): "available" | "occupied" | "used";
909
+ getFirmwareVersion(): IVersionArray | null;
910
+ getBLEFirmwareVersion(): IVersionArray | null;
911
+ isUsed(): boolean;
912
+ hasDeviceAcquire(): boolean;
913
+ isUsedHere(): boolean;
914
+ isUsedElsewhere(): boolean;
915
+ isBootloader(): boolean | undefined;
916
+ isRomloader(): boolean | undefined;
917
+ isInitialized(): boolean | undefined;
918
+ isSeedless(): boolean | undefined;
919
+ isUnacquired(): boolean;
920
+ hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
921
+ hasUsePassphrase(): boolean;
922
+ checkDeviceId(deviceId: string): boolean;
923
+ lockDevice(): Promise<Success$1>;
924
+ supportUnlockVersionRange(): DeviceFirmwareRange;
925
+ unlockDevice(pinType?: DeviceSessionPinType): Promise<Features | undefined>;
926
+ checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
927
+ }
928
+
929
+ /**
930
+ * SDK Tracing Utilities
931
+ * Tracks object instances and request call chains across multiple SDK instances
932
+ */
933
+ /**
934
+ * Generate SDK instance ID
935
+ * @returns Format: "SDK-<number>-<timestamp>"
936
+ * @example "SDK-1-123456"
937
+ */
938
+ declare function generateSdkInstanceId(): string;
939
+ /**
940
+ * Generate globally unique instance ID
941
+ * @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
942
+ * @param sdkInstanceId SDK instance ID (optional)
943
+ * @returns Format: <SDK>.<type>-<number>-<timestamp>
944
+ * @example "SDK-1.Device-1-123456" or "Device-1-123456"
945
+ */
946
+ declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
947
+ /**
948
+ * Request context information
949
+ */
950
+ interface RequestContext {
951
+ /** Request unique ID (reuses BaseMethod.responseID) */
952
+ responseID: number;
953
+ /** SDK instance ID */
954
+ sdkInstanceId?: string;
955
+ /** API method name */
956
+ methodName: string;
957
+ /** Device connection ID */
958
+ connectId?: string;
959
+ /** Device instance ID */
960
+ deviceInstanceId?: string;
961
+ /** DeviceCommands instance ID */
962
+ commandsInstanceId?: string;
963
+ /** Parent request ID (for nested calls like allNetworkGetAddress) */
964
+ parentResponseID?: number;
965
+ /** Request start time */
966
+ startTime: number;
967
+ /** Request end time */
968
+ endTime?: number;
969
+ /** Request status */
970
+ status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
971
+ /** Error message */
972
+ error?: string;
973
+ }
974
+ /**
975
+ * SDK instance tracing context
976
+ */
977
+ interface SdkTracingContext {
978
+ /** SDK instance ID */
979
+ sdkInstanceId: string;
980
+ /** Creation timestamp */
981
+ createdAt: number;
982
+ /** Active requests */
983
+ activeRequests: Map<number, RequestContext>;
984
+ }
985
+ /**
986
+ * Create SDK instance tracing context
987
+ */
988
+ declare function createSdkTracingContext(): SdkTracingContext;
989
+ /**
990
+ * Create and register request context
991
+ * @param responseID Request ID (reuses BaseMethod.responseID)
992
+ * @param methodName API method name
993
+ * @param options Additional options
994
+ */
995
+ declare function createRequestContext(responseID: number, methodName: string, options?: {
996
+ sdkInstanceId?: string;
997
+ connectId?: string;
998
+ deviceInstanceId?: string;
999
+ commandsInstanceId?: string;
1000
+ parentResponseID?: number;
1001
+ }): RequestContext;
1002
+ /**
1003
+ * Update request context
1004
+ */
1005
+ declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
1006
+ /**
1007
+ * Complete request context
1008
+ */
1009
+ declare function completeRequestContext(responseID: number, error?: Error): void;
1010
+ /**
1011
+ * Get active requests for specific Device instance
1012
+ */
1013
+ declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
1014
+ /**
1015
+ * Format request context for logging
1016
+ */
1017
+ declare function formatRequestContext(context: RequestContext): string;
1018
+ /**
1019
+ * Cleanup specific SDK instance
1020
+ */
1021
+ declare function cleanupSdkInstance(sdkInstanceId: string): void;
1022
+
1023
+ declare class Core extends EventEmitter {
1024
+ private tracingContext;
1025
+ readonly sdkInstanceId: string;
1026
+ private requestQueue;
1027
+ private disposePromise?;
1028
+ private prePendingCallPromise;
1029
+ private methodSynchronize;
1030
+ constructor();
1031
+ private getCoreContext;
1032
+ handleMessage(message: CoreMessage): Promise<any>;
1033
+ dispose(): Promise<void>;
1034
+ private disposeResources;
1035
+ }
1036
+ declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
1037
+ declare const switchTransport: ({ env, Transport, plugin, }: {
1038
+ env: ConnectSettings['env'];
1039
+ Transport: any;
1040
+ plugin?: LowlevelTransportSharedPlugin | undefined;
1041
+ }) => void;
1042
+
1043
+ declare const PRO2_WALLPAPER_WIDTH = 604;
1044
+ declare const PRO2_WALLPAPER_HEIGHT = 1024;
1045
+ type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
1046
+ declare function encodePro2Wallpaper(options: {
1047
+ width: number;
1048
+ height: number;
1049
+ rgba: Uint8Array | ArrayBuffer;
1050
+ }): {
1051
+ data: Uint8Array;
1052
+ colorFormat: Pro2WallpaperColorFormat;
777
1053
  };
778
- type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
779
- type DeviceTypeMap = {
780
- [k in IKnownDevice]: {
781
- firmware: IFirmwareReleaseInfo[];
782
- 'firmware-v1'?: IFirmwareReleaseInfo[];
783
- 'firmware-v2'?: IFirmwareReleaseInfo[];
784
- 'firmware-v8'?: IFirmwareReleaseInfo[];
785
- 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
786
- ble: IBLEFirmwareReleaseInfo[];
787
- };
1054
+
1055
+ type DeviceUploadWallpaperParams = {
1056
+ width: number;
1057
+ height: number;
1058
+ rgba: Uint8Array | ArrayBuffer;
1059
+ fileName?: string;
1060
+ chunkSize?: number;
788
1061
  };
789
- type AssetsMap = {
790
- bridge: {
791
- version: IVersionArray;
792
- linux32Rpm: string;
793
- linux64Rpm: string;
794
- linux32Deb: string;
795
- linux64Deb: string;
796
- win: string;
797
- mac: string;
798
- sha256sumAsc: string;
799
- changelog: {
800
- [k in ILocale]: string;
801
- };
802
- };
1062
+ type DeviceUploadWallpaperResponse = {
1063
+ path: string;
1064
+ size: number;
1065
+ colorFormat: Pro2WallpaperColorFormat;
1066
+ message?: string;
1067
+ };
1068
+
1069
+ type FileInfo = {
1070
+ path: string;
1071
+ offset: number;
1072
+ total_size: number;
1073
+ data?: Uint8Array;
1074
+ data_hash?: number;
1075
+ processed_byte?: number;
1076
+ chunks?: number;
1077
+ };
1078
+ type TestProtocolV2PingParams = CommonParams & {
1079
+ /** Firmware diagnostic echo payload, limited to 63 UTF-8 bytes. */
1080
+ message?: string;
1081
+ };
1082
+ declare function testProtocolV2Ping(connectId: string, params?: TestProtocolV2PingParams): Response<Success$1>;
1083
+ declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
1084
+ declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
1085
+ declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
1086
+ declare function uploadPortfolio(connectId: string, params: {
1087
+ packageBytes: ArrayBuffer | Uint8Array | Blob;
1088
+ timeoutMs?: number | string;
1089
+ }): Response<FileInfo & {
1090
+ portfolioUpdated: true;
1091
+ }>;
1092
+
1093
+ declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
1094
+ declare const off: (type: any, fn: any) => void;
1095
+ declare const removeAllListeners: (type: any) => void;
1096
+
1097
+ declare function uiResponse(response: UiResponseEvent): void;
1098
+
1099
+ type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
1100
+ interface LowLevelInjectApi {
1101
+ call: CallMethod;
1102
+ eventEmitter: EventEmitter$1;
1103
+ init: CoreApi['init'];
1104
+ dispose: CoreApi['dispose'];
1105
+ uiResponse: CoreApi['uiResponse'];
1106
+ cancel: CoreApi['cancel'];
1107
+ updateSettings: CoreApi['updateSettings'];
1108
+ switchTransport: CoreApi['switchTransport'];
1109
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
1110
+ }
1111
+ type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
1112
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
803
1113
  };
804
- type RemoteConfigResponse = {
805
- bridge: AssetsMap['bridge'];
806
- } & DeviceTypeMap;
807
1114
 
808
1115
  declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
809
1116
  declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
@@ -814,6 +1121,18 @@ declare function preInitialize(connectId: string, params?: CommonParams): Respon
814
1121
 
815
1122
  declare function getLogs(): Response<string[]>;
816
1123
 
1124
+ type ClearSessionCacheParams = {
1125
+ deviceId?: never;
1126
+ passphraseState?: never;
1127
+ } | {
1128
+ deviceId: string;
1129
+ passphraseState?: string;
1130
+ };
1131
+ type ClearSessionCachePayload = {
1132
+ cleared: true;
1133
+ };
1134
+ declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
1135
+
817
1136
  declare function checkBridgeStatus(): Response<boolean>;
818
1137
 
819
1138
  type CheckBridgeReleaseResponse = {
@@ -837,165 +1156,119 @@ type CheckBootloaderReleaseParams = {
837
1156
  };
838
1157
  declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
839
1158
 
840
- type FirmwareRelease$2 = {
841
- shouldUpdate?: boolean;
842
- status: IDeviceFirmwareStatus;
843
- changelog?: {
844
- 'zh-CN': string;
845
- 'en-US': string;
846
- }[];
847
- release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo;
848
- bootloaderMode?: boolean;
849
- };
850
- type AllFirmwareRelease = {
851
- firmware: FirmwareRelease$2;
852
- ble: FirmwareRelease$2;
853
- bootloader?: FirmwareRelease$2;
854
- bridge?: FirmwareRelease$2;
855
- features?: Features$1;
856
- };
857
- type CheckAllFirmwareReleaseParams = {
858
- checkBridgeRelease?: boolean;
859
- firmwareType?: EFirmwareType;
860
- };
861
- declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
862
-
863
- type CheckFirmwareTypeAvailableParams = {
864
- deviceType: EDeviceType;
865
- firmwareType: EFirmwareType;
866
- };
867
- declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
868
-
869
- declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
870
-
871
- declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
872
-
873
- type DeviceInfoProtocol = ProtocolType | 'unknown';
874
- type DeviceInfoSource = 'features' | 'protocolV1OneKeyFeatures' | 'deviceInfo';
875
- type DeviceInfoScope = 'basic' | 'versions' | 'verify' | 'full';
876
- type GetDeviceInfoParams = {
877
- scope?: DeviceInfoScope;
878
- refresh?: boolean;
879
- includeRaw?: boolean;
880
- };
881
- type DeviceInfoMode = 'normal' | 'bootloader' | 'notInitialized' | 'unknown';
882
- type DeviceInfoStatus = {
883
- mode: DeviceInfoMode;
884
- initialized: boolean | null;
885
- bootloaderMode: boolean | null;
886
- unlocked: boolean | null;
887
- passphraseProtection: boolean | null;
888
- attachToPinEnabled?: boolean | null;
889
- unlockedAttachPin?: boolean | null;
890
- backupRequired: boolean | null;
891
- noBackup: boolean | null;
892
- language: string | null;
893
- bleEnabled: boolean | null;
894
- };
895
- type DeviceProfileVersions = {
896
- firmware: string | null;
897
- bootloader: string | null;
898
- board: string | null;
899
- ble: string | null;
900
- se01?: string | null;
901
- se02?: string | null;
902
- se03?: string | null;
903
- se04?: string | null;
904
- se01Boot?: string | null;
905
- se02Boot?: string | null;
906
- se03Boot?: string | null;
907
- se04Boot?: string | null;
908
- };
909
- type DeviceProfileVerify = {
910
- firmwareBuildId?: string;
911
- firmwareHash?: string;
912
- bootloaderBuildId?: string;
913
- bootloaderHash?: string;
914
- boardBuildId?: string;
915
- boardHash?: string;
916
- bleBuildId?: string;
917
- bleHash?: string;
918
- se01BuildId?: string;
919
- se01Hash?: string;
920
- se02BuildId?: string;
921
- se02Hash?: string;
922
- se03BuildId?: string;
923
- se03Hash?: string;
924
- se04BuildId?: string;
925
- se04Hash?: string;
926
- se01BootBuildId?: string;
927
- se01BootHash?: string;
928
- se02BootBuildId?: string;
929
- se02BootHash?: string;
930
- se03BootBuildId?: string;
931
- se03BootHash?: string;
932
- se04BootBuildId?: string;
933
- se04BootHash?: string;
934
- };
935
- type DeviceProfileRaw = {
936
- features?: Features;
937
- protocolV1OneKeyFeatures?: OnekeyFeatures;
938
- protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
939
- };
940
- type DeviceProfile = {
941
- protocol: DeviceInfoProtocol;
942
- sources: DeviceInfoSource[];
943
- deviceType: IDeviceType;
1159
+ type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
1160
+ type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
1161
+ type FirmwareUpdatePlanForceTarget = 'firmware' | 'ble' | 'bootloader' | 'resource';
1162
+ interface FirmwareUpdatePlanArtifact {
1163
+ artifactId: string;
1164
+ role: FirmwareUpdatePlanArtifactRole;
1165
+ target: FirmwareUpdatePlanTarget;
1166
+ url: string;
1167
+ container: 'raw' | 'zip';
1168
+ logicalName?: string;
1169
+ expectedSize?: number;
1170
+ expectedSha256?: string;
1171
+ targetVersion?: string;
1172
+ }
1173
+ interface FirmwareUpdatePlan {
1174
+ schemaVersion: 2;
1175
+ planDigest: string;
1176
+ executor: 'v2' | 'v3' | 'v4';
1177
+ deviceIdentity: string;
1178
+ deviceModel: string;
944
1179
  firmwareType: EFirmwareType;
945
- deviceId: string;
946
- serialNo: string;
947
- label: string | null;
948
- bleName: string | null;
949
- status: DeviceInfoStatus;
950
- versions: DeviceProfileVersions;
951
- verify?: DeviceProfileVerify;
952
- raw?: DeviceProfileRaw;
953
- };
954
- declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
955
-
956
- declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
957
-
958
- type GetPassphraseStatePayload = {
959
- passphraseState?: string;
960
- sessionId?: string;
961
- unlockedAttachPin?: boolean;
962
- passphraseProtection?: boolean | null;
963
- };
964
- type GetPassphraseStateParams = CommonParams & {
965
- allowCreateAttachPin?: boolean;
966
- };
967
- declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<GetPassphraseStatePayload>;
968
-
969
- type FirmwareRelease$1 = {
970
- status: IDeviceFirmwareStatus;
971
- changelog: {
972
- 'en-US': string;
973
- 'zh-CN': string;
974
- }[];
975
- release: IFirmwareReleaseInfo;
976
- bootloaderMode: boolean;
977
- };
978
- type CheckFirmwareReleaseParams = {
979
- firmwareType?: EFirmwareType;
980
- };
981
- declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
1180
+ platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
1181
+ artifacts: FirmwareUpdatePlanArtifact[];
1182
+ targetsToUpdate: FirmwareUpdatePlanTarget[];
1183
+ }
982
1184
 
983
- type BleFirmwareRelease = {
984
- status: IDeviceBLEFirmwareStatus;
985
- changelog: {
986
- 'zh-CN': string;
987
- 'en-US': string;
988
- }[];
989
- release: IBLEFirmwareReleaseInfo;
990
- bootloaderMode: boolean;
991
- };
992
- declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
1185
+ interface FirmwareUpdatePreparedEntry {
1186
+ entryName: string;
1187
+ artifact: FirmwareArtifactReference;
1188
+ }
1189
+ interface FirmwareUpdatePreparedArtifactInput {
1190
+ artifactId: string;
1191
+ artifact: FirmwareArtifactReference;
1192
+ materializedEntries?: FirmwareUpdatePreparedEntry[];
1193
+ }
1194
+ interface FirmwareUpdatePreparedArtifact {
1195
+ artifactId: string;
1196
+ role: FirmwareUpdatePlanArtifactRole;
1197
+ target: FirmwareUpdatePlanTarget;
1198
+ container: 'raw' | 'zip';
1199
+ logicalName?: string;
1200
+ targetVersion?: string;
1201
+ artifact: FirmwareArtifactReference;
1202
+ materializedEntries?: FirmwareUpdatePreparedEntry[];
1203
+ }
1204
+ interface FirmwareUpdatePreparedPlan {
1205
+ schemaVersion: 2;
1206
+ preparedPlanDigest: string;
1207
+ planDigest: string;
1208
+ networkPolicy: 'forbid';
1209
+ executor: FirmwareUpdatePlan['executor'];
1210
+ deviceIdentity: string;
1211
+ deviceModel: string;
1212
+ firmwareType: FirmwareUpdatePlan['firmwareType'];
1213
+ platform: FirmwareUpdatePlan['platform'];
1214
+ leaseRef: string;
1215
+ artifacts: FirmwareUpdatePreparedArtifact[];
1216
+ targetsToUpdate: FirmwareUpdatePlanTarget[];
1217
+ }
1218
+ declare function prepareFirmwareUpdatePlan(input: {
1219
+ plan: FirmwareUpdatePlan;
1220
+ leaseRef: string;
1221
+ artifacts: FirmwareUpdatePreparedArtifactInput[];
1222
+ }): FirmwareUpdatePreparedPlan;
1223
+ declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
993
1224
 
994
1225
  type IUpdateType = 'firmware' | 'ble';
1226
+ interface FirmwareArtifactReference {
1227
+ artifactRef: string;
1228
+ size: number;
1229
+ sha256: string;
1230
+ }
1231
+ interface FirmwareArtifactReader {
1232
+ open(input: {
1233
+ artifactRef: string;
1234
+ }): Promise<{
1235
+ readerId: string;
1236
+ size: number;
1237
+ }>;
1238
+ read(input: {
1239
+ readerId: string;
1240
+ offset: number;
1241
+ length: number;
1242
+ }): Promise<{
1243
+ data: ArrayBuffer;
1244
+ bytesRead: number;
1245
+ eof: boolean;
1246
+ }>;
1247
+ close(input: {
1248
+ readerId: string;
1249
+ }): Promise<void>;
1250
+ }
1251
+ interface FirmwareUpdateHostBinding {
1252
+ artifactReader: FirmwareArtifactReader;
1253
+ }
995
1254
  interface FirmwareUpdateBinaryParams {
996
1255
  binary: ArrayBuffer;
997
1256
  updateType: IUpdateType;
998
1257
  }
1258
+ interface FirmwareUpdateArtifactParams {
1259
+ preparedPlan: FirmwareUpdatePreparedPlan;
1260
+ hostBindingGeneration: number;
1261
+ artifact: FirmwareArtifactReference;
1262
+ resourceArtifact?: FirmwareArtifactReference;
1263
+ resourceEntries?: Array<{
1264
+ entryName: string;
1265
+ artifact: FirmwareArtifactReference;
1266
+ }>;
1267
+ updateType: IUpdateType;
1268
+ forcedUpdateRes?: boolean;
1269
+ isUpdateBootloader?: boolean;
1270
+ firmwareType?: EFirmwareType;
1271
+ }
999
1272
  interface FirmwareUpdateParams {
1000
1273
  version?: number[];
1001
1274
  updateType: IUpdateType;
@@ -1015,7 +1288,10 @@ type Platform = {
1015
1288
  };
1016
1289
  declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
1017
1290
  declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
1291
+ declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateArtifactParams & Platform>): Response<Messages.Success>;
1018
1292
  interface FirmwareUpdateV3Params {
1293
+ preparedPlan?: FirmwareUpdatePreparedPlan;
1294
+ hostBindingGeneration?: number;
1019
1295
  bleVersion?: number[];
1020
1296
  bleBinary?: ArrayBuffer;
1021
1297
  chunkSize?: number;
@@ -1027,23 +1303,65 @@ interface FirmwareUpdateV3Params {
1027
1303
  forcedUpdateRes?: boolean;
1028
1304
  firmwareType?: EFirmwareType;
1029
1305
  platform: IPlatform;
1306
+ artifactReader?: FirmwareArtifactReader;
1307
+ artifacts?: {
1308
+ ble?: FirmwareArtifactReference;
1309
+ firmware?: FirmwareArtifactReference;
1310
+ bootloader?: FirmwareArtifactReference;
1311
+ resourceEntries?: Array<{
1312
+ entryName: string;
1313
+ artifact: FirmwareArtifactReference;
1314
+ }>;
1315
+ };
1030
1316
  }
1317
+ /**
1318
+ * firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
1319
+ * Except for romloader, each field maps to a target accepted by bootloader.
1320
+ */
1321
+ type FirmwareUpdateV4Target = 'boot' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
1031
1322
  interface FirmwareUpdateV4Params {
1323
+ preparedPlan?: FirmwareUpdatePreparedPlan;
1324
+ hostBindingGeneration?: number;
1032
1325
  platform: IPlatform;
1326
+ expectedDeviceId?: string;
1033
1327
  chunkSize?: number;
1034
1328
  firmwareType?: EFirmwareType;
1329
+ targetsToUpdate?: FirmwareUpdateV4Target[];
1330
+ expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
1331
+ /** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
1035
1332
  romloaderBinary?: ArrayBuffer;
1333
+ /** FW_MGMT_TARGET_BOOTLOADER = 3 */
1036
1334
  bootloaderBinary?: ArrayBuffer;
1335
+ /** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
1037
1336
  applicationP1Binary?: ArrayBuffer;
1337
+ /** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
1038
1338
  applicationP2Binary?: ArrayBuffer;
1339
+ /** FW_MGMT_TARGET_COPROCESSOR = 6 */
1039
1340
  coprocessorBinary?: ArrayBuffer;
1341
+ /** FW_MGMT_TARGET_SE01-04 = 7-10 */
1040
1342
  se01Binary?: ArrayBuffer;
1041
1343
  se02Binary?: ArrayBuffer;
1042
1344
  se03Binary?: ArrayBuffer;
1043
1345
  se04Binary?: ArrayBuffer;
1044
- resourceBinaries?: ArrayBuffer[];
1045
1346
  forcedUpdateRes?: boolean;
1347
+ /**
1348
+ * RESC bundle okpkg files written directly to devicePath through FilesystemFileWrite.
1349
+ * Manual mode installs them without version comparison.
1350
+ */
1351
+ resourceBundleFiles?: Array<{
1352
+ binary: ArrayBuffer;
1353
+ devicePath: string;
1354
+ }>;
1355
+ artifactReader?: FirmwareArtifactReader;
1356
+ componentArtifacts?: Partial<Record<Exclude<FirmwareUpdateV4Target, 'resource'>, FirmwareArtifactReference>>;
1357
+ resourceBundleArtifacts?: Array<{
1358
+ name: string;
1359
+ artifact: FirmwareArtifactReference;
1360
+ }>;
1046
1361
  }
1362
+ declare function registerFirmwareUpdateHostBinding$1(binding: FirmwareUpdateHostBinding): number;
1363
+ declare function unregisterFirmwareUpdateHostBinding$1(generation?: number): boolean;
1364
+ declare function getFirmwareUpdateHostBindingGeneration$1(): number;
1047
1365
  declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
1048
1366
  bleVersion: string;
1049
1367
  firmwareVersion: string;
@@ -1055,6 +1373,152 @@ declare function firmwareUpdateV4(connectId: string | undefined, params: Params<
1055
1373
  bootloaderVersion: string;
1056
1374
  }>;
1057
1375
 
1376
+ type FirmwareRelease$2 = {
1377
+ shouldUpdate?: boolean;
1378
+ status: IDeviceFirmwareStatus;
1379
+ changelog?: {
1380
+ 'zh-CN': string;
1381
+ 'en-US': string;
1382
+ }[];
1383
+ release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo | IFirmwareReleaseInfo;
1384
+ bootloaderMode?: boolean;
1385
+ };
1386
+ type ProtocolV2FirmwareComponentReleaseStatus = 'valid' | 'outdated' | 'unknown' | 'unsupported';
1387
+ type ProtocolV2FirmwareReleaseStatus = 'unavailable' | 'valid' | 'unknown' | 'outdated' | 'required';
1388
+ type ProtocolV2FirmwareComponentRelease = {
1389
+ configKey: string;
1390
+ componentTarget: IProtocolV2FirmwareComponentTarget;
1391
+ updateTarget: FirmwareUpdateV4Target | null;
1392
+ currentVersion: string | null;
1393
+ targetVersion: string | null;
1394
+ status: ProtocolV2FirmwareComponentReleaseStatus;
1395
+ required: boolean;
1396
+ };
1397
+ type AllFirmwareRelease = {
1398
+ firmware: FirmwareRelease$2;
1399
+ ble: FirmwareRelease$2;
1400
+ bootloader?: FirmwareRelease$2;
1401
+ bridge?: FirmwareRelease$2;
1402
+ features?: Features;
1403
+ protocol?: 'V1' | 'V2';
1404
+ deviceType?: 'pro2';
1405
+ firmwareType?: EFirmwareType;
1406
+ status?: ProtocolV2FirmwareReleaseStatus;
1407
+ hasUpgrade?: boolean;
1408
+ required?: boolean;
1409
+ currentVersions?: DeviceStateVersions;
1410
+ components?: ProtocolV2FirmwareComponentRelease[];
1411
+ targetsToUpdate?: FirmwareUpdateV4Target[];
1412
+ release?: IFirmwareReleaseInfo;
1413
+ firmwareUpdatePlan?: FirmwareUpdatePlan;
1414
+ };
1415
+ type CheckAllFirmwareReleaseParams = {
1416
+ checkBridgeRelease?: boolean;
1417
+ firmwareType?: EFirmwareType;
1418
+ platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
1419
+ forceUpdateTargets?: FirmwareUpdatePlanForceTarget[];
1420
+ };
1421
+ declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
1422
+
1423
+ type CheckFirmwareTypeAvailableParams = {
1424
+ deviceType: EDeviceType;
1425
+ firmwareType: EFirmwareType;
1426
+ };
1427
+ declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
1428
+
1429
+ declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
1430
+
1431
+ /**
1432
+ * @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
1433
+ */
1434
+ declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
1435
+
1436
+ /**
1437
+ * @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
1438
+ */
1439
+ declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
1440
+
1441
+ type GetPassphraseStateParams = CommonParams;
1442
+ /**
1443
+ * Compatibility wallet-state API for existing App integrations.
1444
+ *
1445
+ * Protocol V1 keeps its parameterless firmware flow. Protocol V2 maps the existing
1446
+ * `useEmptyPassphrase` and `initSession` intent to the device-only wallet-session flow.
1447
+ * New integrations should prefer `openWalletSession` for explicit wallet intent.
1448
+ */
1449
+ declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
1450
+
1451
+ declare const OpenWalletSessionMode: {
1452
+ readonly Standard: "standard";
1453
+ readonly SelectHidden: "select-hidden";
1454
+ readonly ResumeHidden: "resume-hidden";
1455
+ };
1456
+ type OpenWalletSessionModeValue = (typeof OpenWalletSessionMode)[keyof typeof OpenWalletSessionMode];
1457
+ type OpenWalletSessionParams = {
1458
+ mode: typeof OpenWalletSessionMode.Standard;
1459
+ deviceId?: never;
1460
+ passphraseState?: never;
1461
+ } | {
1462
+ mode: typeof OpenWalletSessionMode.SelectHidden;
1463
+ deviceId?: never;
1464
+ passphraseState?: never;
1465
+ } | {
1466
+ mode: typeof OpenWalletSessionMode.ResumeHidden;
1467
+ deviceId: string;
1468
+ passphraseState: string;
1469
+ };
1470
+ type OpenWalletSessionPayloadBase = {
1471
+ protocol: 'V1' | 'V2';
1472
+ deviceId: string;
1473
+ resumed: boolean;
1474
+ };
1475
+ type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
1476
+ walletType: 'standard';
1477
+ passphraseState: null;
1478
+ } | {
1479
+ walletType: 'hidden';
1480
+ passphraseState: string;
1481
+ });
1482
+ /**
1483
+ * Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
1484
+ * Protocol V1/V2 API.
1485
+ */
1486
+ declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
1487
+
1488
+ type FirmwareRelease$1 = {
1489
+ status: IDeviceFirmwareStatus;
1490
+ changelog: {
1491
+ 'en-US': string;
1492
+ 'zh-CN': string;
1493
+ }[];
1494
+ release: IFirmwareReleaseInfo;
1495
+ bootloaderMode: boolean;
1496
+ };
1497
+ type CheckFirmwareReleaseParams = {
1498
+ firmwareType?: EFirmwareType;
1499
+ };
1500
+ declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
1501
+
1502
+ type BleFirmwareRelease = {
1503
+ status: IDeviceBLEFirmwareStatus;
1504
+ changelog: {
1505
+ 'zh-CN': string;
1506
+ 'en-US': string;
1507
+ }[];
1508
+ release: IBLEFirmwareReleaseInfo;
1509
+ bootloaderMode: boolean;
1510
+ };
1511
+ declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
1512
+
1513
+ interface FirmwareUpdateCapabilities {
1514
+ planSchemaVersion: 2;
1515
+ preparedPlanSchemaVersion: 2;
1516
+ hostBindingProtocolVersion: 2;
1517
+ manifestModes: Array<'external-only' | 'sdk-managed'>;
1518
+ supportsArtifactReader: true;
1519
+ }
1520
+ declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
1521
+
1058
1522
  declare function promptWebDeviceAccess(options?: {
1059
1523
  deviceSerialNumberFromUI?: string;
1060
1524
  }): Response<{
@@ -1114,16 +1578,40 @@ type DeviceSettingsParams = {
1114
1578
  language?: string;
1115
1579
  label?: string;
1116
1580
  usePassphrase?: boolean;
1581
+ /** Protocol V1 only. */
1117
1582
  homescreen?: string;
1583
+ /** Protocol V1 only. */
1118
1584
  passphraseSource?: number;
1119
1585
  autoLockDelayMs?: number;
1586
+ /** Protocol V1 only. */
1120
1587
  displayRotation?: number;
1588
+ /** Protocol V1 only. */
1121
1589
  passphraseAlwaysOnDevice?: boolean;
1122
- safetyChecks?: SafetyCheckLevel;
1590
+ /** Protocol V1 only. Uses Enum_SafetyCheckLevel numeric values. */
1591
+ safetyChecks?: Enum_SafetyCheckLevel;
1592
+ /** Protocol V1 only; the current Protocol V2 schema has no matching field. */
1123
1593
  experimentalFeatures?: boolean;
1124
1594
  autoShutdownDelayMs?: number;
1595
+ /** Protocol V1 only; opens the legacy device-side brightness flow. */
1125
1596
  changeBrightness?: boolean;
1597
+ /** Protocol V2 only. */
1598
+ brightness?: number;
1126
1599
  hapticFeedback?: boolean;
1600
+ bluetoothEnabled?: boolean;
1601
+ /** Protocol V2 only; changed through an on-device confirmation page. */
1602
+ airgapMode?: boolean;
1603
+ /** Protocol V2 only. */
1604
+ animationEnabled?: boolean;
1605
+ /** Protocol V2 only. */
1606
+ tapToWake?: boolean;
1607
+ /** Protocol V2 only. */
1608
+ deviceNameDisplayEnabled?: boolean;
1609
+ /** Protocol V2 only. */
1610
+ fidoEnabled?: boolean;
1611
+ /** Protocol V2 only. */
1612
+ usbLockEnabled?: boolean;
1613
+ /** Protocol V2 only. */
1614
+ randomKeypad?: boolean;
1127
1615
  };
1128
1616
  declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
1129
1617
 
@@ -1149,7 +1637,7 @@ type DeviceUploadResourceResponse = Success$1 & {
1149
1637
  declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
1150
1638
 
1151
1639
  type DeviceSupportFeatures = SupportFeatures & {
1152
- device: Device | null;
1640
+ device: Device$1 | null;
1153
1641
  };
1154
1642
  declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
1155
1643
 
@@ -1158,14 +1646,18 @@ declare function deviceFullyUploadResource(connectId: string, params: CommonPara
1158
1646
  }): Response<Success$1>;
1159
1647
 
1160
1648
  type DeviceUpdateBootloaderParams = {
1649
+ preparedPlan?: FirmwareUpdatePreparedPlan;
1650
+ hostBindingGeneration?: number;
1161
1651
  binary?: ArrayBuffer;
1652
+ artifact?: FirmwareArtifactReference;
1653
+ artifactReader?: FirmwareArtifactReader;
1162
1654
  firmwareType?: EFirmwareType;
1163
1655
  };
1164
1656
  declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdateBootloaderParams): Response<Success$1>;
1165
1657
 
1166
1658
  declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
1167
1659
 
1168
- declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features$1>;
1660
+ declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features>;
1169
1661
 
1170
1662
  declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
1171
1663
 
@@ -1369,6 +1861,9 @@ type AllNetworkAddressParams = {
1369
1861
  type AllNetworkAddressPayload = {
1370
1862
  address: string;
1371
1863
  pub?: string;
1864
+ /**
1865
+ * @deprecated Use `pub` instead.
1866
+ */
1372
1867
  publicKey?: string;
1373
1868
  npub?: string;
1374
1869
  } | {
@@ -1434,6 +1929,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
1434
1929
  type EVMPublicKey = {
1435
1930
  path: string;
1436
1931
  pub: string;
1932
+ /**
1933
+ * @deprecated Use `pub` instead.
1934
+ */
1437
1935
  publicKey?: string;
1438
1936
  } & EthereumPublicKey;
1439
1937
  type EVMGetPublicKeyParams = {
@@ -2217,6 +2715,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
2217
2715
  type AptosAddress = {
2218
2716
  path: string;
2219
2717
  pub?: string;
2718
+ /**
2719
+ * @deprecated Use `pub` instead.
2720
+ */
2220
2721
  publicKey?: string;
2221
2722
  } & AptosAddress$1;
2222
2723
  type AptosGetAddressParams = {
@@ -2231,6 +2732,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
2231
2732
  type AptosPublicKey = {
2232
2733
  path: string;
2233
2734
  pub: string;
2735
+ /**
2736
+ * @deprecated Use `pub` instead.
2737
+ */
2234
2738
  publicKey?: string;
2235
2739
  };
2236
2740
  type AptosGetPublicKeyParams = {
@@ -2315,6 +2819,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
2315
2819
  type CosmosPublicKey = {
2316
2820
  path: string;
2317
2821
  pub: string;
2822
+ /**
2823
+ * @deprecated Use `pub` instead.
2824
+ */
2318
2825
  publicKey?: string;
2319
2826
  };
2320
2827
  type CosmosGetPublicKeyParams = {
@@ -2339,6 +2846,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
2339
2846
  type XrpAddress = {
2340
2847
  path: string;
2341
2848
  pub?: string;
2849
+ /**
2850
+ * @deprecated Use `pub` instead.
2851
+ */
2342
2852
  publicKey?: string;
2343
2853
  address: string;
2344
2854
  };
@@ -2372,6 +2882,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
2372
2882
  type SuiAddress = {
2373
2883
  path: string;
2374
2884
  pub?: string;
2885
+ /**
2886
+ * @deprecated Use `pub` instead.
2887
+ */
2375
2888
  publicKey?: string;
2376
2889
  } & SuiAddress$1;
2377
2890
  type SuiGetAddressParams = {
@@ -2386,6 +2899,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
2386
2899
  type SuiPublicKey = {
2387
2900
  path: string;
2388
2901
  pub: string;
2902
+ /**
2903
+ * @deprecated Use `pub` instead.
2904
+ */
2389
2905
  publicKey?: string;
2390
2906
  };
2391
2907
  type SuiGetPublicKeyParams = {
@@ -2415,6 +2931,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
2415
2931
  type CardanoGetAddressMethodParams = {
2416
2932
  addressParameters: CardanoAddressParameters;
2417
2933
  networkId: number;
2934
+ /**
2935
+ * Testnet cip34:0-1097911063
2936
+ * Mainnet cip34:1-764824073
2937
+ */
2418
2938
  protocolMagic: number;
2419
2939
  derivationType: number;
2420
2940
  address?: string;
@@ -2476,6 +2996,10 @@ type CardanoSignMessageMethodParams = {
2476
2996
  derivationType: number;
2477
2997
  networkId: number;
2478
2998
  addressType?: Messages.CardanoAddressType;
2999
+ /**
3000
+ * Testnet cip34:0-1097911063
3001
+ * Mainnet cip34:1-764824073
3002
+ */
2479
3003
  protocolMagic?: number;
2480
3004
  };
2481
3005
  declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
@@ -2509,6 +3033,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
2509
3033
  type PolkadotAddress = {
2510
3034
  path: string;
2511
3035
  pub: string;
3036
+ /**
3037
+ * @deprecated Use `pub` instead.
3038
+ */
2512
3039
  publicKey?: string;
2513
3040
  } & PolkadotAddress$1;
2514
3041
  type PolkadotGetAddressParams = {
@@ -2567,23 +3094,61 @@ type KaspaSignInputParams = {
2567
3094
  sequenceNumber: number | string;
2568
3095
  output: {
2569
3096
  satoshis: number | string;
2570
- script: string;
3097
+ script?: string;
2571
3098
  };
2572
3099
  sigOpCount?: number;
2573
3100
  };
2574
3101
  type KaspaSignOutputParams = {
2575
3102
  satoshis: number | string;
3103
+ address?: string;
3104
+ addressN?: string | number[];
3105
+ script?: string;
3106
+ scriptVersion?: number;
3107
+ };
3108
+ type KaspaStreamingSignInputParams = Omit<KaspaSignInputParams, 'output'> & {
3109
+ output: {
3110
+ satoshis: number | string;
3111
+ script?: string;
3112
+ };
3113
+ };
3114
+ type KaspaStreamingSignOutputParams = {
3115
+ satoshis: number | string;
3116
+ address?: string;
3117
+ addressN?: string | number[];
3118
+ script?: string;
3119
+ scriptVersion?: number;
3120
+ };
3121
+ type KaspaRefTransactionInput = {
3122
+ prevTxId: string;
3123
+ outputIndex: number;
3124
+ sequenceNumber: number | string;
3125
+ };
3126
+ type KaspaRefTransactionOutput = {
3127
+ satoshis: number | string;
3128
+ scriptVersion?: number;
2576
3129
  script: string;
2577
- scriptVersion: number;
3130
+ };
3131
+ type KaspaRefTransaction = {
3132
+ txId: string;
3133
+ version: number;
3134
+ inputs: KaspaRefTransactionInput[];
3135
+ outputs: KaspaRefTransactionOutput[];
3136
+ lockTime?: number | string;
3137
+ subNetworkID?: string;
3138
+ gas?: number | string;
3139
+ payload?: string;
2578
3140
  };
2579
3141
  type KaspaSignTransactionParams = {
2580
3142
  version: number;
2581
- inputs: KaspaSignInputParams[];
2582
- outputs: KaspaSignOutputParams[];
3143
+ inputs: Array<KaspaSignInputParams | KaspaStreamingSignInputParams>;
3144
+ outputs: Array<KaspaSignOutputParams | KaspaStreamingSignOutputParams>;
2583
3145
  lockTime: number | string;
2584
3146
  sigHashType?: SignatureType;
2585
3147
  sigOpCount?: number;
2586
3148
  subNetworkID?: string;
3149
+ payload?: string;
3150
+ gas?: number | string;
3151
+ refTxs?: KaspaRefTransaction[];
2587
3152
  scheme?: string;
2588
3153
  prefix?: string;
2589
3154
  useTweak?: boolean;
@@ -2628,6 +3193,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
2628
3193
  type NostrPublicKey = {
2629
3194
  npub?: string;
2630
3195
  pub?: string;
3196
+ /**
3197
+ * @deprecated Use `pub` instead.
3198
+ */
2631
3199
  publicKey?: string;
2632
3200
  path: string;
2633
3201
  };
@@ -2724,6 +3292,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
2724
3292
 
2725
3293
  interface LnurlAuth {
2726
3294
  pub?: string;
3295
+ /**
3296
+ * @deprecated Use `pub` instead.
3297
+ */
2727
3298
  publickey?: string;
2728
3299
  path?: string;
2729
3300
  signature?: string;
@@ -2800,6 +3371,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
2800
3371
  type TonAddress = {
2801
3372
  path: string;
2802
3373
  pub: string;
3374
+ /**
3375
+ * @deprecated Use `pub` instead.
3376
+ */
2803
3377
  publicKey?: string;
2804
3378
  address: string;
2805
3379
  };
@@ -2911,6 +3485,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
2911
3485
 
2912
3486
  type AlephiumAddress = {
2913
3487
  path: string;
3488
+ /**
3489
+ * @deprecated Use `pub` instead.
3490
+ */
2914
3491
  publicKey?: string;
2915
3492
  pub?: string;
2916
3493
  address: string;
@@ -3013,12 +3590,15 @@ type NeoSignedTx = {
3013
3590
  declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
3014
3591
 
3015
3592
  type CoreApi = {
3593
+ /**
3594
+ * Inject function
3595
+ */
3016
3596
  init: typeof init;
3017
3597
  on: typeof on;
3018
3598
  off: typeof off;
3019
3599
  emit: (event: string, ...args: any[]) => void;
3020
3600
  removeAllListeners: typeof removeAllListeners;
3021
- dispose: () => void;
3601
+ dispose: () => void | Promise<void>;
3022
3602
  call: (params: any) => Promise<any>;
3023
3603
  uiResponse: typeof uiResponse;
3024
3604
  cancel: (connectId?: string) => void;
@@ -3027,19 +3607,31 @@ type CoreApi = {
3027
3607
  success: boolean;
3028
3608
  }>;
3029
3609
  getLogs: typeof getLogs;
3610
+ clearSessionCache: typeof clearSessionCache;
3611
+ /**
3612
+ * Test function
3613
+ */
3030
3614
  testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
3615
+ testProtocolV2Ping: typeof testProtocolV2Ping;
3031
3616
  preInitialize: typeof preInitialize;
3617
+ /**
3618
+ * Core function
3619
+ */
3032
3620
  checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
3033
3621
  checkBridgeStatus: typeof checkBridgeStatus;
3034
3622
  checkBridgeRelease: typeof checkBridgeRelease;
3035
3623
  checkBootloaderRelease: typeof checkBootloaderRelease;
3036
3624
  checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
3625
+ /**
3626
+ * Device function
3627
+ */
3037
3628
  searchDevices: typeof searchDevices;
3038
3629
  promptWebDeviceAccess: typeof promptWebDeviceAccess;
3039
3630
  getFeatures: typeof getFeatures;
3040
- getDeviceInfo: typeof getDeviceInfo;
3631
+ getDeviceState: typeof getDeviceState;
3041
3632
  getOnekeyFeatures: typeof getOnekeyFeatures;
3042
3633
  getPassphraseState: typeof getPassphraseState;
3634
+ openWalletSession: typeof openWalletSession;
3043
3635
  deviceBackup: typeof deviceBackup;
3044
3636
  deviceChangePin: typeof deviceChangePin;
3045
3637
  deviceFlags: typeof deviceFlags;
@@ -3066,34 +3658,28 @@ type CoreApi = {
3066
3658
  firmwareUpdateV2: typeof firmwareUpdateV2;
3067
3659
  firmwareUpdateV3: typeof firmwareUpdateV3;
3068
3660
  firmwareUpdateV4: typeof firmwareUpdateV4;
3661
+ registerFirmwareUpdateHostBinding: typeof registerFirmwareUpdateHostBinding$1;
3662
+ unregisterFirmwareUpdateHostBinding: typeof unregisterFirmwareUpdateHostBinding$1;
3663
+ getFirmwareUpdateHostBindingGeneration: typeof getFirmwareUpdateHostBindingGeneration$1;
3664
+ getFirmwareUpdateCapabilities: typeof getFirmwareUpdateCapabilities;
3665
+ prepareFirmwareUpdatePlan: typeof prepareFirmwareUpdatePlan;
3666
+ validateFirmwareUpdatePreparedPlan: typeof validateFirmwareUpdatePreparedPlan;
3069
3667
  cipherKeyValue: typeof cipherKeyValue;
3070
- protocolInfoRequest: typeof protocolInfoRequest;
3071
- ping: typeof ping;
3668
+ /**
3669
+ * Pro2 business API
3670
+ */
3072
3671
  deviceReboot: typeof deviceReboot;
3073
- deviceInfoGet: typeof deviceInfoGet;
3074
- deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
3075
- deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
3076
- deviceFactoryInfoSet: typeof deviceFactoryInfoSet;
3077
- deviceFactoryInfoGet: typeof deviceFactoryInfoGet;
3078
- filesystemPermissionFix: typeof filesystemPermissionFix;
3079
- fileRead: typeof fileRead;
3080
- fileWrite: typeof fileWrite;
3081
- fileDelete: typeof fileDelete;
3082
- dirList: typeof dirList;
3083
- dirMake: typeof dirMake;
3084
- dirRemove: typeof dirRemove;
3085
- pathInfo: typeof pathInfo;
3086
- filesystemFileRead: typeof filesystemFileRead;
3087
- filesystemFileWrite: typeof filesystemFileWrite;
3088
- filesystemFileDelete: typeof filesystemFileDelete;
3089
- filesystemDirList: typeof filesystemDirList;
3090
- filesystemDirMake: typeof filesystemDirMake;
3091
- filesystemDirRemove: typeof filesystemDirRemove;
3092
- filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
3093
- filesystemFormat: typeof filesystemFormat;
3094
- filesystemDiskControl: typeof filesystemDiskControl;
3672
+ deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
3673
+ deviceUploadWallpaper: typeof deviceUploadWallpaper;
3674
+ uploadPortfolio: typeof uploadPortfolio;
3675
+ /**
3676
+ * All network function
3677
+ */
3095
3678
  allNetworkGetAddress: typeof allNetworkGetAddress;
3096
3679
  allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
3680
+ /**
3681
+ * EVM function
3682
+ */
3097
3683
  evmGetAddress: typeof evmGetAddress;
3098
3684
  evmGetPublicKey: typeof evmGetPublicKey;
3099
3685
  evmSignMessage: typeof evmSignMessage;
@@ -3101,86 +3687,167 @@ type CoreApi = {
3101
3687
  evmSignTransaction: typeof evmSignTransaction;
3102
3688
  evmSignTypedData: typeof evmSignTypedData;
3103
3689
  evmVerifyMessage: typeof evmVerifyMessage;
3690
+ /**
3691
+ * BTC function
3692
+ */
3104
3693
  btcGetAddress: typeof btcGetAddress;
3105
3694
  btcGetPublicKey: typeof btcGetPublicKey;
3106
3695
  btcSignMessage: typeof btcSignMessage;
3107
3696
  btcSignPsbt: typeof btcSignPsbt;
3108
3697
  btcSignTransaction: typeof btcSignTransaction;
3109
3698
  btcVerifyMessage: typeof btcVerifyMessage;
3699
+ /**
3700
+ * Starcoin function
3701
+ */
3110
3702
  starcoinGetAddress: typeof starcoinGetAddress;
3111
3703
  starcoinGetPublicKey: typeof starcoinGetPublicKey;
3112
3704
  starcoinSignMessage: typeof starcoinSignMessage;
3113
3705
  starcoinSignTransaction: typeof starcoinSignTransaction;
3114
3706
  starcoinVerifyMessage: typeof starcoinVerifyMessage;
3707
+ /**
3708
+ * Nem function
3709
+ */
3115
3710
  nemGetAddress: typeof nemGetAddress;
3116
3711
  nemSignTransaction: typeof nemSignTransaction;
3712
+ /**
3713
+ * Solana function
3714
+ */
3117
3715
  solGetAddress: typeof solGetAddress;
3118
3716
  solSignTransaction: typeof solSignTransaction;
3119
3717
  solSignOffchainMessage: typeof solSignOffchainMessage;
3120
3718
  solSignMessage: typeof solSignMessage;
3719
+ /**
3720
+ * Stellar function
3721
+ */
3121
3722
  stellarGetAddress: typeof stellarGetAddress;
3122
3723
  stellarSignTransaction: typeof stellarSignTransaction;
3724
+ /**
3725
+ * Tron function
3726
+ */
3123
3727
  tronGetAddress: typeof tronGetAddress;
3124
3728
  tronSignMessage: typeof tronSignMessage;
3125
3729
  tronSignTransaction: typeof tronSignTransaction;
3730
+ /**
3731
+ * Conflux function
3732
+ */
3126
3733
  confluxGetAddress: typeof confluxGetAddress;
3127
3734
  confluxSignMessage: typeof confluxSignMessage;
3128
3735
  confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
3129
3736
  confluxSignTransaction: typeof confluxSignTransaction;
3737
+ /**
3738
+ * Near function
3739
+ */
3130
3740
  nearGetAddress: typeof nearGetAddress;
3131
3741
  nearSignTransaction: typeof nearSignTransaction;
3742
+ /**
3743
+ * Aptos function
3744
+ */
3132
3745
  aptosGetAddress: typeof aptosGetAddress;
3133
3746
  aptosGetPublicKey: typeof aptosGetPublicKey;
3134
3747
  aptosSignMessage: typeof aptosSignMessage;
3135
3748
  aptosSignInMessage: typeof aptosSignInMessage;
3136
3749
  aptosSignTransaction: typeof aptosSignTransaction;
3750
+ /**
3751
+ * Algo function
3752
+ */
3137
3753
  algoGetAddress: typeof algoGetAddress;
3138
3754
  algoSignTransaction: typeof algoSignTransaction;
3755
+ /**
3756
+ * Cosmos function
3757
+ */
3139
3758
  cosmosGetAddress: typeof cosmosGetAddress;
3140
3759
  cosmosGetPublicKey: typeof cosmosGetPublicKey;
3141
3760
  cosmosSignTransaction: typeof cosmosSignTransaction;
3761
+ /**
3762
+ * XRP function
3763
+ */
3142
3764
  xrpGetAddress: typeof xrpGetAddress;
3143
3765
  xrpSignTransaction: typeof xrpSignTransaction;
3766
+ /**
3767
+ * SUI function
3768
+ */
3144
3769
  suiGetAddress: typeof suiGetAddress;
3145
3770
  suiGetPublicKey: typeof suiGetPublicKey;
3146
3771
  suiSignMessage: typeof suiSignMessage;
3147
3772
  suiSignTransaction: typeof suiSignTransaction;
3773
+ /**
3774
+ * Cardano function
3775
+ */
3148
3776
  cardanoGetAddress: typeof cardanoGetAddress;
3149
3777
  cardanoGetPublicKey: typeof cardanoGetPublicKey;
3150
3778
  cardanoSignTransaction: typeof cardanoSignTransaction;
3151
3779
  cardanoSignMessage: typeof cardanoSignMessage;
3780
+ /**
3781
+ * Filecoin function
3782
+ */
3152
3783
  filecoinGetAddress: typeof filecoinGetAddress;
3153
3784
  filecoinSignTransaction: typeof filecoinSignTransaction;
3785
+ /**
3786
+ * Polkadot function
3787
+ */
3154
3788
  polkadotGetAddress: typeof polkadotGetAddress;
3155
3789
  polkadotSignTransaction: typeof polkadotSignTransaction;
3790
+ /**
3791
+ * Kaspa function
3792
+ */
3156
3793
  kaspaGetAddress: typeof kaspaGetAddress;
3157
3794
  kaspaSignTransaction: typeof kaspaSignTransaction;
3795
+ /**
3796
+ * nexa function
3797
+ */
3158
3798
  nexaGetAddress: typeof nexaGetAddress;
3159
3799
  nexaSignTransaction: typeof nexaSignTransaction;
3800
+ /**
3801
+ * Nostr function
3802
+ */
3160
3803
  nostrGetPublicKey: typeof nostrGetPublicKey;
3161
3804
  nostrSignEvent: typeof nostrSignEvent;
3162
3805
  nostrEncryptMessage: typeof nostrEncryptMessage;
3163
3806
  nostrDecryptMessage: typeof nostrDecryptMessage;
3164
3807
  nostrSignSchnorr: typeof nostrSignSchnorr;
3808
+ /**
3809
+ * Lightning Network
3810
+ */
3165
3811
  lnurlAuth: typeof lnurlAuth;
3812
+ /**
3813
+ * Nervos Network
3814
+ */
3166
3815
  nervosGetAddress: typeof nervosGetAddress;
3167
3816
  nervosSignTransaction: typeof nervosSignTransaction;
3817
+ /**
3818
+ * Dnx Network
3819
+ */
3168
3820
  dnxGetAddress: typeof dnxGetAddress;
3169
3821
  dnxSignTransaction: typeof dnxSignTransaction;
3822
+ /**
3823
+ * TON Network
3824
+ */
3170
3825
  tonGetAddress: typeof tonGetAddress;
3171
3826
  tonSignMessage: typeof tonSignMessage;
3172
3827
  tonSignProof: typeof tonSignProof;
3173
3828
  tonSignData: typeof tonSignData;
3829
+ /**
3830
+ * SCDO Network
3831
+ */
3174
3832
  scdoGetAddress: typeof scdoGetAddress;
3175
3833
  scdoSignMessage: typeof scdoSignMessage;
3176
3834
  scdoSignTransaction: typeof scdoSignTransaction;
3835
+ /**
3836
+ * Alephium Network
3837
+ */
3177
3838
  alephiumGetAddress: typeof alephiumGetAddress;
3178
3839
  alephiumSignMessage: typeof alephiumSignMessage;
3179
3840
  alephiumSignTransaction: typeof alephiumSignTransaction;
3841
+ /**
3842
+ * Benfen Network
3843
+ */
3180
3844
  benfenGetAddress: typeof benfenGetAddress;
3181
3845
  benfenGetPublicKey: typeof benfenGetPublicKey;
3182
3846
  benfenSignTransaction: typeof benfenSignTransaction;
3183
3847
  benfenSignMessage: typeof benfenSignMessage;
3848
+ /**
3849
+ * Neo Network
3850
+ */
3184
3851
  neoGetAddress: typeof neoGetAddress;
3185
3852
  neoSignTransaction: typeof neoSignTransaction;
3186
3853
  };
@@ -3255,11 +3922,13 @@ declare const DEVICE: {
3255
3922
  readonly PIN: "pin";
3256
3923
  readonly PASSPHRASE: "passphrase";
3257
3924
  readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
3925
+ readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
3258
3926
  readonly WORD: "word";
3259
3927
  readonly SUPPORT_FEATURES: "support_features";
3260
3928
  readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
3261
3929
  readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
3262
3930
  readonly FEATURES: "features";
3931
+ readonly STATE: "state";
3263
3932
  };
3264
3933
  interface DeviceConnnectRequest {
3265
3934
  type: typeof DEVICE.CONNECT;
@@ -3278,6 +3947,10 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
3278
3947
  }
3279
3948
  type PassphraseRequestPayload = {
3280
3949
  existsAttachPinUser?: boolean;
3950
+ deviceOnly?: boolean;
3951
+ source?: 'wallet-session-coordinator';
3952
+ reason?: 'open-wallet' | 'session-recovery';
3953
+ expectedPassphraseState?: string;
3281
3954
  };
3282
3955
  interface DeviceButtonRequest {
3283
3956
  type: typeof DEVICE.BUTTON;
@@ -3290,6 +3963,10 @@ interface DeviceSendFeatures {
3290
3963
  type: typeof DEVICE.FEATURES;
3291
3964
  payload: DeviceFeaturesPayload;
3292
3965
  }
3966
+ interface DeviceSendState {
3967
+ type: typeof DEVICE.STATE;
3968
+ payload: DeviceStateEvent;
3969
+ }
3293
3970
  type DeviceSupportFeaturesPayload = SupportFeatures & {
3294
3971
  device: KnownDevice | null;
3295
3972
  };
@@ -3297,7 +3974,7 @@ interface DeviceSendSupportFeatures {
3297
3974
  type: typeof DEVICE.SUPPORT_FEATURES;
3298
3975
  payload: DeviceSupportFeaturesPayload;
3299
3976
  }
3300
- type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
3977
+ type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
3301
3978
  type DeviceEventMessage = DeviceEvent & {
3302
3979
  event: typeof DEVICE_EVENT;
3303
3980
  };
@@ -3338,6 +4015,17 @@ declare const UI_REQUEST: {
3338
4015
  readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
3339
4016
  readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
3340
4017
  };
4018
+ type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
4019
+ type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
4020
+ type ProtocolV2UiEventMetadata = {
4021
+ source?: ProtocolV2UiEventSource;
4022
+ reason?: string;
4023
+ deviceOnly?: boolean;
4024
+ completion?: ProtocolV2UiCompletion;
4025
+ method?: string;
4026
+ page?: string | number;
4027
+ operation?: string;
4028
+ };
3341
4029
  interface UiRequestWithoutPayload {
3342
4030
  type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.BLUETOOTH_UNSUPPORTED | typeof UI_REQUEST.BLUETOOTH_POWERED_OFF | typeof UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION | typeof UI_REQUEST.FIRMWARE_PROCESSING | typeof UI_REQUEST.WEB_DEVICE_PROMPT_ACCESS_PERMISSION;
3343
4031
  payload?: typeof undefined;
@@ -3350,40 +4038,46 @@ interface UiRequestFirmwareProgressing {
3350
4038
  }
3351
4039
  type UiRequestDeviceAction = {
3352
4040
  type: typeof UI_REQUEST.REQUEST_PIN;
3353
- payload: {
3354
- device: Device;
4041
+ payload: ProtocolV2UiEventMetadata & {
4042
+ device: Device$1;
3355
4043
  type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
3356
4044
  };
3357
4045
  };
3358
4046
  interface UiRequestButton {
3359
4047
  type: typeof UI_REQUEST.REQUEST_BUTTON;
3360
- payload: DeviceButtonRequest['payload'];
4048
+ payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
3361
4049
  }
3362
4050
  interface UiRequestPassphrase {
3363
4051
  type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
3364
4052
  payload: {
3365
- device: Device;
4053
+ device: Device$1;
3366
4054
  passphraseState?: string;
3367
4055
  existsAttachPinUser?: boolean;
4056
+ deviceOnly?: boolean;
4057
+ source?: 'wallet-session-coordinator';
4058
+ reason?: 'open-wallet' | 'session-recovery';
4059
+ expectedPassphraseState?: string;
3368
4060
  };
3369
4061
  }
3370
4062
  interface UiRequestPassphraseOnDevice {
3371
4063
  type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
3372
4064
  payload: {
3373
- device: Device;
4065
+ device: Device$1;
3374
4066
  passphraseState?: string;
4067
+ source?: 'wallet-session-coordinator';
4068
+ reason?: 'open-wallet' | 'session-recovery';
3375
4069
  };
3376
4070
  }
3377
4071
  interface UiRequestSelectDeviceInBootloaderForWebDevice {
3378
4072
  type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
3379
4073
  payload: {
3380
- device: Device;
4074
+ device: Device$1;
3381
4075
  };
3382
4076
  }
3383
4077
  interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
3384
4078
  type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
3385
4079
  payload: {
3386
- device: Device;
4080
+ device: Device$1;
3387
4081
  };
3388
4082
  }
3389
4083
  interface FirmwareProcessing {
@@ -3396,7 +4090,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
3396
4090
  interface FirmwareProgress {
3397
4091
  type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
3398
4092
  payload: {
3399
- device: Device;
4093
+ device: Device$1;
3400
4094
  progress: number;
3401
4095
  progressType: IFirmwareUpdateProgressType;
3402
4096
  transferredBytes?: number;
@@ -3408,7 +4102,7 @@ interface FirmwareProgress {
3408
4102
  interface FirmwareTip {
3409
4103
  type: typeof UI_REQUEST.FIRMWARE_TIP;
3410
4104
  payload: {
3411
- device: Device;
4105
+ device: Device$1;
3412
4106
  data: {
3413
4107
  message: string;
3414
4108
  };
@@ -3427,7 +4121,7 @@ interface DeviceProgress {
3427
4121
  interface PreviousAddressResult {
3428
4122
  type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
3429
4123
  payload: {
3430
- device: Device;
4124
+ device: Device$1;
3431
4125
  data: {
3432
4126
  address?: string;
3433
4127
  path?: string;
@@ -3680,10 +4374,12 @@ type UiPromiseResponse = UiResponseEvent | {
3680
4374
  };
3681
4375
  type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
3682
4376
  type: T;
3683
- }>, T, Device$1>;
4377
+ }>, T, Device>;
3684
4378
 
3685
4379
  declare const LogBlockEvent: Set<string>;
3686
4380
  declare function getLogBlockLabel(message: unknown): string | undefined;
4381
+ declare function getSafeLogPayload(value: unknown, blockLabel?: string): unknown;
4382
+ declare function formatLogMethodLabel(label: string, methodName?: string): string;
3687
4383
 
3688
4384
  declare const executeCallback: (id: string, ...args: any[]) => void;
3689
4385
  declare const cleanupCallback: (id: string) => void;
@@ -3747,30 +4443,109 @@ declare enum LoggerNames {
3747
4443
  }
3748
4444
  declare const getLogger: (key: LoggerNames) => Log;
3749
4445
 
3750
- declare const httpRequest: (url: string, type: string) => any;
4446
+ type HttpRequestOptions = {
4447
+ /** Additional request headers, such as a byte range for package metadata reads. */
4448
+ headers?: Record<string, string>;
4449
+ /** Axios adapter-defined request timeout retained for existing opt-in callers. */
4450
+ timeoutMs?: number;
4451
+ /** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
4452
+ connectTimeoutMs?: number;
4453
+ /** Maximum idle interval between response-body progress events. */
4454
+ readTimeoutMs?: number;
4455
+ /** Wall-clock deadline across all attempts and retry backoff. */
4456
+ overallTimeoutMs?: number;
4457
+ maxRetries?: number;
4458
+ retryDelayMs?: number;
4459
+ };
4460
+
4461
+ declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
3751
4462
  declare const getTimeStamp: () => number;
3752
4463
 
4464
+ /**
4465
+ * Validates version string
4466
+ * @param {string} version Version string
4467
+ * @returns {boolean} True if version string is valid, false if not
4468
+ */
3753
4469
  declare const isValidVersionString: (version: string) => boolean;
4470
+ /**
4471
+ * Validates a version array
4472
+ * @param {number[]} version Version array
4473
+ * @returns {boolean} True if version array is valid, false if not
4474
+ */
3754
4475
  declare const isValidVersionArray: (version: number[]) => boolean;
4476
+ /**
4477
+ * Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
4478
+ * @param {number[]} version Version array
4479
+ * @returns {number[]} Version array with all positions filled
4480
+ */
3755
4481
  declare const normalizeVersionArray: (version: number[]) => number[];
4482
+ /**
4483
+ * Returns a valid version array from a version string
4484
+ * @param {string} version Version string
4485
+ * @returns {number[]} Version array
4486
+ */
3756
4487
  declare const versionSplit: (version: string) => number[];
4488
+ /**
4489
+ * Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
4490
+ * @param {string | number[]} a Version to compare from
4491
+ * @param {string | number[]} b Version to compare with
4492
+ * @returns {number} Returns 1 if newer, -1 if older and 0 if equal
4493
+ */
3757
4494
  declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
3758
4495
 
3759
- declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"StartSession"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"SetWallpaper"> | TypedResponseMessage<"GetWallpaper"> | TypedResponseMessage<"Wallpaper"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat">;
4496
+ declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"KaspaTxRequestSignature"> | TypedResponseMessage<"KaspaOutpoint"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"OnboardingSetupStatus"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"ViewRawData"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaTxRequest"> | TypedResponseMessage<"KaspaTxAckInput"> | TypedResponseMessage<"KaspaTxAckOutput"> | TypedResponseMessage<"KaspaTxAckPayloadChunk"> | TypedResponseMessage<"KaspaTxAckPrevMeta"> | TypedResponseMessage<"KaspaTxAckPrevInput"> | TypedResponseMessage<"KaspaTxAckPrevOutput"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"EthereumSignTypedDataQR"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"UiAnimationRequest"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceSettingsPageShow"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceMiscUsbMscControl"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"DeviceSessionAskPin"> | TypedResponseMessage<"DeviceSessionAskPassphrase"> | TypedResponseMessage<"DeviceStatusGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"OnboardingStatusGet"> | TypedResponseMessage<"OnboardingStatus"> | TypedResponseMessage<"PortfolioUpdate"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage">;
4497
+
4498
+ type DeviceFeaturesInput = Features | Messages.Features;
3760
4499
 
3761
- declare const getDeviceType: (features?: Features) => IDeviceType;
4500
+ /**
4501
+ * get device type by features
4502
+ */
4503
+ declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
4504
+ /**
4505
+ * get device type by ble name
4506
+ * @param name Ble name
4507
+ */
3762
4508
  declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
3763
- declare const getDeviceBleName: (features?: Features) => string | null;
3764
- declare const getDeviceUUID: (features: Features) => string;
3765
- declare const getDeviceLabel: (features?: Features) => string | null;
3766
- declare const getMethodVersionRange: (features: Features | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
3767
- declare const isMethodVersionRangeUnsupported: (versionRange?: IVersionRange) => boolean;
3768
- declare const getFirmwareType: (features: Features | undefined) => EFirmwareType;
3769
-
3770
- declare const getDeviceFirmwareVersion: (features: Features | undefined) => IVersionArray;
3771
- declare const getDeviceBLEFirmwareVersion: (features: Features) => IVersionArray;
3772
- declare const getDeviceBootloaderVersion: (features: Features | undefined) => IVersionArray;
3773
- declare const getDeviceBoardloaderVersion: (features: Features) => IVersionArray;
4509
+ /**
4510
+ * Get Connected Device ble name by features
4511
+ * @returns
4512
+ */
4513
+ declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
4514
+ /**
4515
+ * Get Connected Device serial number by features
4516
+ */
4517
+ declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
4518
+ /**
4519
+ * @deprecated Use getDeviceSerialNo instead.
4520
+ */
4521
+ declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
4522
+ /**
4523
+ * Get Connected Device label by features
4524
+ */
4525
+ declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
4526
+ /**
4527
+ * Get firmware version range by features
4528
+ * Type has a higher priority than Model
4529
+ */
4530
+ declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
4531
+ declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
4532
+
4533
+ /**
4534
+ * Get Connected Device version by features
4535
+ */
4536
+ declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4537
+ /**
4538
+ * Get Connected Device bootloader version by features
4539
+ */
4540
+ declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4541
+ /**
4542
+ * Get Connected Device boardloader/romloader version by features
4543
+ */
4544
+ declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4545
+ /**
4546
+ * Get Connected Device bluetooth firmware version by features
4547
+ */
4548
+ declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
3774
4549
 
3775
4550
  declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
3776
4551
  type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
@@ -3787,11 +4562,19 @@ declare class DataManager {
3787
4562
  };
3788
4563
  static lastCheckTimestamp: number;
3789
4564
  static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
4565
+ /**
4566
+ * Touch、Pro System UI Resource Update
4567
+ * ** Interval upgrade is not considered **
4568
+ */
3790
4569
  static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
3791
4570
  features: Features;
3792
4571
  forcedUpdateRes?: boolean | undefined;
3793
4572
  firmwareType: EFirmwareType;
3794
4573
  }) => string | undefined;
4574
+ /**
4575
+ * Touch、Pro System full UI Resource Update
4576
+ * ** Interval upgrade is not considered **
4577
+ */
3795
4578
  static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
3796
4579
  static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
3797
4580
  static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
@@ -3814,23 +4597,34 @@ declare class DataManager {
3814
4597
  } | undefined;
3815
4598
  private static enrichFirmwareReleaseInfo;
3816
4599
  static load(settings: ConnectSettings): Promise<void>;
4600
+ private static applyRemoteConfig;
3817
4601
  static updateEnv(newEnv: ConnectSettings['env']): void;
3818
4602
  static checkAndReloadData(): Promise<void>;
3819
4603
  static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
3820
4604
  static getSettings(key?: undefined): ConnectSettings;
3821
4605
  static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
3822
4606
  static isBleConnect: (env: ConnectSettings['env']) => boolean;
4607
+ /** Desktop WebUSB doesn't need browser permission prompt */
3823
4608
  static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
4609
+ /** Browser WebUSB needs permission prompt */
3824
4610
  static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
3825
4611
  }
3826
4612
 
3827
- declare const supportInputPinOnSoftware: (features: Features) => SupportFeatureType;
4613
+ declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
4614
+ /**
4615
+ * Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
4616
+ */
3828
4617
  declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
3829
4618
  features: Features;
3830
4619
  updateType: 'firmware' | 'ble';
3831
4620
  targetVersion?: string | undefined;
3832
4621
  firmwareType: EFirmwareType;
3833
4622
  }) => 'ble' | IFirmwareField;
4623
+ /**
4624
+ * Returns the optional firmware version
4625
+ * Used in firmware web update
4626
+ * https://firmware.onekey.so/
4627
+ */
3834
4628
  declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
3835
4629
 
3836
4630
  declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
@@ -3840,15 +4634,40 @@ declare function checkNeedUpdateBootForClassicAndMini({ features, willUpdateFirm
3840
4634
  firmwareType: EFirmwareType;
3841
4635
  }): boolean;
3842
4636
 
4637
+ type DeviceSettingsProtocol = 'V1' | 'V2';
4638
+ type DeviceSettingsField = keyof DeviceSettingsParams;
4639
+ declare const DEVICE_SETTINGS_SHARED_FIELDS: readonly ["language", "label", "usePassphrase", "autoLockDelayMs", "autoShutdownDelayMs", "hapticFeedback", "bluetoothEnabled"];
4640
+ declare const DEVICE_SETTINGS_V1_ONLY_FIELDS: readonly ["homescreen", "passphraseSource", "displayRotation", "passphraseAlwaysOnDevice", "safetyChecks", "experimentalFeatures", "changeBrightness"];
4641
+ declare const DEVICE_SETTINGS_V2_ONLY_FIELDS: readonly ["brightness", "airgapMode", "animationEnabled", "tapToWake", "deviceNameDisplayEnabled", "fidoEnabled", "usbLockEnabled", "randomKeypad"];
4642
+ declare const PROTOCOL_V2_NEVER_TIMEOUT_MS = 268435456;
4643
+ declare const normalizeSafetyCheckLevel: (value: SafetyCheckLevel | null | undefined) => Enum_SafetyCheckLevel | null | undefined;
3843
4644
  declare const getLanguageConfig: (deviceType: IDeviceType) => Record<string, string>[];
3844
- type DurationParts = {
3845
- seconds: number;
3846
- minute: number;
3847
- hour: number;
3848
- day: number;
4645
+ type DeviceSettingsDurationOption = {
4646
+ label: string;
4647
+ valueMs: number;
4648
+ };
4649
+ type DeviceSettingsValueOption<T> = {
4650
+ label: string;
4651
+ value: T;
4652
+ };
4653
+ declare const getAutoLockOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
4654
+ declare const getAutoShutDownOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
4655
+ type DeviceSettingsCapabilities = {
4656
+ protocol: DeviceSettingsProtocol;
4657
+ supportedFields: readonly DeviceSettingsField[];
4658
+ languageOptions: ReadonlyArray<Record<string, string>>;
4659
+ autoLockDelayOptions: readonly DeviceSettingsDurationOption[];
4660
+ autoShutdownDelayOptions: readonly DeviceSettingsDurationOption[];
4661
+ ranges: {
4662
+ brightness?: {
4663
+ min: number;
4664
+ max: number;
4665
+ };
4666
+ };
4667
+ safetyCheckOptions: ReadonlyArray<DeviceSettingsValueOption<Enum_SafetyCheckLevel>>;
4668
+ onDeviceConfirmationFields: readonly DeviceSettingsField[];
3849
4669
  };
3850
- declare const getAutoLockOptions: (_deviceType: IDeviceType) => DurationParts[];
3851
- declare const getAutoShutDownOptions: (_deviceType: IDeviceType) => DurationParts[];
4670
+ declare const getDeviceSettingsCapabilities: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsCapabilities;
3852
4671
 
3853
4672
  declare const getHDPath: (path: string) => Array<number>;
3854
4673
  declare const getScriptType: (path: Array<number>) => InputScriptType;
@@ -3885,8 +4704,12 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
3885
4704
  declare const corsValidator: (url?: string) => string | undefined;
3886
4705
  declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
3887
4706
 
4707
+ declare const registerFirmwareUpdateHostBinding: (binding: FirmwareUpdateHostBinding) => number;
4708
+ declare const unregisterFirmwareUpdateHostBinding: (generation?: number) => boolean;
4709
+ declare const getFirmwareUpdateHostBindingGeneration: () => number;
4710
+
3888
4711
  declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
3889
4712
  declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
3890
4713
  declare const HardwareTopLevelSdk: () => CoreApi;
3891
4714
 
3892
- export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceInfoMode, DeviceInfoProtocol, DeviceInfoScope, DeviceInfoSource, DeviceInfoStatus, DeviceModelToTypes, DeviceProfile, DeviceProfileRaw, DeviceProfileVerify, DeviceProfileVersions, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, GetDeviceInfoParams, GetPassphraseStateParams, GetPassphraseStatePayload, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceManifest, IProtocolV2ResourceManifestPackage, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, OnekeyFeatures, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, executeCallback, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isMethodVersionRangeUnsupported, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
4715
+ export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, ClearSessionCacheParams, ClearSessionCachePayload, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DEVICE_SETTINGS_SHARED_FIELDS, DEVICE_SETTINGS_V1_ONLY_FIELDS, DEVICE_SETTINGS_V2_ONLY_FIELDS, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesRawPatch, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendState, DeviceSendSupportFeatures, DeviceSettingsCapabilities, DeviceSettingsDurationOption, DeviceSettingsField, DeviceSettingsParams, DeviceSettingsProtocol, DeviceSettingsValueOption, DeviceState, DeviceStateEvent, DeviceStateIdentity, DeviceStateMode, DeviceStatePatch, DeviceStateProtocol, DeviceStateScope, DeviceStateSection, DeviceStateSettings, DeviceStateStatus, DeviceStateUpdateSource, DeviceStateVersions, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareArtifactReader, FirmwareArtifactReference, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateArtifactParams, FirmwareUpdateBinaryParams, FirmwareUpdateCapabilities, FirmwareUpdateHostBinding, FirmwareUpdateParams, FirmwareUpdatePlan, FirmwareUpdatePlanArtifact, FirmwareUpdatePlanArtifactRole, FirmwareUpdatePlanForceTarget, FirmwareUpdatePlanTarget, FirmwareUpdatePreparedArtifact, FirmwareUpdatePreparedArtifactInput, FirmwareUpdatePreparedEntry, FirmwareUpdatePreparedPlan, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, FirmwareUpdateV4Target, GetDeviceStateParams, GetPassphraseStateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceBundle, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KaspaStreamingSignInputParams, KaspaStreamingSignOutputParams, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, NormalizedFeatures, OnekeyFeatures, OpenWalletSessionMode, OpenWalletSessionModeValue, OpenWalletSessionParams, OpenWalletSessionPayload, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, PROTOCOL_V2_NEVER_TIMEOUT_MS, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, ProtocolV2FirmwareComponentRelease, ProtocolV2FirmwareComponentReleaseStatus, ProtocolV2FirmwareReleaseStatus, ProtocolV2UiCompletion, ProtocolV2UiEventMetadata, ProtocolV2UiEventSource, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TestProtocolV2PingParams, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, encodePro2Wallpaper, executeCallback, formatLogMethodLabel, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceSerialNo, getDeviceSettingsCapabilities, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getFirmwareUpdateHostBindingGeneration, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getSafeLogPayload, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeSafetyCheckLevel, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, registerFirmwareUpdateHostBinding, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, unregisterFirmwareUpdateHostBinding, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };