@onekeyfe/hd-core 1.2.0-alpha.7 → 1.2.0-alpha.70

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 (785) hide show
  1. package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +390 -0
  2. package/__tests__/DeviceCommands.test.ts +563 -0
  3. package/__tests__/DeviceEventRegistration.test.ts +49 -0
  4. package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
  5. package/__tests__/check-all-firmware-release-protocol-v2.test.ts +477 -0
  6. package/__tests__/connectSettings.test.ts +45 -5
  7. package/__tests__/core-dispose.test.ts +34 -0
  8. package/__tests__/core-error-output.test.ts +39 -0
  9. package/__tests__/core-initialization.test.ts +23 -0
  10. package/__tests__/device-connector-protocol.test.ts +81 -0
  11. package/__tests__/device-features-state.test.ts +78 -0
  12. package/__tests__/device-identity.test.ts +52 -0
  13. package/__tests__/device-initialize-timeout.test.ts +56 -0
  14. package/__tests__/device-lifecycle-events.test.ts +351 -0
  15. package/__tests__/device-pool-state.test.ts +166 -0
  16. package/__tests__/device-settings.test.ts +437 -0
  17. package/__tests__/device-state-contract.test.ts +28 -0
  18. package/__tests__/device-state-events.test.ts +286 -0
  19. package/__tests__/device-state-mapper.test.ts +273 -0
  20. package/__tests__/device-state-projector.test.ts +94 -0
  21. package/__tests__/device-state-store.test.ts +82 -0
  22. package/__tests__/device-utils.test.ts +154 -0
  23. package/__tests__/device-wallet-session-store.test.ts +478 -0
  24. package/__tests__/deviceFeaturesUtils.test.ts +39 -0
  25. package/__tests__/deviceSettings.test.ts +113 -0
  26. package/__tests__/deviceUploadNft.test.ts +316 -0
  27. package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
  28. package/__tests__/evmSignTransaction.test.ts +69 -0
  29. package/__tests__/evmSignTypedData.test.ts +80 -0
  30. package/__tests__/filesystemValidation.test.ts +53 -0
  31. package/__tests__/firmware-update/check-all-firmware-release.test.ts +175 -0
  32. package/__tests__/firmware-update/device-update-bootloader.test.ts +87 -0
  33. package/__tests__/firmware-update/firmware-artifact-source.test.ts +119 -0
  34. package/__tests__/firmware-update/firmware-host-binding.test.ts +70 -0
  35. package/__tests__/firmware-update/firmware-preparation-error.test.ts +27 -0
  36. package/__tests__/firmware-update/firmware-update-bootloader-poll.test.ts +200 -0
  37. package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
  38. package/__tests__/firmware-update/firmware-update-plan-bootloader-identity.test.ts +394 -0
  39. package/__tests__/firmware-update/firmware-update-plan.test.ts +593 -0
  40. package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +231 -0
  41. package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +430 -0
  42. package/__tests__/firmware-update/firmware-update-v3-reconnect.test.ts +63 -0
  43. package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
  44. package/__tests__/get-device-state.test.ts +578 -0
  45. package/__tests__/homescreen.test.ts +64 -0
  46. package/__tests__/kaspa-public-types.type-test.ts +16 -0
  47. package/__tests__/kaspa-use-tweak-pro2.test.ts +20 -0
  48. package/__tests__/kaspaSignTransaction.test.ts +578 -0
  49. package/__tests__/known-device-public-types.type-test.ts +3 -0
  50. package/__tests__/logBlockEvent.test.ts +128 -1
  51. package/__tests__/method-protocol-support.test.ts +132 -0
  52. package/__tests__/networkUtils.test.ts +406 -0
  53. package/__tests__/open-wallet-session-error-response.test.ts +43 -0
  54. package/__tests__/open-wallet-session.test.ts +1899 -0
  55. package/__tests__/pro2Nft.test.ts +108 -0
  56. package/__tests__/pro2Wallpaper.test.ts +39 -0
  57. package/__tests__/protocol-binding.test.ts +89 -0
  58. package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
  59. package/__tests__/protocol-v2-firmware-targets.test.ts +37 -0
  60. package/__tests__/protocol-v2-ping.test.ts +28 -0
  61. package/__tests__/protocol-v2-resources.test.ts +340 -0
  62. package/__tests__/protocol-v2-ui-lifecycle.test.ts +91 -0
  63. package/__tests__/protocol-v2-unlock-policy.test.ts +308 -0
  64. package/__tests__/protocol-v2.test.ts +6815 -2596
  65. package/__tests__/protocolV2FileWrite.test.ts +244 -0
  66. package/__tests__/protocolV2UiInteraction.test.ts +329 -0
  67. package/__tests__/public-device-state-api.test.ts +275 -0
  68. package/__tests__/public-pro2-api-boundary.test.ts +107 -0
  69. package/__tests__/refresh-device-state.test.ts +101 -0
  70. package/__tests__/request-context-logging.test.ts +16 -0
  71. package/__tests__/search-devices.test.ts +145 -0
  72. package/__tests__/tron-sign-message-init.test.ts +74 -0
  73. package/__tests__/uiProgressThrottle.test.ts +74 -0
  74. package/__tests__/uiPromiseRegistry.test.ts +115 -0
  75. package/dist/api/BaseMethod.d.ts +16 -1
  76. package/dist/api/BaseMethod.d.ts.map +1 -1
  77. package/dist/api/CheckAllFirmwareRelease.d.ts +25 -1
  78. package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
  79. package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
  80. package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
  81. package/dist/api/CipherKeyValue.d.ts +1 -0
  82. package/dist/api/CipherKeyValue.d.ts.map +1 -1
  83. package/dist/api/ClearSessionCache.d.ts +9 -0
  84. package/dist/api/ClearSessionCache.d.ts.map +1 -0
  85. package/dist/api/DetectDeviceConnectProtocol.d.ts +7 -0
  86. package/dist/api/DetectDeviceConnectProtocol.d.ts.map +1 -0
  87. package/dist/api/DirList.d.ts +1 -0
  88. package/dist/api/DirList.d.ts.map +1 -1
  89. package/dist/api/DirMake.d.ts +1 -0
  90. package/dist/api/DirMake.d.ts.map +1 -1
  91. package/dist/api/DirRemove.d.ts +1 -0
  92. package/dist/api/DirRemove.d.ts.map +1 -1
  93. package/dist/api/FileDelete.d.ts +1 -0
  94. package/dist/api/FileDelete.d.ts.map +1 -1
  95. package/dist/api/FileRead.d.ts +1 -0
  96. package/dist/api/FileRead.d.ts.map +1 -1
  97. package/dist/api/FileWrite.d.ts +2 -0
  98. package/dist/api/FileWrite.d.ts.map +1 -1
  99. package/dist/api/FirmwareUpdate.d.ts.map +1 -1
  100. package/dist/api/FirmwareUpdateV2.d.ts +12 -2
  101. package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
  102. package/dist/api/FirmwareUpdateV3.d.ts +7 -3
  103. package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
  104. package/dist/api/FirmwareUpdateV4.d.ts +49 -18
  105. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  106. package/dist/api/GetDeviceState.d.ts +8 -0
  107. package/dist/api/GetDeviceState.d.ts.map +1 -0
  108. package/dist/api/GetFeatures.d.ts +1 -1
  109. package/dist/api/GetFeatures.d.ts.map +1 -1
  110. package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
  111. package/dist/api/GetPassphraseState.d.ts +2 -6
  112. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  113. package/dist/api/OpenWalletSession.d.ts +8 -0
  114. package/dist/api/OpenWalletSession.d.ts.map +1 -0
  115. package/dist/api/PathInfo.d.ts +1 -0
  116. package/dist/api/PathInfo.d.ts.map +1 -1
  117. package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
  118. package/dist/api/SearchDevices.d.ts +3 -0
  119. package/dist/api/SearchDevices.d.ts.map +1 -1
  120. package/dist/api/UploadPortfolio.d.ts +17 -0
  121. package/dist/api/UploadPortfolio.d.ts.map +1 -0
  122. package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
  123. package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
  124. package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
  125. package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
  126. package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
  127. package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
  128. package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
  129. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
  130. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
  131. package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
  132. package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
  133. package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
  134. package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
  135. package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
  136. package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
  137. package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
  138. package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
  139. package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
  140. package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
  141. package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
  142. package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
  143. package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
  144. package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
  145. package/dist/api/btc/BTCGetAddress.d.ts +1 -0
  146. package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
  147. package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
  148. package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
  149. package/dist/api/btc/BTCSignMessage.d.ts +1 -0
  150. package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
  151. package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
  152. package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
  153. package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
  154. package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
  155. package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
  156. package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
  157. package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
  158. package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
  159. package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
  160. package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
  161. package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
  162. package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
  163. package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
  164. package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
  165. package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
  166. package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
  167. package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -0
  168. package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
  169. package/dist/api/conflux/ConfluxSignMessage.d.ts +2 -0
  170. package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
  171. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +2 -0
  172. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
  173. package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -0
  174. package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
  175. package/dist/api/cosmos/CosmosGetAddress.d.ts +1 -0
  176. package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
  177. package/dist/api/cosmos/CosmosGetPublicKey.d.ts +1 -0
  178. package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
  179. package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -0
  180. package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
  181. package/dist/api/device/DeviceCancel.d.ts +1 -0
  182. package/dist/api/device/DeviceCancel.d.ts.map +1 -1
  183. package/dist/api/device/DeviceChangePin.d.ts +1 -0
  184. package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
  185. package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -2
  186. package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
  187. package/dist/api/device/DeviceLock.d.ts +1 -0
  188. package/dist/api/device/DeviceLock.d.ts.map +1 -1
  189. package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -0
  190. package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
  191. package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -0
  192. package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
  193. package/dist/api/device/DeviceSettings.d.ts +1 -0
  194. package/dist/api/device/DeviceSettings.d.ts.map +1 -1
  195. package/dist/api/device/DeviceSupportFeatures.d.ts +1 -0
  196. package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
  197. package/dist/api/device/DeviceUnlock.d.ts +3 -2
  198. package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
  199. package/dist/api/device/DeviceUpdateBootloader.d.ts +5 -1
  200. package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
  201. package/dist/api/device/DeviceWipe.d.ts +1 -0
  202. package/dist/api/device/DeviceWipe.d.ts.map +1 -1
  203. package/dist/api/device/PreInitialize.d.ts +1 -0
  204. package/dist/api/device/PreInitialize.d.ts.map +1 -1
  205. package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
  206. package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
  207. package/dist/api/evm/EVMGetAddress.d.ts +1 -0
  208. package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
  209. package/dist/api/evm/EVMGetPublicKey.d.ts +1 -0
  210. package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
  211. package/dist/api/evm/EVMSignMessage.d.ts +1 -0
  212. package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
  213. package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
  214. package/dist/api/evm/EVMSignTransaction.d.ts +1 -0
  215. package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
  216. package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
  217. package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
  218. package/dist/api/evm/EVMVerifyMessage.d.ts +1 -0
  219. package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
  220. package/dist/api/evm/protocol.d.ts +3 -0
  221. package/dist/api/evm/protocol.d.ts.map +1 -0
  222. package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
  223. package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
  224. package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
  225. package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
  226. package/dist/api/firmware/FirmwareArtifactSource.d.ts +25 -0
  227. package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +1 -0
  228. package/dist/api/firmware/FirmwareHostBinding.d.ts +6 -0
  229. package/dist/api/firmware/FirmwareHostBinding.d.ts.map +1 -0
  230. package/dist/api/firmware/FirmwarePreparationError.d.ts +3 -0
  231. package/dist/api/firmware/FirmwarePreparationError.d.ts.map +1 -0
  232. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +12 -3
  233. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
  234. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +3 -0
  235. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +1 -0
  236. package/dist/api/firmware/FirmwareUpdatePlan.d.ts +25 -0
  237. package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -0
  238. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +32 -0
  239. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
  240. package/dist/api/firmware/getBinary.d.ts +15 -4
  241. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  242. package/dist/api/firmware/updateBootloader.d.ts +2 -0
  243. package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
  244. package/dist/api/firmware/uploadFirmware.d.ts +9 -1
  245. package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
  246. package/dist/api/helpers/filesystemValidation.d.ts +3 -0
  247. package/dist/api/helpers/filesystemValidation.d.ts.map +1 -1
  248. package/dist/api/helpers/paramsValidator.d.ts +1 -0
  249. package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
  250. package/dist/api/helpers/protocolV2FileWrite.d.ts +42 -0
  251. package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
  252. package/dist/api/index.d.ts +9 -25
  253. package/dist/api/index.d.ts.map +1 -1
  254. package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -0
  255. package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
  256. package/dist/api/kaspa/KaspaSignTransaction.d.ts +9 -1
  257. package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
  258. package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
  259. package/dist/api/lightning/LnurlAuth.d.ts +0 -4
  260. package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
  261. package/dist/api/near/NearGetAddress.d.ts +1 -0
  262. package/dist/api/near/NearGetAddress.d.ts.map +1 -1
  263. package/dist/api/near/NearSignTransaction.d.ts +1 -0
  264. package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
  265. package/dist/api/nem/NEMGetAddress.d.ts +1 -0
  266. package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
  267. package/dist/api/nem/NEMSignTransaction.d.ts +1 -0
  268. package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
  269. package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
  270. package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
  271. package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
  272. package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
  273. package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
  274. package/dist/api/nexa/NexaSignTransaction.d.ts +1 -0
  275. package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
  276. package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -0
  277. package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
  278. package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -0
  279. package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
  280. package/dist/api/nostr/NostrGetPublicKey.d.ts +1 -0
  281. package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
  282. package/dist/api/nostr/NostrSignEvent.d.ts +1 -0
  283. package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
  284. package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -0
  285. package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
  286. package/dist/api/polkadot/PolkadotGetAddress.d.ts +2 -1
  287. package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
  288. package/dist/api/polkadot/PolkadotSignTransaction.d.ts +1 -0
  289. package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -1
  290. package/dist/api/polkadot/networks.d.ts +1 -1
  291. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +1 -0
  292. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
  293. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +1 -0
  294. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
  295. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -0
  296. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
  297. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -0
  298. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
  299. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +7 -0
  300. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
  301. package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -1
  302. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
  303. package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
  304. package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
  305. package/dist/api/protocol-v2/DeviceStatusGet.d.ts +7 -0
  306. package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
  307. package/dist/api/protocol-v2/DeviceUploadNft.d.ts +31 -0
  308. package/dist/api/protocol-v2/DeviceUploadNft.d.ts.map +1 -0
  309. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +27 -0
  310. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
  311. package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
  312. package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
  313. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +1 -0
  314. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
  315. package/dist/api/protocol-v2/Ping.d.ts +3 -0
  316. package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
  317. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
  318. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
  319. package/dist/api/protocol-v2/helpers.d.ts +1 -1
  320. package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
  321. package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
  322. package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
  323. package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
  324. package/dist/api/solana/SolGetAddress.d.ts +1 -0
  325. package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
  326. package/dist/api/solana/SolSignMessage.d.ts +2 -1
  327. package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
  328. package/dist/api/solana/SolSignOffchainMessage.d.ts +2 -1
  329. package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
  330. package/dist/api/solana/SolSignTransaction.d.ts +3 -2
  331. package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
  332. package/dist/api/starcoin/StarcoinGetAddress.d.ts +1 -0
  333. package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
  334. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +1 -0
  335. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
  336. package/dist/api/starcoin/StarcoinSignMessage.d.ts +1 -0
  337. package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
  338. package/dist/api/starcoin/StarcoinSignTransaction.d.ts +1 -0
  339. package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
  340. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +1 -0
  341. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
  342. package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
  343. package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
  344. package/dist/api/stellar/StellarSignTransaction.d.ts +2 -3
  345. package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
  346. package/dist/api/sui/SuiGetAddress.d.ts +2 -1
  347. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  348. package/dist/api/sui/SuiGetPublicKey.d.ts +2 -1
  349. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  350. package/dist/api/sui/SuiSignMessage.d.ts +2 -1
  351. package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
  352. package/dist/api/sui/SuiSignTransaction.d.ts +2 -1
  353. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  354. package/dist/api/ton/TonGetAddress.d.ts +2 -1
  355. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  356. package/dist/api/ton/TonSignData.d.ts +1 -0
  357. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  358. package/dist/api/ton/TonSignMessage.d.ts +2 -1
  359. package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
  360. package/dist/api/ton/TonSignProof.d.ts +2 -1
  361. package/dist/api/ton/TonSignProof.d.ts.map +1 -1
  362. package/dist/api/tron/TronGetAddress.d.ts +1 -0
  363. package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
  364. package/dist/api/tron/TronSignMessage.d.ts +6 -1
  365. package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
  366. package/dist/api/tron/TronSignTransaction.d.ts +2 -1
  367. package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
  368. package/dist/api/utils.d.ts +2 -1
  369. package/dist/api/utils.d.ts.map +1 -1
  370. package/dist/api/xrp/XrpGetAddress.d.ts +1 -0
  371. package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
  372. package/dist/api/xrp/XrpSignTransaction.d.ts +1 -0
  373. package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -1
  374. package/dist/constants/index.d.ts +1 -1
  375. package/dist/constants/index.d.ts.map +1 -1
  376. package/dist/core/RequestQueue.d.ts.map +1 -1
  377. package/dist/core/deviceEventRegistration.d.ts +13 -0
  378. package/dist/core/deviceEventRegistration.d.ts.map +1 -0
  379. package/dist/core/index.d.ts +3 -1
  380. package/dist/core/index.d.ts.map +1 -1
  381. package/dist/core/uiPromiseRegistry.d.ts +6 -0
  382. package/dist/core/uiPromiseRegistry.d.ts.map +1 -0
  383. package/dist/data-manager/DataManager.d.ts +10 -3
  384. package/dist/data-manager/DataManager.d.ts.map +1 -1
  385. package/dist/data-manager/TransportManager.d.ts.map +1 -1
  386. package/dist/data-manager/connectSettings.d.ts.map +1 -1
  387. package/dist/device/Device.d.ts +72 -17
  388. package/dist/device/Device.d.ts.map +1 -1
  389. package/dist/device/DeviceCommands.d.ts +8 -6
  390. package/dist/device/DeviceCommands.d.ts.map +1 -1
  391. package/dist/device/DeviceConnector.d.ts +3 -2
  392. package/dist/device/DeviceConnector.d.ts.map +1 -1
  393. package/dist/device/DeviceFeaturesState.d.ts +3 -0
  394. package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
  395. package/dist/device/DevicePool.d.ts +5 -2
  396. package/dist/device/DevicePool.d.ts.map +1 -1
  397. package/dist/device/DeviceStateMapper.d.ts +13 -0
  398. package/dist/device/DeviceStateMapper.d.ts.map +1 -0
  399. package/dist/device/DeviceStateProjector.d.ts +7 -0
  400. package/dist/device/DeviceStateProjector.d.ts.map +1 -0
  401. package/dist/device/DeviceStateStore.d.ts +21 -0
  402. package/dist/device/DeviceStateStore.d.ts.map +1 -0
  403. package/dist/device/DeviceWalletSessionStore.d.ts +27 -0
  404. package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
  405. package/dist/device/cloneDeviceState.d.ts +2 -0
  406. package/dist/device/cloneDeviceState.d.ts.map +1 -0
  407. package/dist/device/deviceIdentity.d.ts +5 -0
  408. package/dist/device/deviceIdentity.d.ts.map +1 -0
  409. package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
  410. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
  411. package/dist/deviceProfile/index.d.ts +0 -1
  412. package/dist/deviceProfile/index.d.ts.map +1 -1
  413. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts +7 -0
  414. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts.map +1 -0
  415. package/dist/events/device.d.ts +16 -2
  416. package/dist/events/device.d.ts.map +1 -1
  417. package/dist/events/logBlockEvent.d.ts +2 -0
  418. package/dist/events/logBlockEvent.d.ts.map +1 -1
  419. package/dist/events/ui-promise.d.ts +4 -2
  420. package/dist/events/ui-promise.d.ts.map +1 -1
  421. package/dist/events/ui-request.d.ts +50 -4
  422. package/dist/events/ui-request.d.ts.map +1 -1
  423. package/dist/events/ui-response.d.ts +10 -2
  424. package/dist/events/ui-response.d.ts.map +1 -1
  425. package/dist/index.d.ts +1770 -772
  426. package/dist/index.d.ts.map +1 -1
  427. package/dist/index.js +10827 -4143
  428. package/dist/inject.d.ts +6 -1
  429. package/dist/inject.d.ts.map +1 -1
  430. package/dist/lowLevelInject.d.ts.map +1 -1
  431. package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
  432. package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
  433. package/dist/protocols/protocol-v2/features.d.ts +21 -17
  434. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  435. package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
  436. package/dist/protocols/protocol-v2/index.d.ts +3 -2
  437. package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
  438. package/dist/protocols/protocol-v2/resources.d.ts +30 -0
  439. package/dist/protocols/protocol-v2/resources.d.ts.map +1 -0
  440. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +17 -0
  441. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
  442. package/dist/protocols/protocol-v2/uiInteraction.d.ts +42 -0
  443. package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
  444. package/dist/protocols/protocol-v2/unlockPolicy.d.ts +2 -0
  445. package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -0
  446. package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts +22 -0
  447. package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts.map +1 -0
  448. package/dist/protocols/protocol-v2/walletSession.d.ts +27 -0
  449. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
  450. package/dist/topLevelInject.d.ts.map +1 -1
  451. package/dist/types/api/checkAllFirmwareRelease.d.ts +31 -4
  452. package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
  453. package/dist/types/api/detectDeviceConnectProtocol.d.ts +4 -0
  454. package/dist/types/api/detectDeviceConnectProtocol.d.ts.map +1 -0
  455. package/dist/types/api/deviceSettings.d.ts +11 -2
  456. package/dist/types/api/deviceSettings.d.ts.map +1 -1
  457. package/dist/types/api/deviceUnlock.d.ts +6 -2
  458. package/dist/types/api/deviceUnlock.d.ts.map +1 -1
  459. package/dist/types/api/deviceUpdateBootloader.d.ts +6 -0
  460. package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
  461. package/dist/types/api/export.d.ts +7 -2
  462. package/dist/types/api/export.d.ts.map +1 -1
  463. package/dist/types/api/firmwareUpdate.d.ts +76 -1
  464. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  465. package/dist/types/api/firmwareUpdateCapabilities.d.ts +9 -0
  466. package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +1 -0
  467. package/dist/types/api/firmwareUpdatePlan.d.ts +28 -0
  468. package/dist/types/api/firmwareUpdatePlan.d.ts.map +1 -0
  469. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +42 -0
  470. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +1 -0
  471. package/dist/types/api/getDeviceState.d.ts +12 -0
  472. package/dist/types/api/getDeviceState.d.ts.map +1 -0
  473. package/dist/types/api/getFeatures.d.ts.map +1 -1
  474. package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
  475. package/dist/types/api/getPassphraseState.d.ts +2 -10
  476. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  477. package/dist/types/api/index.d.ts +32 -31
  478. package/dist/types/api/index.d.ts.map +1 -1
  479. package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
  480. package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
  481. package/dist/types/api/openWalletSession.d.ts +35 -0
  482. package/dist/types/api/openWalletSession.d.ts.map +1 -0
  483. package/dist/types/api/protocolV2.d.ts +18 -84
  484. package/dist/types/api/protocolV2.d.ts.map +1 -1
  485. package/dist/types/api/sessionCache.d.ts +13 -0
  486. package/dist/types/api/sessionCache.d.ts.map +1 -0
  487. package/dist/types/device.d.ts +134 -10
  488. package/dist/types/device.d.ts.map +1 -1
  489. package/dist/types/params.d.ts +1 -0
  490. package/dist/types/params.d.ts.map +1 -1
  491. package/dist/types/settings.d.ts +57 -21
  492. package/dist/types/settings.d.ts.map +1 -1
  493. package/dist/utils/assets.d.ts +2 -1
  494. package/dist/utils/assets.d.ts.map +1 -1
  495. package/dist/utils/deviceFeaturesCompat.d.ts +14 -0
  496. package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
  497. package/dist/utils/deviceFeaturesUtils.d.ts +10 -3
  498. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  499. package/dist/utils/deviceInfoUtils.d.ts +9 -9
  500. package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
  501. package/dist/utils/deviceSettings.d.ts +38 -7
  502. package/dist/utils/deviceSettings.d.ts.map +1 -1
  503. package/dist/utils/deviceVersionUtils.d.ts +7 -5
  504. package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
  505. package/dist/utils/homescreen.d.ts +4 -0
  506. package/dist/utils/homescreen.d.ts.map +1 -1
  507. package/dist/utils/index.d.ts +6 -3
  508. package/dist/utils/index.d.ts.map +1 -1
  509. package/dist/utils/networkUtils.d.ts +10 -1
  510. package/dist/utils/networkUtils.d.ts.map +1 -1
  511. package/dist/utils/patch.d.ts +1 -1
  512. package/dist/utils/patch.d.ts.map +1 -1
  513. package/dist/utils/pro2Nft.d.ts +31 -0
  514. package/dist/utils/pro2Nft.d.ts.map +1 -0
  515. package/dist/utils/pro2Wallpaper.d.ts +22 -0
  516. package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
  517. package/dist/utils/tracing.d.ts.map +1 -1
  518. package/dist/utils/uiProgressThrottle.d.ts +3 -0
  519. package/dist/utils/uiProgressThrottle.d.ts.map +1 -0
  520. package/package.json +4 -4
  521. package/src/api/BaseMethod.ts +53 -20
  522. package/src/api/CheckAllFirmwareRelease.ts +394 -4
  523. package/src/api/CheckBootloaderRelease.ts +1 -2
  524. package/src/api/CheckFirmwareRelease.ts +1 -2
  525. package/src/api/CipherKeyValue.ts +4 -0
  526. package/src/api/ClearSessionCache.ts +32 -0
  527. package/src/api/DetectDeviceConnectProtocol.ts +18 -0
  528. package/src/api/DirList.ts +9 -4
  529. package/src/api/DirMake.ts +7 -4
  530. package/src/api/DirRemove.ts +7 -4
  531. package/src/api/FileDelete.ts +7 -4
  532. package/src/api/FileRead.ts +15 -9
  533. package/src/api/FileWrite.ts +26 -181
  534. package/src/api/FirmwareUpdate.ts +30 -15
  535. package/src/api/FirmwareUpdateV2.ts +373 -115
  536. package/src/api/FirmwareUpdateV3.ts +272 -70
  537. package/src/api/FirmwareUpdateV4.ts +1487 -688
  538. package/src/api/GetDeviceState.ts +59 -0
  539. package/src/api/GetFeatures.ts +6 -4
  540. package/src/api/GetOnekeyFeatures.ts +1 -75
  541. package/src/api/GetPassphraseState.ts +36 -21
  542. package/src/api/OpenWalletSession.ts +268 -0
  543. package/src/api/PathInfo.ts +9 -4
  544. package/src/api/PromptWebDeviceAccess.ts +2 -7
  545. package/src/api/SearchDevices.ts +31 -4
  546. package/src/api/UploadPortfolio.ts +40 -0
  547. package/src/api/alephium/AlephiumGetAddress.ts +0 -4
  548. package/src/api/alephium/AlephiumSignMessage.ts +0 -4
  549. package/src/api/alephium/AlephiumSignTransaction.ts +2 -6
  550. package/src/api/algo/AlgoGetAddress.ts +4 -0
  551. package/src/api/algo/AlgoSignTransaction.ts +4 -0
  552. package/src/api/allnetwork/AllNetworkGetAddress.ts +21 -21
  553. package/src/api/allnetwork/AllNetworkGetAddressBase.ts +45 -32
  554. package/src/api/aptos/AptosGetAddress.ts +4 -0
  555. package/src/api/aptos/AptosGetPublicKey.ts +4 -0
  556. package/src/api/aptos/AptosSignInMessage.ts +4 -0
  557. package/src/api/aptos/AptosSignMessage.ts +4 -0
  558. package/src/api/aptos/AptosSignTransaction.ts +4 -0
  559. package/src/api/benfen/BenfenGetAddress.ts +11 -7
  560. package/src/api/benfen/BenfenGetPublicKey.ts +0 -4
  561. package/src/api/benfen/BenfenSignMessage.ts +0 -4
  562. package/src/api/benfen/BenfenSignTransaction.ts +0 -4
  563. package/src/api/btc/BTCGetAddress.ts +8 -1
  564. package/src/api/btc/BTCGetPublicKey.ts +9 -2
  565. package/src/api/btc/BTCSignMessage.ts +8 -1
  566. package/src/api/btc/BTCSignPsbt.ts +4 -0
  567. package/src/api/btc/BTCSignTransaction.ts +8 -1
  568. package/src/api/btc/BTCVerifyMessage.ts +8 -1
  569. package/src/api/btc/helpers/versionLimit.ts +7 -4
  570. package/src/api/cardano/CardanoGetAddress.ts +4 -0
  571. package/src/api/cardano/CardanoGetPublicKey.ts +4 -0
  572. package/src/api/cardano/CardanoSignMessage.ts +5 -1
  573. package/src/api/cardano/CardanoSignTransaction.ts +5 -1
  574. package/src/api/conflux/ConfluxGetAddress.ts +6 -0
  575. package/src/api/conflux/ConfluxSignMessage.ts +6 -0
  576. package/src/api/conflux/ConfluxSignMessageCIP23.ts +6 -0
  577. package/src/api/conflux/ConfluxSignTransaction.ts +8 -5
  578. package/src/api/cosmos/CosmosGetAddress.ts +4 -0
  579. package/src/api/cosmos/CosmosGetPublicKey.ts +4 -0
  580. package/src/api/cosmos/CosmosSignTransaction.ts +4 -0
  581. package/src/api/device/DeviceCancel.ts +5 -0
  582. package/src/api/device/DeviceChangePin.ts +28 -0
  583. package/src/api/device/DeviceFullyUploadResource.ts +4 -5
  584. package/src/api/device/DeviceLock.ts +5 -0
  585. package/src/api/device/DeviceRebootToBoardloader.ts +5 -0
  586. package/src/api/device/DeviceRebootToBootloader.ts +5 -0
  587. package/src/api/device/DeviceSettings.ts +195 -1
  588. package/src/api/device/DeviceSupportFeatures.ts +4 -0
  589. package/src/api/device/DeviceUnlock.ts +21 -3
  590. package/src/api/device/DeviceUpdateBootloader.ts +126 -8
  591. package/src/api/device/DeviceWipe.ts +25 -0
  592. package/src/api/device/PreInitialize.ts +4 -0
  593. package/src/api/dynex/DnxGetAddress.ts +0 -6
  594. package/src/api/dynex/DnxSignTransaction.ts +0 -6
  595. package/src/api/evm/EVMGetAddress.ts +6 -2
  596. package/src/api/evm/EVMGetPublicKey.ts +6 -2
  597. package/src/api/evm/EVMSignMessage.ts +6 -2
  598. package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
  599. package/src/api/evm/EVMSignTransaction.ts +6 -2
  600. package/src/api/evm/EVMSignTypedData.ts +42 -50
  601. package/src/api/evm/EVMVerifyMessage.ts +6 -2
  602. package/src/api/evm/legacyV1/getAddress.ts +2 -2
  603. package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
  604. package/src/api/evm/legacyV1/signMessage.ts +2 -2
  605. package/src/api/evm/legacyV1/signTypedData.ts +2 -2
  606. package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
  607. package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
  608. package/src/api/evm/protocol.ts +6 -0
  609. package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
  610. package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
  611. package/src/api/firmware/FirmwareArtifactSource.ts +278 -0
  612. package/src/api/firmware/FirmwareHostBinding.ts +100 -0
  613. package/src/api/firmware/FirmwarePreparationError.ts +12 -0
  614. package/src/api/firmware/FirmwareUpdateBaseMethod.ts +102 -16
  615. package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
  616. package/src/api/firmware/FirmwareUpdatePlan.ts +772 -0
  617. package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +449 -0
  618. package/src/api/firmware/getBinary.ts +8 -3
  619. package/src/api/firmware/updateBootloader.ts +19 -4
  620. package/src/api/firmware/uploadFirmware.ts +157 -26
  621. package/src/api/helpers/batchGetPublickeys.ts +2 -2
  622. package/src/api/helpers/filesystemValidation.ts +61 -0
  623. package/src/api/helpers/paramsValidator.ts +1 -1
  624. package/src/api/helpers/protocolV2FileWrite.ts +338 -0
  625. package/src/api/index.ts +10 -26
  626. package/src/api/kaspa/KaspaGetAddress.ts +7 -0
  627. package/src/api/kaspa/KaspaSignTransaction.ts +369 -29
  628. package/src/api/kaspa/helpers/TransferSerialize.ts +17 -7
  629. package/src/api/lightning/LnurlAuth.ts +0 -4
  630. package/src/api/near/NearGetAddress.ts +4 -0
  631. package/src/api/near/NearSignTransaction.ts +4 -0
  632. package/src/api/nem/NEMGetAddress.ts +4 -0
  633. package/src/api/nem/NEMSignTransaction.ts +4 -0
  634. package/src/api/neo/NeoGetAddress.ts +0 -4
  635. package/src/api/neo/NeoSignTransaction.ts +0 -4
  636. package/src/api/nervos/NervosGetAddress.ts +0 -4
  637. package/src/api/nervos/NervosSignTransaction.ts +2 -6
  638. package/src/api/nexa/NexaGetAddress.ts +0 -4
  639. package/src/api/nexa/NexaSignTransaction.ts +3 -5
  640. package/src/api/nostr/NostrDecryptMessage.ts +4 -0
  641. package/src/api/nostr/NostrEncryptMessage.ts +4 -0
  642. package/src/api/nostr/NostrGetPublicKey.ts +4 -0
  643. package/src/api/nostr/NostrSignEvent.ts +4 -0
  644. package/src/api/nostr/NostrSignSchnorr.ts +4 -0
  645. package/src/api/polkadot/PolkadotGetAddress.ts +4 -0
  646. package/src/api/polkadot/PolkadotSignTransaction.ts +4 -0
  647. package/src/api/polkadot/networks.ts +3 -3
  648. package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +5 -2
  649. package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +5 -2
  650. package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +8 -5
  651. package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +10 -6
  652. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +21 -0
  653. package/src/api/protocol-v2/DeviceInfoGet.ts +8 -15
  654. package/src/api/protocol-v2/DeviceReboot.ts +7 -3
  655. package/src/api/protocol-v2/DeviceStatusGet.ts +19 -0
  656. package/src/api/protocol-v2/DeviceUploadNft.ts +197 -0
  657. package/src/api/protocol-v2/DeviceUploadWallpaper.ts +134 -0
  658. package/src/api/protocol-v2/FilesystemFormat.ts +9 -3
  659. package/src/api/protocol-v2/FilesystemPermissionFix.ts +5 -2
  660. package/src/api/protocol-v2/Ping.ts +37 -3
  661. package/src/api/protocol-v2/ProtocolInfoRequest.ts +8 -3
  662. package/src/api/protocol-v2/helpers.ts +17 -17
  663. package/src/api/scdo/ScdoGetAddress.ts +0 -4
  664. package/src/api/scdo/ScdoSignMessage.ts +0 -4
  665. package/src/api/scdo/ScdoSignTransaction.ts +0 -4
  666. package/src/api/solana/SolGetAddress.ts +4 -0
  667. package/src/api/solana/SolSignMessage.ts +5 -1
  668. package/src/api/solana/SolSignOffchainMessage.ts +5 -1
  669. package/src/api/solana/SolSignTransaction.ts +6 -2
  670. package/src/api/starcoin/StarcoinGetAddress.ts +4 -0
  671. package/src/api/starcoin/StarcoinGetPublicKey.ts +4 -0
  672. package/src/api/starcoin/StarcoinSignMessage.ts +4 -0
  673. package/src/api/starcoin/StarcoinSignTransaction.ts +4 -0
  674. package/src/api/starcoin/StarcoinVerifyMessage.ts +4 -0
  675. package/src/api/stellar/StellarGetAddress.ts +1 -10
  676. package/src/api/stellar/StellarSignTransaction.ts +1 -14
  677. package/src/api/sui/SuiGetAddress.ts +5 -1
  678. package/src/api/sui/SuiGetPublicKey.ts +5 -1
  679. package/src/api/sui/SuiSignMessage.ts +5 -1
  680. package/src/api/sui/SuiSignTransaction.ts +5 -1
  681. package/src/api/ton/TonGetAddress.ts +5 -1
  682. package/src/api/ton/TonSignData.ts +5 -1
  683. package/src/api/ton/TonSignMessage.ts +5 -1
  684. package/src/api/ton/TonSignProof.ts +5 -1
  685. package/src/api/tron/TronGetAddress.ts +4 -0
  686. package/src/api/tron/TronSignMessage.ts +19 -8
  687. package/src/api/tron/TronSignTransaction.ts +5 -1
  688. package/src/api/utils.ts +7 -3
  689. package/src/api/xrp/XrpGetAddress.ts +4 -0
  690. package/src/api/xrp/XrpSignTransaction.ts +5 -1
  691. package/src/constants/index.ts +1 -4
  692. package/src/core/RequestQueue.ts +1 -0
  693. package/src/core/deviceEventRegistration.ts +27 -0
  694. package/src/core/index.ts +365 -152
  695. package/src/core/uiPromiseRegistry.ts +63 -0
  696. package/src/data/messages/messages-protocol-v2.json +1138 -441
  697. package/src/data/messages/messages.json +286 -1
  698. package/src/data-manager/DataManager.ts +121 -41
  699. package/src/data-manager/TransportManager.ts +7 -1
  700. package/src/data-manager/connectSettings.ts +11 -0
  701. package/src/device/Device.ts +896 -295
  702. package/src/device/DeviceCommands.ts +193 -158
  703. package/src/device/DeviceConnector.ts +43 -20
  704. package/src/device/DeviceFeaturesState.ts +25 -0
  705. package/src/device/DevicePool.ts +86 -22
  706. package/src/device/DeviceStateMapper.ts +374 -0
  707. package/src/device/DeviceStateProjector.ts +94 -0
  708. package/src/device/DeviceStateStore.ts +201 -0
  709. package/src/device/DeviceWalletSessionStore.ts +144 -0
  710. package/src/device/cloneDeviceState.ts +39 -0
  711. package/src/device/deviceIdentity.ts +18 -0
  712. package/src/deviceProfile/buildDeviceFeatures.ts +223 -189
  713. package/src/deviceProfile/index.ts +0 -1
  714. package/src/deviceProfile/protocolV2DeviceIdentity.ts +35 -0
  715. package/src/events/device.ts +22 -1
  716. package/src/events/logBlockEvent.ts +80 -2
  717. package/src/events/ui-promise.ts +4 -2
  718. package/src/events/ui-request.ts +61 -4
  719. package/src/events/ui-response.ts +12 -2
  720. package/src/index.ts +5 -0
  721. package/src/inject.ts +95 -45
  722. package/src/lowLevelInject.ts +11 -4
  723. package/src/protocols/protocol-v2/deviceSession.ts +24 -0
  724. package/src/protocols/protocol-v2/features.ts +100 -33
  725. package/src/protocols/protocol-v2/firmware.ts +3 -1
  726. package/src/protocols/protocol-v2/index.ts +8 -1
  727. package/src/protocols/protocol-v2/resources.ts +390 -0
  728. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +65 -0
  729. package/src/protocols/protocol-v2/uiInteraction.ts +250 -0
  730. package/src/protocols/protocol-v2/unlockPolicy.ts +1 -0
  731. package/src/protocols/protocol-v2/unlockPolicyRunner.ts +131 -0
  732. package/src/protocols/protocol-v2/walletSession.ts +463 -0
  733. package/src/topLevelInject.ts +11 -4
  734. package/src/types/api/checkAllFirmwareRelease.ts +52 -4
  735. package/src/types/api/detectDeviceConnectProtocol.ts +6 -0
  736. package/src/types/api/deviceSettings.ts +26 -2
  737. package/src/types/api/deviceUnlock.ts +13 -2
  738. package/src/types/api/deviceUpdateBootloader.ts +6 -0
  739. package/src/types/api/export.ts +27 -0
  740. package/src/types/api/firmwareUpdate.ts +101 -5
  741. package/src/types/api/firmwareUpdateCapabilities.ts +9 -0
  742. package/src/types/api/firmwareUpdatePlan.ts +38 -0
  743. package/src/types/api/firmwareUpdatePreparedPlan.ts +53 -0
  744. package/src/types/api/getDeviceState.ts +19 -0
  745. package/src/types/api/getFeatures.ts +3 -0
  746. package/src/types/api/getOnekeyFeatures.ts +3 -0
  747. package/src/types/api/getPassphraseState.ts +9 -11
  748. package/src/types/api/index.ts +52 -64
  749. package/src/types/api/kaspaSignTransaction.ts +60 -4
  750. package/src/types/api/openWalletSession.ts +54 -0
  751. package/src/types/api/protocolV2.ts +33 -141
  752. package/src/types/api/sessionCache.ts +19 -0
  753. package/src/types/device.ts +200 -10
  754. package/src/types/params.ts +9 -2
  755. package/src/types/settings.ts +89 -24
  756. package/src/utils/assets.ts +4 -1
  757. package/src/utils/deviceFeaturesCompat.ts +191 -0
  758. package/src/utils/deviceFeaturesUtils.ts +65 -47
  759. package/src/utils/deviceInfoUtils.ts +29 -69
  760. package/src/utils/deviceSettings.ts +174 -39
  761. package/src/utils/deviceVersionUtils.ts +25 -44
  762. package/src/utils/findDefectiveBatchDevice.ts +3 -3
  763. package/src/utils/homescreen.ts +36 -0
  764. package/src/utils/index.ts +27 -3
  765. package/src/utils/networkUtils.ts +274 -16
  766. package/src/utils/pro2Nft.ts +142 -0
  767. package/src/utils/pro2Wallpaper.ts +130 -0
  768. package/src/utils/tracing.ts +3 -1
  769. package/src/utils/uiProgressThrottle.ts +63 -0
  770. package/tsconfig.type-tests.json +12 -0
  771. package/dist/api/GetDeviceInfo.d.ts +0 -9
  772. package/dist/api/GetDeviceInfo.d.ts.map +0 -1
  773. package/dist/api/firmware/progressThrottle.d.ts +0 -3
  774. package/dist/api/firmware/progressThrottle.d.ts.map +0 -1
  775. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
  776. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
  777. package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
  778. package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
  779. package/dist/types/api/getDeviceInfo.d.ts +0 -87
  780. package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
  781. package/src/api/GetDeviceInfo.ts +0 -145
  782. package/src/api/firmware/progressThrottle.ts +0 -44
  783. package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
  784. package/src/deviceProfile/buildDeviceProfile.ts +0 -352
  785. package/src/types/api/getDeviceInfo.ts +0 -101
package/dist/index.d.ts CHANGED
@@ -1,25 +1,71 @@
1
1
  import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
2
- import { DeviceFirmwareTargetType, DeviceFirmwareUpdateRecordFields, 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. After a successful probe, the cached protocol is also strict.
62
+ */
22
63
  connectProtocol?: HardwareConnectProtocol;
64
+ /**
65
+ * Ignore a previously bound protocol for this call and actively detect the
66
+ * protocol again. Intended for the first verified connection or explicit recovery.
67
+ */
68
+ forceProtocolDetection?: boolean;
23
69
  }
24
70
  type Params<T> = CommonParams & T & {
25
71
  bundle?: undefined;
@@ -44,34 +90,6 @@ type DeviceRebootParams = {
44
90
  rebootType?: RebootTypeInput;
45
91
  reboot_type?: RebootTypeInput;
46
92
  };
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 DeviceFirmwareUpdateStatusGetParams = {
59
- fields?: DeviceFirmwareUpdateRecordFields;
60
- };
61
- type DeviceFactoryInfoSetParams = {
62
- version?: number;
63
- serial_number?: string;
64
- burn_in_completed?: boolean;
65
- factory_test_completed?: boolean;
66
- manufacture_time?: {
67
- year: number;
68
- month: number;
69
- day: number;
70
- hour: number;
71
- minute: number;
72
- second: number;
73
- };
74
- };
75
93
 
76
94
  type PassphrasePromptResponse = {
77
95
  passphrase?: string;
@@ -89,15 +107,19 @@ type TypedCallResponseMap = {
89
107
  [K in MessageKey]: TypedResponseMessage<K>;
90
108
  };
91
109
  type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
110
+ /**
111
+ * The life cycle begins with the acquisition of the device and ends with the disposal device commands
112
+ * acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
113
+ */
92
114
  declare class DeviceCommands {
93
115
  instanceId: string;
94
116
  currentResponseID?: number;
95
- device: Device$1;
117
+ device: Device;
96
118
  transport: Transport;
97
119
  mainId: string;
98
120
  disposed: boolean;
99
121
  callPromise?: Promise<DefaultMessageResponse>;
100
- constructor(device: Device$1, mainId: string);
122
+ constructor(device: Device, mainId: string);
101
123
  dispose(_cancelRequest: boolean): Promise<void>;
102
124
  checkDisposed(): void;
103
125
  cancelDeviceOnOneKeyDevice(): Promise<{
@@ -114,7 +136,7 @@ declare class DeviceCommands {
114
136
  };
115
137
  } | {
116
138
  success: boolean;
117
- 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;
139
+ 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 | 830 | 831 | 832 | 900 | 901 | 902;
118
140
  payload: {
119
141
  message: string;
120
142
  };
@@ -133,7 +155,7 @@ declare class DeviceCommands {
133
155
  };
134
156
  } | {
135
157
  success: boolean;
136
- 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;
158
+ 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 | 830 | 831 | 832 | 900 | 901 | 902;
137
159
  payload: {
138
160
  message: string;
139
161
  };
@@ -145,363 +167,190 @@ declare class DeviceCommands {
145
167
  _commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
146
168
  _filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
147
169
  _promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
148
- _promptPassphrase(options: PassphraseRequestPayload): Promise<PassphrasePromptResponse>;
149
- }
150
-
151
- type DeviceDescriptorDiff = {
152
- didUpdate: boolean;
153
- connected: OneKeyDeviceInfo[];
154
- disconnected: OneKeyDeviceInfo[];
155
- changedSessions: OneKeyDeviceInfo[];
156
- changedDebugSessions: OneKeyDeviceInfo[];
157
- acquired: OneKeyDeviceInfo[];
158
- debugAcquired: OneKeyDeviceInfo[];
159
- released: OneKeyDeviceInfo[];
160
- debugReleased: OneKeyDeviceInfo[];
161
- descriptors: OneKeyDeviceInfo[];
162
- };
163
-
164
- declare class DeviceConnector {
165
- transport: Transport;
166
- listenTimestamp: number;
167
- current: OneKeyDeviceInfo[] | null;
168
- upcoming: OneKeyDeviceInfo[];
169
- listening: boolean;
170
- constructor();
171
- enumerate(): Promise<DeviceDescriptorDiff | undefined>;
172
- listen(): Promise<void>;
173
- stop(): void;
174
- acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
175
- release(session: string, onclose: boolean): Promise<void>;
176
- disconnect(session: string | undefined | null): Promise<void>;
177
- promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
178
- _reportDevicesChange(): void;
179
- }
180
-
181
- type InitOptions = {
182
- initSession?: boolean;
183
- deviceId?: string;
184
- passphraseState?: string;
185
- deriveCardano?: boolean;
186
- connectProtocol?: HardwareConnectProtocol;
187
- protocolV2DeviceInfoTimeoutMs?: number;
188
- };
189
- type RunOptions = {
190
- keepSession?: boolean;
191
- skipInitialize?: boolean;
192
- } & InitOptions;
193
- interface DeviceEvents {
194
- [DEVICE.PIN]: [Device$1, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
195
- [DEVICE.PASSPHRASE_ON_DEVICE]: [Device$1, ((response: any) => void)?];
196
- [DEVICE.BUTTON]: [Device$1, DeviceButtonRequestPayload];
197
- [DEVICE.FEATURES]: [Device$1, DeviceFeaturesPayload];
198
- [DEVICE.PASSPHRASE]: [
199
- Device$1,
200
- PassphraseRequestPayload,
201
- (response: PassphrasePromptResponse, error?: Error) => void
202
- ];
203
- [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
204
- Device$1,
205
- (err: any, deviceId: string) => void
206
- ];
207
- [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
208
- Device$1,
209
- (err: any, deviceId: string) => void
210
- ];
211
- }
212
- declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
213
- interface Device$1 {
214
- on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
215
- off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
216
- emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
217
- }
218
- declare class Device$1 extends EventEmitter {
219
- originalDescriptor: OneKeyDeviceInfo;
220
- sdkInstanceId?: string;
221
- instanceId: string;
222
- createdAt: number;
223
- mainId?: string | null;
224
- deviceConnector?: DeviceConnector | null;
225
- commands: DeviceCommands;
226
- private cancelableAction?;
227
- private deviceAcquired;
228
- features: Features | undefined;
229
- featuresNeedsReload: boolean;
230
- runPromise?: Deferred<void> | null;
231
- externalState: string[];
232
- unavailableCapabilities: UnavailableCapabilities;
233
- instance: number;
234
- internalState: string[];
235
- needReloadDevice: boolean;
236
- keepSession: boolean;
237
- passphraseState: string | undefined;
238
- pendingCallbackPromise?: Deferred<void>;
239
- private preInitializedAt?;
240
- private preInitializeMeta?;
241
- private lastInitializeDurationMs?;
242
- constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
243
- static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device$1;
244
- toMessageObject(): Device | null;
245
- connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
246
- acquire(connectProtocol?: HardwareConnectProtocol, options?: {
247
- throwOnRunPromiseError?: boolean;
248
- }): Promise<void>;
249
- release(): Promise<void>;
250
- preInitialize(initOptions?: InitOptions): Promise<void>;
251
- markPreInitialized(meta?: {
252
- passphraseState?: string;
253
- }): void;
254
- clearPreInitialized(): void;
255
- isPreInitializeMetaMatch(payload?: {
256
- passphraseState?: string;
257
- }): boolean;
258
- isPreInitializedValid(ttlMs: number): boolean;
259
- setLastInitializeDuration(durationMs: number): void;
260
- getLastInitializeDuration(): number | undefined;
261
- getCommands(): DeviceCommands;
262
- getProtocol(): 'V1' | 'V2';
263
- isProtocolV2(): boolean;
264
- getCurrentDeviceType(): IDeviceType;
265
- getCurrentDeviceId(): string | undefined;
266
- getCurrentSerialNo(): string;
267
- getConnectId(): string;
268
- getCurrentBleName(): string | null;
269
- getCurrentLabel(): string | null;
270
- getCurrentPassphraseProtection(): boolean | null | undefined;
271
- getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
272
- getCurrentFirmwareVersionString(): string;
273
- getCurrentBLEFirmwareVersionString(): string | undefined;
274
- getCurrentSafetyChecks(): string | null | undefined;
275
- getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
276
- supportNewPassphrase(): SupportFeatureType;
277
- supportInputPinOnSoftware(): SupportFeatureType;
278
- supportModifyHomescreen(): SupportFeatureType;
279
- private generateStateKey;
280
- private getSessionCacheDeviceKey;
281
- getInternalState(_deviceId?: string): string | undefined;
282
- updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
283
- private setInternalState;
284
- clearInternalState(_deviceId?: string): void;
285
- initialize(options?: InitOptions): Promise<void>;
286
- private _initializeProtocolV2;
287
- private _refreshProtocolV2Status;
288
- getFeatures(): Promise<Features | undefined>;
289
- _updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
290
- updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
291
- updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
292
- updateFromCache(device: Device$1): void;
293
- run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
294
- _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
295
- interruptionFromOutside(): Promise<void>;
296
- interruptionFromUser(): Promise<void>;
297
- setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
298
- clearCancelableAction(): void;
299
- getMode(): EOneKeyDeviceMode;
300
- getFirmwareVersion(): IVersionArray | null;
301
- getBLEFirmwareVersion(): IVersionArray | null;
302
- isUsed(): boolean;
303
- hasDeviceAcquire(): boolean;
304
- isUsedHere(): boolean;
305
- isUsedElsewhere(): boolean;
306
- isBootloader(): boolean | undefined;
307
- isInitialized(): boolean | undefined;
308
- isSeedless(): boolean | undefined;
309
- isUnacquired(): boolean;
310
- hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
311
- hasUsePassphrase(): boolean;
312
- checkDeviceId(deviceId: string): boolean;
313
- lockDevice(): Promise<Success$1>;
314
- supportUnlockVersionRange(): DeviceFirmwareRange;
315
- unlockDevice(): Promise<Features | undefined>;
316
- checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
317
- }
318
-
319
- declare function generateSdkInstanceId(): string;
320
- declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
321
- interface RequestContext {
322
- responseID: number;
323
- sdkInstanceId?: string;
324
- methodName: string;
325
- connectId?: string;
326
- deviceInstanceId?: string;
327
- commandsInstanceId?: string;
328
- parentResponseID?: number;
329
- startTime: number;
330
- endTime?: number;
331
- status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
332
- error?: string;
333
- }
334
- interface SdkTracingContext {
335
- sdkInstanceId: string;
336
- createdAt: number;
337
- activeRequests: Map<number, RequestContext>;
338
- }
339
- declare function createSdkTracingContext(): SdkTracingContext;
340
- declare function createRequestContext(responseID: number, methodName: string, options?: {
341
- sdkInstanceId?: string;
342
- connectId?: string;
343
- deviceInstanceId?: string;
344
- commandsInstanceId?: string;
345
- parentResponseID?: number;
346
- }): RequestContext;
347
- declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
348
- declare function completeRequestContext(responseID: number, error?: Error): void;
349
- declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
350
- declare function formatRequestContext(context: RequestContext): string;
351
- declare function cleanupSdkInstance(sdkInstanceId: string): void;
352
-
353
- declare class Core extends EventEmitter {
354
- private tracingContext;
355
- readonly sdkInstanceId: string;
356
- private requestQueue;
357
- private prePendingCallPromise;
358
- private methodSynchronize;
359
- constructor();
360
- private getCoreContext;
361
- handleMessage(message: CoreMessage): Promise<any>;
362
- dispose(): void;
170
+ promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
171
+ cancelDeviceOnReject?: boolean;
172
+ }): Promise<PassphrasePromptResponse>;
363
173
  }
364
- declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
365
- declare const switchTransport: ({ env, Transport, plugin, }: {
366
- env: ConnectSettings['env'];
367
- Transport: any;
368
- plugin?: LowlevelTransportSharedPlugin | undefined;
369
- }) => void;
370
174
 
371
- type DeviceInfoGetTargets = {
372
- hw?: boolean;
373
- fw?: boolean;
374
- coprocessor?: boolean;
375
- se1?: boolean;
376
- se2?: boolean;
377
- se3?: boolean;
378
- se4?: boolean;
379
- status?: boolean;
380
- };
381
- type DeviceInfoGetTypes = {
382
- version?: boolean;
383
- build_id?: boolean;
384
- hash?: boolean;
385
- specific?: boolean;
386
- };
387
- type DeviceInfoGetParams = {
388
- targets?: DeviceInfoGetTargets;
389
- types?: DeviceInfoGetTypes;
390
- };
175
+ type ProtocolV2RuntimeMode = 'normal' | 'bootloader' | 'romloader';
391
176
 
392
- type FileOpSuccess = {
393
- message?: string;
177
+ type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
178
+ type ConnectSettings = {
179
+ connectSrc?: string;
180
+ debug?: boolean;
181
+ transportReconnect?: boolean;
182
+ lazyLoad?: boolean;
183
+ origin?: string;
184
+ parentOrigin?: string;
185
+ configSrc: string;
186
+ iframeSrc: string;
187
+ version: string;
188
+ priority: number;
189
+ trustedHost: boolean;
190
+ supportedBrowser?: boolean;
191
+ env: transportEnv;
192
+ timestamp: number;
193
+ isFrame?: boolean;
194
+ preRelease?: boolean;
195
+ firmwareManifestMode?: 'sdk-managed' | 'external-only';
196
+ preloadedConfig?: RemoteConfigResponse;
197
+ fetchConfig?: boolean;
198
+ extension?: string;
199
+ configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
394
200
  };
395
- type FileInfo = {
396
- path: string;
397
- offset: number;
398
- total_size: number;
399
- data?: Uint8Array;
400
- data_hash?: number;
401
- processed_byte?: number;
402
- chunks?: number;
201
+ type IVersionArray = [number, number, number];
202
+ type ILocale = 'zh-CN' | 'en-US';
203
+ type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
204
+ type IProtocolV2FirmwareComponent = {
205
+ target: IProtocolV2FirmwareComponentTarget;
206
+ url: string;
207
+ /** SHA-256 of the complete okpkg, used after downloading the package. */
208
+ fingerprint?: string;
209
+ /** OKPP payload hash, used to detect same-version package changes. */
210
+ payloadHash?: string;
211
+ expectedSize?: number;
212
+ version?: IVersionArray;
403
213
  };
404
- type DirInfo = {
405
- path: string;
406
- child_dirs?: string;
407
- child_files?: string;
214
+ type IProtocolV2ResourceType = 'images' | 'animation' | 'wallpaper' | 'translations' | 'roobert' | 'noto';
215
+ /** Pro2 RES package descriptor. Hashes identify content without a human-managed version. */
216
+ type IProtocolV2Resource = {
217
+ type: IProtocolV2ResourceType;
218
+ url: string;
219
+ /** Complete okpkg file size in bytes. */
220
+ size: number;
221
+ /** SHA-256 of the complete okpkg file. */
222
+ fileHash: string;
223
+ /** SHA3-512 header_hash from the signed okpkg header. */
224
+ headerHash: string;
408
225
  };
409
- type PathInfoResult = {
410
- exist: boolean;
226
+ /** A file from the Protocol V2 resource manifest, written directly with FileWrite. */
227
+ type IProtocolV2ResourceFile = {
228
+ name?: string;
229
+ url: string;
230
+ devicePath: string;
411
231
  size: number;
412
- year: number;
413
- month: number;
414
- day: number;
415
- hour: number;
416
- minute: number;
417
- second: number;
418
- readonly: boolean;
419
- hidden: boolean;
420
- system: boolean;
421
- archive: boolean;
422
- directory: boolean;
423
- };
424
- declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
425
- declare function ping(connectId: string, params?: CommonParams & {
426
- message?: string;
427
- }): Response<Success$1>;
428
- declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
429
- declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
430
- declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DeviceFirmwareUpdateStatus>;
431
- declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams & DeviceFirmwareUpdateStatusGetParams): Response<DeviceFirmwareUpdateStatus>;
432
- declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success$1>;
433
- declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
434
- declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success$1>;
435
- declare function fileRead(connectId: string, params: {
436
- path: string;
437
- offset?: number;
438
- totalSize?: number;
439
- chunkLen?: number;
440
- uiPercentage?: number;
441
- }): Response<FileInfo>;
442
- declare function fileWrite(connectId: string, params: {
443
- path: string;
444
- offset?: number;
445
- totalSize?: number;
446
- chunkSize?: number;
447
- chunkLen?: number;
448
- data: ArrayBuffer | Uint8Array | Blob | string;
449
- overwrite?: boolean;
450
- append?: boolean;
451
- uiPercentage?: number;
452
- timeoutMs?: number | string;
453
- }): Response<FileInfo>;
454
- declare function fileDelete(connectId: string, params: {
455
- path: string;
456
- }): Response<FileOpSuccess>;
457
- declare function dirList(connectId: string, params: {
458
- path: string;
459
- depth?: number;
460
- }): Response<DirInfo>;
461
- declare function dirMake(connectId: string, params: {
462
- path: string;
463
- }): Response<FileOpSuccess>;
464
- declare function dirRemove(connectId: string, params: {
465
- path: string;
466
- }): Response<FileOpSuccess>;
467
- declare function pathInfo(connectId: string, params: {
468
- path: string;
469
- timeoutMs?: number | string;
470
- }): Response<PathInfoResult>;
471
- declare const filesystemFileRead: typeof fileRead;
472
- declare const filesystemFileWrite: typeof fileWrite;
473
- declare const filesystemFileDelete: typeof fileDelete;
474
- declare const filesystemDirList: typeof dirList;
475
- declare const filesystemDirMake: typeof dirMake;
476
- declare const filesystemDirRemove: typeof dirRemove;
477
- declare const filesystemPathInfoQuery: typeof pathInfo;
478
- declare function filesystemFormat(connectId: string): Response<Success$1>;
479
- declare function filesystemDiskControl(connectId: string, params: CommonParams & {
480
- enable: boolean | 0 | 1;
481
- timeoutMs?: number | string;
482
- }): Response<Success$1>;
483
-
484
- declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
485
- declare const off: (type: any, fn: any) => void;
486
- declare const removeAllListeners: (type: any) => void;
487
-
488
- declare function uiResponse(response: UiResponseEvent): void;
489
-
490
- type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
491
- interface LowLevelInjectApi {
492
- call: CallMethod;
493
- eventEmitter: EventEmitter$1;
494
- init: CoreApi['init'];
495
- dispose: CoreApi['dispose'];
496
- uiResponse: CoreApi['uiResponse'];
497
- cancel: CoreApi['cancel'];
498
- updateSettings: CoreApi['updateSettings'];
499
- switchTransport: CoreApi['switchTransport'];
500
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
501
- }
502
- type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
503
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
232
+ /** SHA-256 of the complete file. */
233
+ fileHash: string;
234
+ };
235
+ /** Optional Protocol V2 boot resources restored as individual files. */
236
+ type IProtocolV2BootResources = {
237
+ required: false;
238
+ target: 'RES';
239
+ manifestUrl?: string;
240
+ files: IProtocolV2ResourceFile[];
241
+ };
242
+ type IProtocolV2Resources = {
243
+ stable: IProtocolV2Resource[];
244
+ boot?: IProtocolV2BootResources;
245
+ };
246
+ /** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
247
+ type IProtocolV2ResourceBundle = {
248
+ /** Bundle name, such as images, animation, translations, or fonts_roobert. */
249
+ name: string;
250
+ /** Download URL. */
251
+ url: string;
252
+ fingerprint?: string;
253
+ expectedSize?: number;
254
+ /** Device target path, such as vol0:/bundles/images/images.okpkg. */
255
+ devicePath: string;
256
+ /** okpkg payload_version used to skip matching content after FileRead. */
257
+ version?: IVersionArray;
258
+ /** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
259
+ payloadHash?: string;
260
+ /** okpkg header_hash used for SHA3-512 comparison after FileRead. */
261
+ headerHash?: string;
262
+ };
263
+ /** STM32 firmware config */
264
+ type IFirmwareReleaseInfo = {
265
+ required: boolean;
266
+ url: string;
267
+ /**
268
+ * Firmware type (bitcoinonly or universal)
269
+ * This field is not present in the remote config, but will be inferred from the firmware field name
270
+ */
271
+ firmwareType?: EFirmwareType;
272
+ /** Firmware UI resource */
273
+ resource?: string;
274
+ resourceFingerprint?: string;
275
+ resourceExpectedSize?: number;
276
+ /** Firmware full UI resource */
277
+ fullResource?: string;
278
+ fullResourceFingerprint?: string;
279
+ fullResourceExpectedSize?: number;
280
+ fullResourceRange?: string[];
281
+ bootloaderResource?: string;
282
+ bootloaderFingerprint?: string;
283
+ bootloaderExpectedSize?: number;
284
+ bootloaderVersion?: IVersionArray;
285
+ displayBootloaderVersion?: IVersionArray;
286
+ bootloaderRelatedFirmwareVersion?: IVersionArray;
287
+ upgradeType?: 'payload-package-set' | string;
288
+ components?: Record<string, IProtocolV2FirmwareComponent>;
289
+ installOrder?: string[];
290
+ /** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
291
+ resourceBundles?: IProtocolV2ResourceBundle[];
292
+ bootloaderChangelog?: {
293
+ [k in ILocale]: string;
294
+ };
295
+ fingerprint: string;
296
+ expectedSize?: number;
297
+ version: IVersionArray;
298
+ changelog: {
299
+ [k in ILocale]: string;
300
+ };
301
+ };
302
+ /** BLE firmware config */
303
+ type IBLEFirmwareReleaseInfo = {
304
+ required: boolean;
305
+ /** bluetooth dfu version */
306
+ url: string;
307
+ /** stm bluetooth update version */
308
+ webUpdate: string;
309
+ fingerprint: string;
310
+ fingerprintWeb: string;
311
+ expectedSize?: number;
312
+ version: IVersionArray;
313
+ changelog: {
314
+ [k in ILocale]: string;
315
+ };
316
+ };
317
+ type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
318
+ type ILegacyKnownDevice = Exclude<IKnownDevice, 'neo'>;
319
+ type IDeviceReleaseInfo = {
320
+ firmware: IFirmwareReleaseInfo[];
321
+ /** Protocol V2 payload package set */
322
+ 'firmware-v1'?: IFirmwareReleaseInfo[];
323
+ 'firmware-v2'?: IFirmwareReleaseInfo[];
324
+ 'firmware-v8'?: IFirmwareReleaseInfo[];
325
+ 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
326
+ ble: IBLEFirmwareReleaseInfo[];
327
+ /** Independent Protocol V2 resource release configuration. */
328
+ resources?: IProtocolV2Resources;
329
+ };
330
+ type DeviceTypeMap = {
331
+ [k in ILegacyKnownDevice]: IDeviceReleaseInfo;
332
+ } & {
333
+ /** Optional until every remote-config producer publishes a Neo entry. */
334
+ neo?: IDeviceReleaseInfo;
335
+ };
336
+ type AssetsMap = {
337
+ bridge: {
338
+ version: IVersionArray;
339
+ linux32Rpm: string;
340
+ linux64Rpm: string;
341
+ linux32Deb: string;
342
+ linux64Deb: string;
343
+ win: string;
344
+ mac: string;
345
+ sha256sumAsc: string;
346
+ changelog: {
347
+ [k in ILocale]: string;
348
+ };
349
+ };
504
350
  };
351
+ type RemoteConfigResponse = {
352
+ bridge: AssetsMap['bridge'];
353
+ } & DeviceTypeMap;
505
354
 
506
355
  type DeviceStatus = 'available' | 'occupied' | 'used';
507
356
  declare enum EOneKeyDeviceMode {
@@ -516,6 +365,14 @@ type UnavailableCapabilities = {
516
365
  };
517
366
  type KnownDevice = {
518
367
  connectId: string | null;
368
+ /** Protocol family confirmed by the transport's active probe. */
369
+ connectProtocol?: HardwareConnectProtocol;
370
+ /**
371
+ * Stable physical-device identity. Current SDK responses always include this
372
+ * value; it remains optional in the type during the uuid compatibility window.
373
+ */
374
+ serialNo?: string;
375
+ /** @deprecated Use serialNo instead. */
519
376
  uuid: string;
520
377
  deviceId: string | null;
521
378
  deviceType: IDeviceType | null;
@@ -525,9 +382,12 @@ type KnownDevice = {
525
382
  bleName: string | null;
526
383
  name: string;
527
384
  error?: typeof undefined;
385
+ /** Current SDK/transport usage state for connection indicators. */
386
+ status?: DeviceStatus;
528
387
  mode: EOneKeyDeviceMode;
529
- features?: Features;
530
- sessionId?: string | null;
388
+ features: Features;
389
+ /** Unified SDK device-state snapshot; features remains a legacy projection. */
390
+ state?: DeviceState;
531
391
  unavailableCapabilities: UnavailableCapabilities;
532
392
  bleFirmwareVersion: IVersionArray | null;
533
393
  firmwareVersion: IVersionArray | null;
@@ -537,18 +397,35 @@ type KnownDevice = {
537
397
  };
538
398
  type SearchDevice = {
539
399
  connectId: string | null;
400
+ /** Protocol family confirmed by the transport's active probe. */
401
+ connectProtocol?: HardwareConnectProtocol;
402
+ /**
403
+ * Available after device initialization. BLE discovery does not connect to the
404
+ * device, so it returns null until a later initialized device response. Current
405
+ * SDK responses always include the field; it remains optional in the type during
406
+ * the uuid compatibility window.
407
+ */
408
+ serialNo?: string | null;
409
+ /**
410
+ * @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
411
+ * and connectId for transport routing.
412
+ */
540
413
  uuid: string;
541
414
  deviceId: string | null;
542
415
  deviceType: IDeviceType;
543
416
  name: string;
544
417
  commType: OneKeyDeviceCommType;
545
418
  };
546
- type Device = KnownDevice;
419
+ type Device$1 = KnownDevice;
547
420
  type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
548
- type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
421
+ type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
549
422
  type DeviceFeaturesVerify = {
550
423
  firmwareBuildId?: string;
551
424
  firmwareHash?: string;
425
+ applicationP1BuildId?: string;
426
+ applicationP1Hash?: string;
427
+ applicationP2BuildId?: string;
428
+ applicationP2Hash?: string;
552
429
  bootloaderBuildId?: string;
553
430
  bootloaderHash?: string;
554
431
  boardBuildId?: string;
@@ -575,9 +452,117 @@ type DeviceFeaturesVerify = {
575
452
  type DeviceFeaturesRaw = {
576
453
  protocolV1Features?: Messages.Features;
577
454
  protocolV1OneKeyFeatures?: OnekeyFeatures;
455
+ protocolV2ProtocolInfo?: ProtocolInfo;
578
456
  protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
457
+ protocolV2DeviceStatus?: DeviceStatus$1;
458
+ };
459
+ type DeviceFeaturesRawPatch = {
460
+ [Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
461
+ };
462
+ type DeviceStateProtocol = DeviceFeaturesProtocol;
463
+ type DeviceStateMode = DeviceFeaturesMode;
464
+ type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
465
+ type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'settings-read' | 'settings-write' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
466
+ type DeviceStateIdentity = {
467
+ deviceType: IDeviceType;
468
+ firmwareType: EFirmwareType;
469
+ model: string | null;
470
+ vendor: string | null;
471
+ deviceId: string | null;
472
+ serialNo: string;
473
+ label: string | null;
474
+ bleName: string | null;
475
+ };
476
+ type DeviceStateStatus = {
477
+ mode: DeviceStateMode;
478
+ initialized: boolean | null;
479
+ unlocked: boolean | null;
480
+ firmwarePresent: boolean | null;
481
+ backupRequired: boolean | null;
482
+ noBackup: boolean | null;
483
+ unfinishedBackup: boolean | null;
484
+ recoveryMode: boolean | null;
485
+ passphraseProtection: boolean | null;
486
+ pinProtection: boolean | null;
487
+ /** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
488
+ attachToPinEnabled: boolean | null;
489
+ /** `unlocked_by_attach_to_pin`:本次解锁是否由 Attach PIN 完成。 */
490
+ unlockedAttachPin: boolean | null;
491
+ };
492
+ type DeviceStateSettings = {
493
+ language: string | null;
494
+ bleEnabled: boolean | null;
495
+ sdCardPresent: boolean | null;
496
+ sdProtection: boolean | null;
497
+ wipeCodeProtection: boolean | null;
498
+ passphraseAlwaysOnDevice: boolean | null;
499
+ safetyChecks: Enum_SafetyCheckLevel | null;
500
+ autoLockDelayMs: number | null;
501
+ autoShutdownDelayMs: number | null;
502
+ displayRotation: number | null;
503
+ experimentalFeatures: boolean | null;
504
+ wallpaperPath: string | null;
505
+ brightness: number | null;
506
+ animationEnabled: boolean | null;
507
+ tapToWake: boolean | null;
508
+ hapticFeedback: boolean | null;
509
+ deviceNameDisplayEnabled: boolean | null;
510
+ airgapMode: boolean | null;
511
+ fidoEnabled: boolean | null;
512
+ usbLockEnabled: boolean | null;
513
+ randomKeypad: boolean | null;
514
+ };
515
+ type DeviceStateVersions = {
516
+ firmware: string | null;
517
+ applicationP1?: string | null;
518
+ applicationP2?: string | null;
519
+ bootloader: string | null;
520
+ board: string | null;
521
+ ble: string | null;
522
+ /** @deprecated Kept for legacy consumers; new code should read se01. */
523
+ se?: string | null;
524
+ se01?: string | null;
525
+ se02?: string | null;
526
+ se03?: string | null;
527
+ se04?: string | null;
528
+ se01Boot?: string | null;
529
+ se02Boot?: string | null;
530
+ se03Boot?: string | null;
531
+ se04Boot?: string | null;
532
+ };
533
+ type DeviceState = {
534
+ schemaVersion: 1;
535
+ revision: number;
536
+ updatedAt: number;
537
+ protocol: DeviceStateProtocol;
538
+ /** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
539
+ protocolVersion: number | null;
540
+ identity: DeviceStateIdentity;
541
+ status: DeviceStateStatus;
542
+ settings: DeviceStateSettings;
543
+ versions: DeviceStateVersions;
544
+ capabilities: Array<number | string>;
545
+ verification?: Partial<DeviceFeaturesVerify>;
546
+ };
547
+ type DeviceStatePatch = {
548
+ protocol?: DeviceStateProtocol;
549
+ protocolVersion?: number | null;
550
+ identity?: Partial<DeviceStateIdentity>;
551
+ status?: Partial<DeviceStateStatus>;
552
+ settings?: Partial<DeviceStateSettings>;
553
+ versions?: Partial<DeviceStateVersions>;
554
+ capabilities?: Array<number | string>;
555
+ verification?: DeviceFeaturesVerify;
556
+ raw?: DeviceFeaturesRawPatch;
557
+ };
558
+ type DeviceStateEvent = {
559
+ connectId: string | null;
560
+ state: DeviceState;
561
+ revision: number;
562
+ source: DeviceStateUpdateSource;
563
+ changedKeys: string[];
579
564
  };
580
- type Features = {
565
+ type NormalizedFeatures = {
581
566
  protocol: DeviceFeaturesProtocol;
582
567
  protocolVersion?: number | null;
583
568
  deviceType: IDeviceType;
@@ -606,11 +591,23 @@ type Features = {
606
591
  sdProtection: boolean | null;
607
592
  wipeCodeProtection: boolean | null;
608
593
  passphraseAlwaysOnDevice: boolean | null;
594
+ /** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
609
595
  attachToPinEnabled?: boolean | null;
610
- safetyChecks: string | null;
596
+ safetyChecks: Enum_SafetyCheckLevel | null;
611
597
  autoLockDelayMs: number | null;
598
+ autoShutdownDelayMs: number | null;
612
599
  displayRotation: number | null;
613
600
  experimentalFeatures: boolean | null;
601
+ wallpaperPath: string | null;
602
+ brightness: number | null;
603
+ animationEnabled: boolean | null;
604
+ tapToWake: boolean | null;
605
+ hapticFeedback: boolean | null;
606
+ deviceNameDisplayEnabled: boolean | null;
607
+ airgapMode: boolean | null;
608
+ fidoEnabled: boolean | null;
609
+ usbLockEnabled: boolean | null;
610
+ randomKeypad: boolean | null;
614
611
  firmwareVersion: string | null;
615
612
  bootloaderVersion: string | null;
616
613
  boardVersion: string | null;
@@ -630,9 +627,16 @@ type Features = {
630
627
  unlockedAttachPin?: boolean;
631
628
  raw?: DeviceFeaturesRaw;
632
629
  };
630
+ type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
633
631
  type OnekeyFeatures = Messages.OnekeyFeatures;
634
- type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
635
- type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
632
+ type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2 | EDeviceType.Neo;
633
+ /**
634
+ * model_classic: 'classic' | 'classic1s' | 'classicpure'
635
+ * model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
636
+ * model_touch: 'touch' | 'pro'
637
+ * model_pro2: 'pro2' | 'neo'
638
+ */
639
+ type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s' | 'model_pro2';
636
640
  declare const DeviceModelToTypes: {
637
641
  [deviceModel in IDeviceModel]: IDeviceType[];
638
642
  };
@@ -645,7 +649,6 @@ type ITransportStatus = 'valid' | 'outdated';
645
649
  type IVersionRange = {
646
650
  min: string;
647
651
  max?: string;
648
- unsupported?: boolean;
649
652
  };
650
653
  type DeviceFirmwareRange = {
651
654
  [deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
@@ -696,309 +699,683 @@ type SupportFeatures = {
696
699
  modifyHomescreen: SupportFeatureType;
697
700
  };
698
701
 
699
- type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
700
- type ConnectSettings = {
701
- connectSrc?: string;
702
- debug?: boolean;
703
- transportReconnect?: boolean;
704
- lazyLoad?: boolean;
705
- origin?: string;
706
- parentOrigin?: string;
707
- configSrc: string;
708
- iframeSrc: string;
709
- version: string;
710
- priority: number;
711
- trustedHost: boolean;
712
- supportedBrowser?: boolean;
713
- env: transportEnv;
714
- timestamp: number;
715
- isFrame?: boolean;
716
- preRelease?: boolean;
717
- fetchConfig?: boolean;
718
- extension?: string;
719
- configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
720
- };
721
- type IVersionArray = [number, number, number];
722
- type ILocale = 'zh-CN' | 'en-US';
723
- type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04' | 'CRATE';
724
- type IProtocolV2FirmwareComponent = {
725
- target: IProtocolV2FirmwareComponentTarget;
726
- url: string;
727
- fingerprint?: string;
728
- version?: IVersionArray;
729
- resourceManifest?: IProtocolV2ResourceManifest;
730
- };
731
- type IProtocolV2ResourceManifestPackage = {
732
- name?: string;
733
- path: string;
734
- type?: string;
735
- version?: IVersionArray;
736
- sha256?: string;
737
- payloadHash?: string;
738
- headerHash?: string;
739
- };
740
- type IProtocolV2ResourceManifest = {
741
- format?: 'okpkg-crate' | string;
742
- target?: 'CRATE' | string;
743
- version?: IVersionArray;
744
- packages: IProtocolV2ResourceManifestPackage[];
745
- };
746
- type IFirmwareReleaseInfo = {
747
- required: boolean;
748
- url: string;
749
- firmwareType?: EFirmwareType;
750
- resource?: string;
751
- fullResource?: string;
752
- fullResourceRange?: string[];
753
- bootloaderResource?: string;
754
- bootloaderVersion?: IVersionArray;
755
- displayBootloaderVersion?: IVersionArray;
756
- bootloaderRelatedFirmwareVersion?: IVersionArray;
757
- upgradeType?: 'payload-package-set' | string;
758
- components?: Record<string, IProtocolV2FirmwareComponent>;
759
- installOrder?: string[];
760
- resourceManifest?: IProtocolV2ResourceManifest;
761
- bootloaderChangelog?: {
762
- [k in ILocale]: string;
763
- };
764
- fingerprint: string;
765
- version: IVersionArray;
766
- changelog: {
767
- [k in ILocale]: string;
768
- };
769
- };
770
- type IBLEFirmwareReleaseInfo = {
771
- required: boolean;
772
- url: string;
773
- webUpdate: string;
774
- fingerprint: string;
775
- fingerprintWeb: string;
776
- version: IVersionArray;
777
- changelog: {
778
- [k in ILocale]: string;
779
- };
780
- };
781
- type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
782
- type DeviceTypeMap = {
783
- [k in IKnownDevice]: {
784
- firmware: IFirmwareReleaseInfo[];
785
- 'firmware-v1'?: IFirmwareReleaseInfo[];
786
- 'firmware-v2'?: IFirmwareReleaseInfo[];
787
- 'firmware-v8'?: IFirmwareReleaseInfo[];
788
- 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
789
- ble: IBLEFirmwareReleaseInfo[];
790
- };
702
+ type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
703
+ type GetDeviceStateParams = CommonParams & {
704
+ scope?: DeviceStateScope;
791
705
  };
792
- type AssetsMap = {
793
- bridge: {
794
- version: IVersionArray;
795
- linux32Rpm: string;
796
- linux64Rpm: string;
797
- linux32Deb: string;
798
- linux64Deb: string;
799
- win: string;
800
- mac: string;
801
- sha256sumAsc: string;
802
- changelog: {
803
- [k in ILocale]: string;
804
- };
805
- };
706
+ /** Internal state-read options, not part of the public CoreApi. */
707
+ type DeviceStateReadOptions = {
708
+ refreshSections?: DeviceStateSection[];
709
+ includeRaw?: boolean;
806
710
  };
807
- type RemoteConfigResponse = {
808
- bridge: AssetsMap['bridge'];
809
- } & DeviceTypeMap;
810
-
811
- declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
812
- declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
813
-
814
- declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
815
-
816
- declare function preInitialize(connectId: string, params?: CommonParams): Response<boolean>;
711
+ declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
817
712
 
818
- declare function getLogs(): Response<string[]>;
819
-
820
- declare function checkBridgeStatus(): Response<boolean>;
713
+ type DeviceDescriptorDiff = {
714
+ didUpdate: boolean;
715
+ connected: OneKeyDeviceInfo[];
716
+ disconnected: OneKeyDeviceInfo[];
717
+ changedSessions: OneKeyDeviceInfo[];
718
+ changedDebugSessions: OneKeyDeviceInfo[];
719
+ acquired: OneKeyDeviceInfo[];
720
+ debugAcquired: OneKeyDeviceInfo[];
721
+ released: OneKeyDeviceInfo[];
722
+ debugReleased: OneKeyDeviceInfo[];
723
+ descriptors: OneKeyDeviceInfo[];
724
+ };
821
725
 
822
- type CheckBridgeReleaseResponse = {
823
- shouldUpdate: boolean;
824
- status: 'outdated' | 'valid';
825
- releaseVersion: string;
826
- } | null;
827
- declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
828
- willUpdateFirmwareVersion?: string;
829
- }): Response<CheckBridgeReleaseResponse>;
726
+ declare class DeviceConnector {
727
+ transport?: Transport;
728
+ listenTimestamp: number;
729
+ current: OneKeyDeviceInfo[] | null;
730
+ upcoming: OneKeyDeviceInfo[];
731
+ listening: boolean;
732
+ constructor();
733
+ private getActiveTransport;
734
+ enumerate(): Promise<DeviceDescriptorDiff | undefined>;
735
+ listen(): Promise<void>;
736
+ stop(): void;
737
+ acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, expectedProtocol?: HardwareConnectProtocol, protocolHint?: HardwareConnectProtocol): Promise<string | undefined>;
738
+ release(session: string, onclose: boolean): Promise<void>;
739
+ disconnect(session: string | undefined | null): Promise<void>;
740
+ promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
741
+ _reportDevicesChange(): void;
742
+ }
830
743
 
831
- type CheckBootloaderReleaseResponse = {
832
- shouldUpdate: boolean;
833
- status: 'outdated' | 'valid';
834
- release: string | undefined;
835
- bootloaderMode: boolean;
836
- } | null;
837
- type CheckBootloaderReleaseParams = {
838
- willUpdateFirmwareVersion?: string;
839
- firmwareType?: EFirmwareType;
744
+ type InitOptions = {
745
+ initSession?: boolean;
746
+ deviceId?: string;
747
+ passphraseState?: string;
748
+ deriveCardano?: boolean;
749
+ connectProtocol?: HardwareConnectProtocol;
750
+ forceProtocolDetection?: boolean;
751
+ protocolV2DeviceInfoTimeoutMs?: number;
752
+ /** Refresh Protocol V2 runtime state before returning discovery results. */
753
+ refreshRuntimeState?: boolean;
754
+ /**
755
+ * Protocol V1 Initialize response timeout override. Reboot-wait polling passes a
756
+ * short value so an unanswered probe settles before the next poll tick.
757
+ */
758
+ timeoutMs?: number;
840
759
  };
841
- declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
760
+ type RunOptions = {
761
+ keepSession?: boolean;
762
+ skipInitialize?: boolean;
763
+ } & InitOptions;
764
+ interface DeviceEvents {
765
+ [DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
766
+ [DEVICE.PIN_ON_DEVICE]: [Device, DeviceSessionPinType, ProtocolV2UiEventMetadata?];
767
+ [DEVICE.PIN_ON_DEVICE_COMPLETE]: [Device, HardwareUiInteractionMeta];
768
+ [DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
769
+ [DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
770
+ [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
771
+ [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
772
+ [DEVICE.STATE]: [Device, DeviceStateEvent];
773
+ [DEVICE.PASSPHRASE]: [
774
+ Device,
775
+ PassphraseRequestPayload,
776
+ (response: PassphrasePromptResponse, error?: Error) => void
777
+ ];
778
+ [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
779
+ Device,
780
+ (err: any, deviceId: string) => void
781
+ ];
782
+ [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
783
+ Device,
784
+ (err: any, deviceId: string) => void
785
+ ];
786
+ }
787
+ /**
788
+ * Pre-populate the device session cache with a known session ID.
789
+ *
790
+ * This allows short-lived processes (e.g. CLI) to restore a previously
791
+ * obtained session, avoiding the need to re-enter passphrase on every
792
+ * invocation. The session must have been obtained from a prior
793
+ * wallet-session call on the same device. This compatibility hook is intended
794
+ * for a trusted CLI process restoring its own OS-keychain entry.
795
+ *
796
+ * @param deviceId - The device's device_id (from features)
797
+ * @param passphraseState - The passphrase state token
798
+ * @param sessionId - The session_id to cache (from features.session_id)
799
+ */
800
+ declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
801
+ interface Device {
802
+ on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
803
+ off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
804
+ emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
805
+ }
806
+ declare class Device extends EventEmitter {
807
+ /**
808
+ * 设备标识对象
809
+ */
810
+ originalDescriptor: OneKeyDeviceInfo;
811
+ sdkInstanceId?: string;
812
+ /**
813
+ * 设备实例唯一标识
814
+ */
815
+ instanceId: string;
816
+ createdAt: number;
817
+ /**
818
+ * 设备主 ID
819
+ * 蓝牙连接时是设备的 UUID
820
+ * USB连接时是设备的 sessionID
821
+ */
822
+ mainId?: string | null;
823
+ /**
824
+ * 通信管道,向设备发送请求
825
+ */
826
+ deviceConnector?: DeviceConnector | null;
827
+ /**
828
+ * 固件命令
829
+ */
830
+ commands: DeviceCommands;
831
+ /**
832
+ * 可取消的操作
833
+ */
834
+ private cancelableAction?;
835
+ /**
836
+ * 设备是否被占用
837
+ */
838
+ private deviceAcquired;
839
+ /** Canonical device-state cache; legacy Features is a compatibility projection. */
840
+ private stateStore;
841
+ /** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
842
+ private protocolV2StateNeedsReload;
843
+ /** Runtime context negotiated once per active Protocol V2 link. */
844
+ private protocolV2RuntimeContext?;
845
+ /** Coalesces concurrent first-use runtime negotiation on the same active link. */
846
+ private protocolV2RuntimeContextPromise?;
847
+ /** Invalidates an in-flight runtime-context response without adding a transport epoch. */
848
+ private protocolV2RuntimeContextRequestToken?;
849
+ private protocolV2UiInteraction?;
850
+ private protocolV2UiInteractionCounter;
851
+ get state(): (DeviceState & {
852
+ raw?: DeviceFeaturesRaw | undefined;
853
+ }) | undefined;
854
+ get features(): Features | undefined;
855
+ set features(features: Features | undefined);
856
+ runPromise?: Deferred<void> | null;
857
+ externalState: string[];
858
+ unavailableCapabilities: UnavailableCapabilities;
859
+ instance: number;
860
+ internalState: string[];
861
+ needReloadDevice: boolean;
862
+ /**
863
+ * 执行 API 方法后是否保留 SessionID
864
+ */
865
+ keepSession: boolean;
866
+ passphraseState: string | undefined;
867
+ pendingCallbackPromise?: Deferred<void>;
868
+ /** Pre-initialize timestamp (ms) */
869
+ private preInitializedAt?;
870
+ /** Pre-initialize context, used to verify state consistency before skipping */
871
+ private preInitializeMeta?;
872
+ /** Last Initialize duration (ms), reported as "saved" when a skip happens */
873
+ private lastInitializeDurationMs?;
874
+ constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
875
+ static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
876
+ toMessageObject(): Device$1 | null;
877
+ /**
878
+ * Device connect
879
+ * @returns {Promise<boolean>}
880
+ */
881
+ connect(connectProtocol?: HardwareConnectProtocol, options?: {
882
+ forceProtocolDetection?: boolean;
883
+ }): Promise<boolean>;
884
+ acquire(expectedProtocol?: HardwareConnectProtocol, options?: {
885
+ throwOnRunPromiseError?: boolean;
886
+ forceProtocolDetection?: boolean;
887
+ }): Promise<void>;
888
+ release(): Promise<void>;
889
+ /**
890
+ * Pre-initialize: connect + Initialize ahead of the sign.
891
+ */
892
+ preInitialize(initOptions?: InitOptions): Promise<void>;
893
+ markPreInitialized(meta?: {
894
+ passphraseState?: string;
895
+ }): void;
896
+ clearPreInitialized(): void;
897
+ isPreInitializeMetaMatch(payload?: {
898
+ passphraseState?: string;
899
+ }): boolean;
900
+ isPreInitializedValid(ttlMs: number): boolean;
901
+ setLastInitializeDuration(durationMs: number): void;
902
+ getLastInitializeDuration(): number | undefined;
903
+ getCommands(): DeviceCommands;
904
+ /**
905
+ * Canonical protocol discriminator.
906
+ *
907
+ * descriptor.protocolType is established by active probing; V2 features are mapped
908
+ * from DeviceInfoGet. All protocol branches must use this method instead of reading
909
+ * originalDescriptor.protocolType directly or inferring a protocol from features.
910
+ */
911
+ getProtocol(): 'V1' | 'V2';
912
+ isProtocolV2(): boolean;
913
+ getCurrentDeviceType(): IDeviceType;
914
+ getCurrentDeviceId(): string | undefined;
915
+ getCurrentSerialNo(): string;
916
+ getConnectId(): string;
917
+ getCurrentBleName(): string | null;
918
+ getCurrentLabel(): string | null;
919
+ getCurrentDisplayName(): string | null;
920
+ getCurrentPassphraseProtection(): boolean | null | undefined;
921
+ getCurrentFirmwareType(): EFirmwareType;
922
+ getCurrentFirmwareVersionString(): string;
923
+ getCurrentBLEFirmwareVersionString(): string | undefined;
924
+ getCurrentBootloaderVersionString(): string | undefined;
925
+ getCurrentSafetyChecks(): _onekeyfe_hd_transport.Enum_SafetyCheckLevel | null | undefined;
926
+ getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
927
+ supportNewPassphrase(): SupportFeatureType;
928
+ supportInputPinOnSoftware(): SupportFeatureType;
929
+ supportModifyHomescreen(): SupportFeatureType;
930
+ private getSessionCacheDeviceKey;
931
+ private reconcileSessionCacheDeviceIdentity;
932
+ getInternalState(_deviceId?: string): string | undefined;
933
+ getStandardInternalState(_deviceId?: string): {
934
+ passphraseState: string;
935
+ sessionId: string;
936
+ } | undefined;
937
+ updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null, walletType?: 'standard' | 'hidden'): void;
938
+ private setInternalState;
939
+ clearInternalState(_deviceId?: string): void;
940
+ clearStandardInternalState(_deviceId?: string): void;
941
+ initialize(options?: InitOptions): Promise<void>;
942
+ /**
943
+ * Device initialization over Protocol V2.
944
+ *
945
+ * Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
946
+ * features state directly from DeviceInfoGet.
947
+ */
948
+ private _initializeProtocolV2;
949
+ getFeatures(): Promise<Features | undefined>;
950
+ getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
951
+ _updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
952
+ updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
953
+ raw?: DeviceFeaturesRaw | undefined;
954
+ };
955
+ updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
956
+ ensureProtocolV2RuntimeContext(timeoutMs?: number): Promise<ProtocolInfo>;
957
+ probeProtocolV2RuntimeState(deviceInfo?: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
958
+ updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode, protocolInfo?: ProtocolInfo): Features;
959
+ updateProtocolV2Status(status: DeviceStatus$1): Features;
960
+ markTransportDisconnected(): void;
961
+ invalidateAfterWipe(): void;
962
+ markProtocolV2Reboot(rebootType: DeviceRebootType): void;
963
+ /**
964
+ * 暂时只在 acquire 后更新 Session ID
965
+ * 后续看是否有需要依据 listen 返回结果更新
966
+ * @param descriptor
967
+ */
968
+ updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
969
+ updateFromCache(device: Device): void;
970
+ run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
971
+ _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
972
+ interruptionFromOutside(): Promise<void>;
973
+ interruptionFromUser(): Promise<void>;
974
+ setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
975
+ clearCancelableAction(): void;
976
+ getMode(): EOneKeyDeviceMode;
977
+ getStatus(): "available" | "occupied" | "used";
978
+ getFirmwareVersion(): IVersionArray | null;
979
+ getBLEFirmwareVersion(): IVersionArray | null;
980
+ isUsed(): boolean;
981
+ hasDeviceAcquire(): boolean;
982
+ isUsedHere(): boolean;
983
+ isUsedElsewhere(): boolean;
984
+ isBootloader(): boolean | undefined;
985
+ isRomloader(): boolean | undefined;
986
+ isInitialized(): boolean | undefined;
987
+ isSeedless(): boolean | undefined;
988
+ isUnacquired(): boolean;
989
+ hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
990
+ hasUsePassphrase(): boolean;
991
+ checkDeviceId(deviceId: string): boolean;
992
+ lockDevice(): Promise<Success$1>;
993
+ beginProtocolV2UiInteraction(): void;
994
+ createProtocolV2UiPhaseMetadata(phase: HardwareUiInteractionMeta['phase'], transition: HardwareUiInteractionMeta['transition'], options?: {
995
+ phaseId?: string;
996
+ outcome?: HardwareUiInteractionMeta['outcome'];
997
+ }): HardwareUiInteractionMeta | undefined;
998
+ completeProtocolV2UiPhase(phase: HardwareUiInteractionMeta, outcome?: HardwareUiInteractionMeta['outcome']): HardwareUiInteractionMeta | undefined;
999
+ finishProtocolV2UiInteraction(outcome?: HardwareUiInteractionMeta['outcome'], options?: {
1000
+ ensureMetadata?: boolean;
1001
+ }): HardwareUiInteractionMeta | undefined;
1002
+ hasOpenProtocolV2UiInteraction(): boolean;
1003
+ supportUnlockVersionRange(): DeviceFirmwareRange;
1004
+ unlockDevice(pinType?: DeviceSessionPinType, options?: ProtocolV2UiEventMetadata & {
1005
+ emitUiEvent?: boolean;
1006
+ }): Promise<Features | undefined>;
1007
+ checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean, deriveCardano?: boolean): Promise<boolean>;
1008
+ }
842
1009
 
843
- type FirmwareRelease$2 = {
844
- shouldUpdate?: boolean;
845
- status: IDeviceFirmwareStatus;
846
- changelog?: {
847
- 'zh-CN': string;
848
- 'en-US': string;
849
- }[];
850
- release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo;
851
- bootloaderMode?: boolean;
1010
+ /**
1011
+ * SDK Tracing Utilities
1012
+ * Tracks object instances and request call chains across multiple SDK instances
1013
+ */
1014
+ /**
1015
+ * Generate SDK instance ID
1016
+ * @returns Format: "SDK-<number>-<timestamp>"
1017
+ * @example "SDK-1-123456"
1018
+ */
1019
+ declare function generateSdkInstanceId(): string;
1020
+ /**
1021
+ * Generate globally unique instance ID
1022
+ * @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
1023
+ * @param sdkInstanceId SDK instance ID (optional)
1024
+ * @returns Format: <SDK>.<type>-<number>-<timestamp>
1025
+ * @example "SDK-1.Device-1-123456" or "Device-1-123456"
1026
+ */
1027
+ declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
1028
+ /**
1029
+ * Request context information
1030
+ */
1031
+ interface RequestContext {
1032
+ /** Request unique ID (reuses BaseMethod.responseID) */
1033
+ responseID: number;
1034
+ /** SDK instance ID */
1035
+ sdkInstanceId?: string;
1036
+ /** API method name */
1037
+ methodName: string;
1038
+ /** Device connection ID */
1039
+ connectId?: string;
1040
+ /** Device instance ID */
1041
+ deviceInstanceId?: string;
1042
+ /** DeviceCommands instance ID */
1043
+ commandsInstanceId?: string;
1044
+ /** Parent request ID (for nested calls like allNetworkGetAddress) */
1045
+ parentResponseID?: number;
1046
+ /** Request start time */
1047
+ startTime: number;
1048
+ /** Request end time */
1049
+ endTime?: number;
1050
+ /** Request status */
1051
+ status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
1052
+ /** Error message */
1053
+ error?: string;
1054
+ }
1055
+ /**
1056
+ * SDK instance tracing context
1057
+ */
1058
+ interface SdkTracingContext {
1059
+ /** SDK instance ID */
1060
+ sdkInstanceId: string;
1061
+ /** Creation timestamp */
1062
+ createdAt: number;
1063
+ /** Active requests */
1064
+ activeRequests: Map<number, RequestContext>;
1065
+ }
1066
+ /**
1067
+ * Create SDK instance tracing context
1068
+ */
1069
+ declare function createSdkTracingContext(): SdkTracingContext;
1070
+ /**
1071
+ * Create and register request context
1072
+ * @param responseID Request ID (reuses BaseMethod.responseID)
1073
+ * @param methodName API method name
1074
+ * @param options Additional options
1075
+ */
1076
+ declare function createRequestContext(responseID: number, methodName: string, options?: {
1077
+ sdkInstanceId?: string;
1078
+ connectId?: string;
1079
+ deviceInstanceId?: string;
1080
+ commandsInstanceId?: string;
1081
+ parentResponseID?: number;
1082
+ }): RequestContext;
1083
+ /**
1084
+ * Update request context
1085
+ */
1086
+ declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
1087
+ /**
1088
+ * Complete request context
1089
+ */
1090
+ declare function completeRequestContext(responseID: number, error?: Error): void;
1091
+ /**
1092
+ * Get active requests for specific Device instance
1093
+ */
1094
+ declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
1095
+ /**
1096
+ * Format request context for logging
1097
+ */
1098
+ declare function formatRequestContext(context: RequestContext): string;
1099
+ /**
1100
+ * Cleanup specific SDK instance
1101
+ */
1102
+ declare function cleanupSdkInstance(sdkInstanceId: string): void;
1103
+
1104
+ declare class Core extends EventEmitter {
1105
+ private tracingContext;
1106
+ readonly sdkInstanceId: string;
1107
+ private requestQueue;
1108
+ private disposePromise?;
1109
+ private prePendingCallPromise;
1110
+ private methodSynchronize;
1111
+ constructor();
1112
+ private getCoreContext;
1113
+ handleMessage(message: CoreMessage): Promise<any>;
1114
+ dispose(): Promise<void>;
1115
+ private disposeResources;
1116
+ }
1117
+ declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
1118
+ declare const switchTransport: ({ env, Transport, plugin, }: {
1119
+ env: ConnectSettings['env'];
1120
+ Transport: any;
1121
+ plugin?: LowlevelTransportSharedPlugin | undefined;
1122
+ }) => void;
1123
+
1124
+ declare const PRO2_WALLPAPER_WIDTH = 604;
1125
+ declare const PRO2_WALLPAPER_HEIGHT = 1024;
1126
+ type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
1127
+ declare function encodePro2Wallpaper(options: {
1128
+ width: number;
1129
+ height: number;
1130
+ rgba: Uint8Array | ArrayBuffer;
1131
+ }): {
1132
+ data: Uint8Array;
1133
+ colorFormat: Pro2WallpaperColorFormat;
852
1134
  };
853
- type AllFirmwareRelease = {
854
- firmware: FirmwareRelease$2;
855
- ble: FirmwareRelease$2;
856
- bootloader?: FirmwareRelease$2;
857
- bridge?: FirmwareRelease$2;
858
- features?: Features$1;
1135
+
1136
+ type DeviceUploadWallpaperParams = {
1137
+ width: number;
1138
+ height: number;
1139
+ rgba: Uint8Array | ArrayBuffer;
1140
+ fileName?: string;
1141
+ chunkSize?: number;
859
1142
  };
860
- type CheckAllFirmwareReleaseParams = {
861
- checkBridgeRelease?: boolean;
862
- firmwareType?: EFirmwareType;
1143
+ type DeviceUploadWallpaperResponse = {
1144
+ path: string;
1145
+ size: number;
1146
+ colorFormat: Pro2WallpaperColorFormat;
1147
+ message?: string;
863
1148
  };
864
- declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
865
1149
 
866
- type CheckFirmwareTypeAvailableParams = {
867
- deviceType: EDeviceType;
868
- firmwareType: EFirmwareType;
1150
+ type Pro2NftImage = {
1151
+ width: number;
1152
+ height: number;
1153
+ rgba: Uint8Array | ArrayBuffer;
869
1154
  };
870
- declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
871
1155
 
872
- declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
873
-
874
- declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
875
-
876
- type DeviceInfoProtocol = ProtocolType | 'unknown';
877
- type DeviceInfoSource = 'features' | 'protocolV1OneKeyFeatures' | 'deviceInfo';
878
- type DeviceInfoScope = 'basic' | 'versions' | 'verify' | 'full';
879
- type GetDeviceInfoParams = {
880
- scope?: DeviceInfoScope;
881
- refresh?: boolean;
882
- includeRaw?: boolean;
883
- };
884
- type DeviceInfoMode = 'normal' | 'bootloader' | 'notInitialized' | 'unknown';
885
- type DeviceInfoStatus = {
886
- mode: DeviceInfoMode;
887
- initialized: boolean | null;
888
- bootloaderMode: boolean | null;
889
- unlocked: boolean | null;
890
- passphraseProtection: boolean | null;
891
- attachToPinEnabled?: boolean | null;
892
- unlockedAttachPin?: boolean | null;
893
- backupRequired: boolean | null;
894
- noBackup: boolean | null;
895
- language: string | null;
896
- bleEnabled: boolean | null;
897
- };
898
- type DeviceProfileVersions = {
899
- firmware: string | null;
900
- bootloader: string | null;
901
- board: string | null;
902
- ble: string | null;
903
- se01?: string | null;
904
- se02?: string | null;
905
- se03?: string | null;
906
- se04?: string | null;
907
- se01Boot?: string | null;
908
- se02Boot?: string | null;
909
- se03Boot?: string | null;
910
- se04Boot?: string | null;
1156
+ type DeviceUploadNftParams = {
1157
+ image: Pro2NftImage;
1158
+ thumbnail: Pro2NftImage;
1159
+ title: string;
1160
+ subtitle: string;
1161
+ timestampMs?: number;
1162
+ chunkSize?: number;
1163
+ paceMs?: number;
1164
+ timeoutMs?: number;
1165
+ };
1166
+ type DeviceUploadNftResponse = {
1167
+ basename: string;
1168
+ imagePath: string;
1169
+ thumbnailPath: string;
1170
+ metadataPath: string;
1171
+ totalSize: number;
1172
+ nftUpdated: true;
1173
+ message?: string;
911
1174
  };
912
- type DeviceProfileVerify = {
913
- firmwareBuildId?: string;
914
- firmwareHash?: string;
915
- bootloaderBuildId?: string;
916
- bootloaderHash?: string;
917
- boardBuildId?: string;
918
- boardHash?: string;
919
- bleBuildId?: string;
920
- bleHash?: string;
921
- se01BuildId?: string;
922
- se01Hash?: string;
923
- se02BuildId?: string;
924
- se02Hash?: string;
925
- se03BuildId?: string;
926
- se03Hash?: string;
927
- se04BuildId?: string;
928
- se04Hash?: string;
929
- se01BootBuildId?: string;
930
- se01BootHash?: string;
931
- se02BootBuildId?: string;
932
- se02BootHash?: string;
933
- se03BootBuildId?: string;
934
- se03BootHash?: string;
935
- se04BootBuildId?: string;
936
- se04BootHash?: string;
1175
+
1176
+ type FileInfo = {
1177
+ path: string;
1178
+ offset: number;
1179
+ total_size: number;
1180
+ data?: Uint8Array;
1181
+ data_hash?: number;
1182
+ processed_byte?: number;
1183
+ chunks?: number;
937
1184
  };
938
- type DeviceProfileRaw = {
939
- features?: Features;
940
- protocolV1OneKeyFeatures?: OnekeyFeatures;
941
- protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
1185
+ type TestProtocolV2PingParams = CommonParams & {
1186
+ /** Firmware diagnostic echo payload, limited to 63 UTF-8 bytes. */
1187
+ message?: string;
942
1188
  };
943
- type DeviceProfile = {
944
- protocol: DeviceInfoProtocol;
945
- sources: DeviceInfoSource[];
946
- deviceType: IDeviceType;
947
- firmwareType: EFirmwareType;
948
- deviceId: string;
949
- serialNo: string;
950
- label: string | null;
951
- bleName: string | null;
952
- status: DeviceInfoStatus;
953
- versions: DeviceProfileVersions;
954
- verify?: DeviceProfileVerify;
955
- raw?: DeviceProfileRaw;
1189
+ declare function testProtocolV2Ping(connectId: string, params?: TestProtocolV2PingParams): Response<Success$1>;
1190
+ declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
1191
+ declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
1192
+ declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
1193
+ declare function deviceUploadNft(connectId: string, params: CommonParams & DeviceUploadNftParams): Response<DeviceUploadNftResponse>;
1194
+ declare function uploadPortfolio(connectId: string, params: {
1195
+ packageBytes: ArrayBuffer | Uint8Array | Blob;
1196
+ timeoutMs?: number | string;
1197
+ }): Response<FileInfo & {
1198
+ portfolioUpdated: true;
1199
+ }>;
1200
+
1201
+ declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
1202
+ declare const off: (type: any, fn: any) => void;
1203
+ declare const removeAllListeners: (type: any) => void;
1204
+
1205
+ declare function uiResponse(response: UiResponseEvent): void;
1206
+
1207
+ type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
1208
+ interface LowLevelInjectApi {
1209
+ call: CallMethod;
1210
+ eventEmitter: EventEmitter$1;
1211
+ init: CoreApi['init'];
1212
+ dispose: CoreApi['dispose'];
1213
+ uiResponse: CoreApi['uiResponse'];
1214
+ cancel: CoreApi['cancel'];
1215
+ updateSettings: CoreApi['updateSettings'];
1216
+ switchTransport: CoreApi['switchTransport'];
1217
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
1218
+ }
1219
+ type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
1220
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
956
1221
  };
957
- declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
958
1222
 
959
- declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
1223
+ declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
1224
+ declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
1225
+
1226
+ declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
1227
+
1228
+ declare function preInitialize(connectId: string, params?: CommonParams): Response<boolean>;
1229
+
1230
+ declare function getLogs(): Response<string[]>;
960
1231
 
961
- type GetPassphraseStatePayload = {
1232
+ type ClearSessionCacheParams = {
1233
+ deviceId?: never;
1234
+ passphraseState?: never;
1235
+ } | {
1236
+ deviceId: string;
962
1237
  passphraseState?: string;
963
- sessionId?: string;
964
- unlockedAttachPin?: boolean;
965
- passphraseProtection?: boolean | null;
966
1238
  };
967
- type GetPassphraseStateParams = CommonParams & {
968
- allowCreateAttachPin?: boolean;
1239
+ type ClearSessionCachePayload = {
1240
+ cleared: true;
969
1241
  };
970
- declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<GetPassphraseStatePayload>;
1242
+ declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
971
1243
 
972
- type FirmwareRelease$1 = {
973
- status: IDeviceFirmwareStatus;
974
- changelog: {
975
- 'en-US': string;
976
- 'zh-CN': string;
977
- }[];
978
- release: IFirmwareReleaseInfo;
1244
+ declare function checkBridgeStatus(): Response<boolean>;
1245
+
1246
+ type CheckBridgeReleaseResponse = {
1247
+ shouldUpdate: boolean;
1248
+ status: 'outdated' | 'valid';
1249
+ releaseVersion: string;
1250
+ } | null;
1251
+ declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
1252
+ willUpdateFirmwareVersion?: string;
1253
+ }): Response<CheckBridgeReleaseResponse>;
1254
+
1255
+ type CheckBootloaderReleaseResponse = {
1256
+ shouldUpdate: boolean;
1257
+ status: 'outdated' | 'valid';
1258
+ release: string | undefined;
979
1259
  bootloaderMode: boolean;
980
- };
981
- type CheckFirmwareReleaseParams = {
1260
+ } | null;
1261
+ type CheckBootloaderReleaseParams = {
1262
+ willUpdateFirmwareVersion?: string;
982
1263
  firmwareType?: EFirmwareType;
983
1264
  };
984
- declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
1265
+ declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
985
1266
 
986
- type BleFirmwareRelease = {
987
- status: IDeviceBLEFirmwareStatus;
988
- changelog: {
989
- 'zh-CN': string;
990
- 'en-US': string;
991
- }[];
992
- release: IBLEFirmwareReleaseInfo;
993
- bootloaderMode: boolean;
994
- };
995
- declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
1267
+ type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
1268
+ type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
1269
+ type FirmwareUpdatePlanForceTarget = 'firmware' | 'ble' | 'bootloader' | 'resource';
1270
+ interface FirmwareUpdatePlanArtifact {
1271
+ artifactId: string;
1272
+ role: FirmwareUpdatePlanArtifactRole;
1273
+ target: FirmwareUpdatePlanTarget;
1274
+ url: string;
1275
+ container: 'raw' | 'zip';
1276
+ logicalName?: string;
1277
+ expectedSize?: number;
1278
+ expectedSha256?: string;
1279
+ targetVersion?: string;
1280
+ }
1281
+ interface FirmwareUpdatePlan {
1282
+ schemaVersion: 2;
1283
+ planDigest: string;
1284
+ executor: 'v2' | 'v3' | 'v4';
1285
+ deviceIdentity: string;
1286
+ deviceModel: string;
1287
+ firmwareType: EFirmwareType;
1288
+ platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
1289
+ artifacts: FirmwareUpdatePlanArtifact[];
1290
+ targetsToUpdate: FirmwareUpdatePlanTarget[];
1291
+ }
1292
+
1293
+ interface FirmwareUpdatePreparedEntry {
1294
+ entryName: string;
1295
+ artifact: FirmwareArtifactReference;
1296
+ }
1297
+ interface FirmwareUpdatePreparedArtifactInput {
1298
+ artifactId: string;
1299
+ artifact: FirmwareArtifactReference;
1300
+ materializedEntries?: FirmwareUpdatePreparedEntry[];
1301
+ }
1302
+ interface FirmwareUpdatePreparedArtifact {
1303
+ artifactId: string;
1304
+ role: FirmwareUpdatePlanArtifactRole;
1305
+ target: FirmwareUpdatePlanTarget;
1306
+ container: 'raw' | 'zip';
1307
+ logicalName?: string;
1308
+ targetVersion?: string;
1309
+ artifact: FirmwareArtifactReference;
1310
+ materializedEntries?: FirmwareUpdatePreparedEntry[];
1311
+ }
1312
+ interface FirmwareUpdatePreparedPlan {
1313
+ schemaVersion: 2;
1314
+ preparedPlanDigest: string;
1315
+ planDigest: string;
1316
+ networkPolicy: 'forbid';
1317
+ executor: FirmwareUpdatePlan['executor'];
1318
+ deviceIdentity: string;
1319
+ deviceModel: string;
1320
+ firmwareType: FirmwareUpdatePlan['firmwareType'];
1321
+ platform: FirmwareUpdatePlan['platform'];
1322
+ leaseRef: string;
1323
+ artifacts: FirmwareUpdatePreparedArtifact[];
1324
+ targetsToUpdate: FirmwareUpdatePlanTarget[];
1325
+ }
1326
+ declare function prepareFirmwareUpdatePlan(input: {
1327
+ plan: FirmwareUpdatePlan;
1328
+ leaseRef: string;
1329
+ artifacts: FirmwareUpdatePreparedArtifactInput[];
1330
+ }): FirmwareUpdatePreparedPlan;
1331
+ declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
996
1332
 
997
1333
  type IUpdateType = 'firmware' | 'ble';
1334
+ interface FirmwareArtifactReference {
1335
+ artifactRef: string;
1336
+ size: number;
1337
+ sha256: string;
1338
+ }
1339
+ interface FirmwareArtifactReader {
1340
+ open(input: {
1341
+ artifactRef: string;
1342
+ }): Promise<{
1343
+ readerId: string;
1344
+ size: number;
1345
+ }>;
1346
+ read(input: {
1347
+ readerId: string;
1348
+ offset: number;
1349
+ length: number;
1350
+ }): Promise<{
1351
+ data: ArrayBuffer;
1352
+ bytesRead: number;
1353
+ eof: boolean;
1354
+ }>;
1355
+ close(input: {
1356
+ readerId: string;
1357
+ }): Promise<void>;
1358
+ }
1359
+ interface FirmwareUpdateHostBinding {
1360
+ artifactReader: FirmwareArtifactReader;
1361
+ }
998
1362
  interface FirmwareUpdateBinaryParams {
999
1363
  binary: ArrayBuffer;
1000
1364
  updateType: IUpdateType;
1001
1365
  }
1366
+ interface FirmwareUpdateArtifactParams {
1367
+ preparedPlan: FirmwareUpdatePreparedPlan;
1368
+ hostBindingGeneration: number;
1369
+ artifact: FirmwareArtifactReference;
1370
+ resourceEntries?: Array<{
1371
+ entryName: string;
1372
+ artifact: FirmwareArtifactReference;
1373
+ }>;
1374
+ updateType: IUpdateType;
1375
+ forcedUpdateRes?: boolean;
1376
+ isUpdateBootloader?: boolean;
1377
+ firmwareType?: EFirmwareType;
1378
+ }
1002
1379
  interface FirmwareUpdateParams {
1003
1380
  version?: number[];
1004
1381
  updateType: IUpdateType;
@@ -1018,7 +1395,10 @@ type Platform = {
1018
1395
  };
1019
1396
  declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
1020
1397
  declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
1398
+ declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateArtifactParams & Platform>): Response<Messages.Success>;
1021
1399
  interface FirmwareUpdateV3Params {
1400
+ preparedPlan?: FirmwareUpdatePreparedPlan;
1401
+ hostBindingGeneration?: number;
1022
1402
  bleVersion?: number[];
1023
1403
  bleBinary?: ArrayBuffer;
1024
1404
  chunkSize?: number;
@@ -1030,23 +1410,67 @@ interface FirmwareUpdateV3Params {
1030
1410
  forcedUpdateRes?: boolean;
1031
1411
  firmwareType?: EFirmwareType;
1032
1412
  platform: IPlatform;
1413
+ artifactReader?: FirmwareArtifactReader;
1414
+ artifacts?: {
1415
+ ble?: FirmwareArtifactReference;
1416
+ firmware?: FirmwareArtifactReference;
1417
+ bootloader?: FirmwareArtifactReference;
1418
+ resourceEntries?: Array<{
1419
+ entryName: string;
1420
+ artifact: FirmwareArtifactReference;
1421
+ }>;
1422
+ };
1033
1423
  }
1424
+ /**
1425
+ * firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
1426
+ * Except for romloader, each field maps to a target accepted by bootloader.
1427
+ */
1428
+ type FirmwareUpdateV4Target = 'boot' | 'boot_resources' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
1034
1429
  interface FirmwareUpdateV4Params {
1430
+ preparedPlan?: FirmwareUpdatePreparedPlan;
1431
+ hostBindingGeneration?: number;
1035
1432
  platform: IPlatform;
1433
+ expectedDeviceId?: string;
1036
1434
  chunkSize?: number;
1037
1435
  firmwareType?: EFirmwareType;
1436
+ targetsToUpdate?: FirmwareUpdateV4Target[];
1437
+ expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
1438
+ /** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
1038
1439
  romloaderBinary?: ArrayBuffer;
1440
+ /** FW_MGMT_TARGET_BOOTLOADER = 3 */
1039
1441
  bootloaderBinary?: ArrayBuffer;
1442
+ /** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
1040
1443
  applicationP1Binary?: ArrayBuffer;
1444
+ /** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
1041
1445
  applicationP2Binary?: ArrayBuffer;
1446
+ /** FW_MGMT_TARGET_COPROCESSOR = 6 */
1042
1447
  coprocessorBinary?: ArrayBuffer;
1448
+ /** FW_MGMT_TARGET_SE01-04 = 7-10 */
1043
1449
  se01Binary?: ArrayBuffer;
1044
1450
  se02Binary?: ArrayBuffer;
1045
1451
  se03Binary?: ArrayBuffer;
1046
1452
  se04Binary?: ArrayBuffer;
1047
- resourceBinaries?: ArrayBuffer[];
1048
1453
  forcedUpdateRes?: boolean;
1454
+ /**
1455
+ * Arbitrary Protocol V2 resource files written directly with FilesystemFileWrite.
1456
+ * Use this for manifest-driven boot resources and other non-RESC files.
1457
+ */
1458
+ resourceFiles?: Array<{
1459
+ binary: ArrayBuffer;
1460
+ devicePath: string;
1461
+ size?: number;
1462
+ fileHash?: string;
1463
+ }>;
1464
+ artifactReader?: FirmwareArtifactReader;
1465
+ componentArtifacts?: Partial<Record<Exclude<FirmwareUpdateV4Target, 'resource'>, FirmwareArtifactReference>>;
1466
+ resourceBundleArtifacts?: Array<{
1467
+ name: string;
1468
+ artifact: FirmwareArtifactReference;
1469
+ }>;
1049
1470
  }
1471
+ declare function registerFirmwareUpdateHostBinding$1(binding: FirmwareUpdateHostBinding): number;
1472
+ declare function unregisterFirmwareUpdateHostBinding$1(generation?: number): boolean;
1473
+ declare function getFirmwareUpdateHostBindingGeneration$1(): number;
1050
1474
  declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
1051
1475
  bleVersion: string;
1052
1476
  firmwareVersion: string;
@@ -1058,6 +1482,156 @@ declare function firmwareUpdateV4(connectId: string | undefined, params: Params<
1058
1482
  bootloaderVersion: string;
1059
1483
  }>;
1060
1484
 
1485
+ type FirmwareRelease$2 = {
1486
+ shouldUpdate?: boolean;
1487
+ status: IDeviceFirmwareStatus;
1488
+ changelog?: {
1489
+ 'zh-CN': string;
1490
+ 'en-US': string;
1491
+ }[];
1492
+ release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo | IFirmwareReleaseInfo;
1493
+ bootloaderMode?: boolean;
1494
+ };
1495
+ type ProtocolV2FirmwareComponentReleaseStatus = 'valid' | 'outdated' | 'unknown' | 'unsupported';
1496
+ type ProtocolV2FirmwareReleaseStatus = 'unavailable' | 'valid' | 'unknown' | 'outdated' | 'required';
1497
+ type ProtocolV2FirmwareComponentRelease = {
1498
+ configKey: string;
1499
+ componentTarget: IProtocolV2FirmwareComponentTarget;
1500
+ updateTarget: FirmwareUpdateV4Target | null;
1501
+ currentVersion: string | null;
1502
+ targetVersion: string | null;
1503
+ status: ProtocolV2FirmwareComponentReleaseStatus;
1504
+ required: boolean;
1505
+ };
1506
+ type AllFirmwareRelease = {
1507
+ firmware: FirmwareRelease$2;
1508
+ ble: FirmwareRelease$2;
1509
+ bootloader?: FirmwareRelease$2;
1510
+ bridge?: FirmwareRelease$2;
1511
+ features?: Features;
1512
+ protocol?: 'V1' | 'V2';
1513
+ deviceType?: 'pro2' | 'neo';
1514
+ firmwareType?: EFirmwareType;
1515
+ status?: ProtocolV2FirmwareReleaseStatus;
1516
+ hasUpgrade?: boolean;
1517
+ required?: boolean;
1518
+ resourceStatus?: 'valid' | 'outdated' | 'unknown';
1519
+ currentVersions?: DeviceStateVersions;
1520
+ components?: ProtocolV2FirmwareComponentRelease[];
1521
+ targetsToUpdate?: FirmwareUpdateV4Target[];
1522
+ release?: IFirmwareReleaseInfo;
1523
+ firmwareUpdatePlan?: FirmwareUpdatePlan;
1524
+ };
1525
+ type CheckAllFirmwareReleaseParams = {
1526
+ checkBridgeRelease?: boolean;
1527
+ checkFirmwareHash?: boolean;
1528
+ firmwareType?: EFirmwareType;
1529
+ platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
1530
+ forceUpdateTargets?: FirmwareUpdatePlanForceTarget[];
1531
+ };
1532
+ declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
1533
+
1534
+ type CheckFirmwareTypeAvailableParams = {
1535
+ deviceType: EDeviceType;
1536
+ firmwareType: EFirmwareType;
1537
+ };
1538
+ declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
1539
+
1540
+ declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
1541
+
1542
+ declare function detectDeviceConnectProtocol(connectId: string): Response<HardwareConnectProtocol>;
1543
+
1544
+ /**
1545
+ * @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
1546
+ */
1547
+ declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
1548
+
1549
+ /**
1550
+ * @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
1551
+ */
1552
+ declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
1553
+
1554
+ type GetPassphraseStateParams = CommonParams;
1555
+ /**
1556
+ * Compatibility wallet-state API for existing App integrations.
1557
+ *
1558
+ * Protocol V1 keeps its parameterless firmware flow. Protocol V2 maps the existing
1559
+ * `useEmptyPassphrase` and `initSession` intent to the device-only wallet-session flow.
1560
+ * New integrations should prefer `openWalletSession` for explicit wallet intent.
1561
+ */
1562
+ declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
1563
+
1564
+ declare const OpenWalletSessionMode: {
1565
+ readonly Standard: "standard";
1566
+ readonly SelectHidden: "select-hidden";
1567
+ readonly ResumeHidden: "resume-hidden";
1568
+ };
1569
+ type OpenWalletSessionModeValue = (typeof OpenWalletSessionMode)[keyof typeof OpenWalletSessionMode];
1570
+ type OpenWalletSessionParams = {
1571
+ mode: typeof OpenWalletSessionMode.Standard;
1572
+ deviceId?: never;
1573
+ passphraseState?: never;
1574
+ } | {
1575
+ mode: typeof OpenWalletSessionMode.SelectHidden;
1576
+ deviceId?: never;
1577
+ passphraseState?: never;
1578
+ } | {
1579
+ mode: typeof OpenWalletSessionMode.ResumeHidden;
1580
+ deviceId: string;
1581
+ passphraseState: string;
1582
+ };
1583
+ type OpenWalletSessionPayloadBase = {
1584
+ protocol: 'V1' | 'V2';
1585
+ deviceId: string;
1586
+ resumed: boolean;
1587
+ };
1588
+ type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
1589
+ walletType: 'standard';
1590
+ passphraseState: null;
1591
+ } | {
1592
+ walletType: 'hidden';
1593
+ passphraseState: string;
1594
+ });
1595
+ /**
1596
+ * Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
1597
+ * Protocol V1/V2 API.
1598
+ */
1599
+ declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
1600
+
1601
+ type FirmwareRelease$1 = {
1602
+ status: IDeviceFirmwareStatus;
1603
+ changelog: {
1604
+ 'en-US': string;
1605
+ 'zh-CN': string;
1606
+ }[];
1607
+ release: IFirmwareReleaseInfo;
1608
+ bootloaderMode: boolean;
1609
+ };
1610
+ type CheckFirmwareReleaseParams = {
1611
+ firmwareType?: EFirmwareType;
1612
+ };
1613
+ declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
1614
+
1615
+ type BleFirmwareRelease = {
1616
+ status: IDeviceBLEFirmwareStatus;
1617
+ changelog: {
1618
+ 'zh-CN': string;
1619
+ 'en-US': string;
1620
+ }[];
1621
+ release: IBLEFirmwareReleaseInfo;
1622
+ bootloaderMode: boolean;
1623
+ };
1624
+ declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
1625
+
1626
+ interface FirmwareUpdateCapabilities {
1627
+ planSchemaVersion: 2;
1628
+ preparedPlanSchemaVersion: 2;
1629
+ hostBindingProtocolVersion: 2;
1630
+ manifestModes: Array<'external-only' | 'sdk-managed'>;
1631
+ supportsArtifactReader: true;
1632
+ }
1633
+ declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
1634
+
1061
1635
  declare function promptWebDeviceAccess(options?: {
1062
1636
  deviceSerialNumberFromUI?: string;
1063
1637
  }): Response<{
@@ -1117,16 +1691,40 @@ type DeviceSettingsParams = {
1117
1691
  language?: string;
1118
1692
  label?: string;
1119
1693
  usePassphrase?: boolean;
1694
+ /** Protocol V1 only. */
1120
1695
  homescreen?: string;
1696
+ /** Protocol V1 only. */
1121
1697
  passphraseSource?: number;
1122
1698
  autoLockDelayMs?: number;
1699
+ /** Protocol V1 only. */
1123
1700
  displayRotation?: number;
1701
+ /** Protocol V1 only. */
1124
1702
  passphraseAlwaysOnDevice?: boolean;
1125
- safetyChecks?: SafetyCheckLevel;
1703
+ /** Protocol V1 only. Uses Enum_SafetyCheckLevel numeric values. */
1704
+ safetyChecks?: Enum_SafetyCheckLevel;
1705
+ /** Protocol V1 only; the current Protocol V2 schema has no matching field. */
1126
1706
  experimentalFeatures?: boolean;
1127
1707
  autoShutdownDelayMs?: number;
1708
+ /** Protocol V1 only; opens the legacy device-side brightness flow. */
1128
1709
  changeBrightness?: boolean;
1710
+ /** Protocol V2 only. */
1711
+ brightness?: number;
1129
1712
  hapticFeedback?: boolean;
1713
+ bluetoothEnabled?: boolean;
1714
+ /** Protocol V2 only; changed through an on-device confirmation page. */
1715
+ airgapMode?: boolean;
1716
+ /** Protocol V2 only. */
1717
+ animationEnabled?: boolean;
1718
+ /** Protocol V2 only. */
1719
+ tapToWake?: boolean;
1720
+ /** Protocol V2 only. */
1721
+ deviceNameDisplayEnabled?: boolean;
1722
+ /** Protocol V2 only. */
1723
+ fidoEnabled?: boolean;
1724
+ /** Protocol V2 only. */
1725
+ usbLockEnabled?: boolean;
1726
+ /** Protocol V2 only. */
1727
+ randomKeypad?: boolean;
1130
1728
  };
1131
1729
  declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
1132
1730
 
@@ -1152,7 +1750,7 @@ type DeviceUploadResourceResponse = Success$1 & {
1152
1750
  declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
1153
1751
 
1154
1752
  type DeviceSupportFeatures = SupportFeatures & {
1155
- device: Device | null;
1753
+ device: Device$1 | null;
1156
1754
  };
1157
1755
  declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
1158
1756
 
@@ -1161,14 +1759,24 @@ declare function deviceFullyUploadResource(connectId: string, params: CommonPara
1161
1759
  }): Response<Success$1>;
1162
1760
 
1163
1761
  type DeviceUpdateBootloaderParams = {
1762
+ preparedPlan?: FirmwareUpdatePreparedPlan;
1763
+ hostBindingGeneration?: number;
1164
1764
  binary?: ArrayBuffer;
1765
+ artifact?: FirmwareArtifactReference;
1766
+ artifactReader?: FirmwareArtifactReader;
1165
1767
  firmwareType?: EFirmwareType;
1166
1768
  };
1167
1769
  declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdateBootloaderParams): Response<Success$1>;
1168
1770
 
1169
1771
  declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
1170
1772
 
1171
- declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features$1>;
1773
+ type DeviceUnlockParams = {
1774
+ /**
1775
+ * 限定本次解锁允许使用的 PIN 类型。省略时保持兼容行为,仅允许主 PIN。
1776
+ */
1777
+ pinType?: DeviceSessionPinType;
1778
+ };
1779
+ declare function deviceUnlock(connectId: string, params?: CommonParams & DeviceUnlockParams): Response<Features>;
1172
1780
 
1173
1781
  declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
1174
1782
 
@@ -1372,6 +1980,9 @@ type AllNetworkAddressParams = {
1372
1980
  type AllNetworkAddressPayload = {
1373
1981
  address: string;
1374
1982
  pub?: string;
1983
+ /**
1984
+ * @deprecated Use `pub` instead.
1985
+ */
1375
1986
  publicKey?: string;
1376
1987
  npub?: string;
1377
1988
  } | {
@@ -1437,6 +2048,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
1437
2048
  type EVMPublicKey = {
1438
2049
  path: string;
1439
2050
  pub: string;
2051
+ /**
2052
+ * @deprecated Use `pub` instead.
2053
+ */
1440
2054
  publicKey?: string;
1441
2055
  } & EthereumPublicKey;
1442
2056
  type EVMGetPublicKeyParams = {
@@ -2220,6 +2834,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
2220
2834
  type AptosAddress = {
2221
2835
  path: string;
2222
2836
  pub?: string;
2837
+ /**
2838
+ * @deprecated Use `pub` instead.
2839
+ */
2223
2840
  publicKey?: string;
2224
2841
  } & AptosAddress$1;
2225
2842
  type AptosGetAddressParams = {
@@ -2234,6 +2851,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
2234
2851
  type AptosPublicKey = {
2235
2852
  path: string;
2236
2853
  pub: string;
2854
+ /**
2855
+ * @deprecated Use `pub` instead.
2856
+ */
2237
2857
  publicKey?: string;
2238
2858
  };
2239
2859
  type AptosGetPublicKeyParams = {
@@ -2318,6 +2938,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
2318
2938
  type CosmosPublicKey = {
2319
2939
  path: string;
2320
2940
  pub: string;
2941
+ /**
2942
+ * @deprecated Use `pub` instead.
2943
+ */
2321
2944
  publicKey?: string;
2322
2945
  };
2323
2946
  type CosmosGetPublicKeyParams = {
@@ -2342,6 +2965,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
2342
2965
  type XrpAddress = {
2343
2966
  path: string;
2344
2967
  pub?: string;
2968
+ /**
2969
+ * @deprecated Use `pub` instead.
2970
+ */
2345
2971
  publicKey?: string;
2346
2972
  address: string;
2347
2973
  };
@@ -2375,6 +3001,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
2375
3001
  type SuiAddress = {
2376
3002
  path: string;
2377
3003
  pub?: string;
3004
+ /**
3005
+ * @deprecated Use `pub` instead.
3006
+ */
2378
3007
  publicKey?: string;
2379
3008
  } & SuiAddress$1;
2380
3009
  type SuiGetAddressParams = {
@@ -2389,6 +3018,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
2389
3018
  type SuiPublicKey = {
2390
3019
  path: string;
2391
3020
  pub: string;
3021
+ /**
3022
+ * @deprecated Use `pub` instead.
3023
+ */
2392
3024
  publicKey?: string;
2393
3025
  };
2394
3026
  type SuiGetPublicKeyParams = {
@@ -2418,6 +3050,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
2418
3050
  type CardanoGetAddressMethodParams = {
2419
3051
  addressParameters: CardanoAddressParameters;
2420
3052
  networkId: number;
3053
+ /**
3054
+ * Testnet cip34:0-1097911063
3055
+ * Mainnet cip34:1-764824073
3056
+ */
2421
3057
  protocolMagic: number;
2422
3058
  derivationType: number;
2423
3059
  address?: string;
@@ -2479,6 +3115,10 @@ type CardanoSignMessageMethodParams = {
2479
3115
  derivationType: number;
2480
3116
  networkId: number;
2481
3117
  addressType?: Messages.CardanoAddressType;
3118
+ /**
3119
+ * Testnet cip34:0-1097911063
3120
+ * Mainnet cip34:1-764824073
3121
+ */
2482
3122
  protocolMagic?: number;
2483
3123
  };
2484
3124
  declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
@@ -2512,6 +3152,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
2512
3152
  type PolkadotAddress = {
2513
3153
  path: string;
2514
3154
  pub: string;
3155
+ /**
3156
+ * @deprecated Use `pub` instead.
3157
+ */
2515
3158
  publicKey?: string;
2516
3159
  } & PolkadotAddress$1;
2517
3160
  type PolkadotGetAddressParams = {
@@ -2570,23 +3213,61 @@ type KaspaSignInputParams = {
2570
3213
  sequenceNumber: number | string;
2571
3214
  output: {
2572
3215
  satoshis: number | string;
2573
- script: string;
3216
+ script?: string;
2574
3217
  };
2575
3218
  sigOpCount?: number;
2576
3219
  };
2577
3220
  type KaspaSignOutputParams = {
2578
3221
  satoshis: number | string;
3222
+ address?: string;
3223
+ addressN?: string | number[];
3224
+ script?: string;
3225
+ scriptVersion?: number;
3226
+ };
3227
+ type KaspaStreamingSignInputParams = Omit<KaspaSignInputParams, 'output'> & {
3228
+ output: {
3229
+ satoshis: number | string;
3230
+ script?: string;
3231
+ };
3232
+ };
3233
+ type KaspaStreamingSignOutputParams = {
3234
+ satoshis: number | string;
3235
+ address?: string;
3236
+ addressN?: string | number[];
3237
+ script?: string;
3238
+ scriptVersion?: number;
3239
+ };
3240
+ type KaspaRefTransactionInput = {
3241
+ prevTxId: string;
3242
+ outputIndex: number;
3243
+ sequenceNumber: number | string;
3244
+ };
3245
+ type KaspaRefTransactionOutput = {
3246
+ satoshis: number | string;
3247
+ scriptVersion?: number;
2579
3248
  script: string;
2580
- scriptVersion: number;
3249
+ };
3250
+ type KaspaRefTransaction = {
3251
+ txId: string;
3252
+ version: number;
3253
+ inputs: KaspaRefTransactionInput[];
3254
+ outputs: KaspaRefTransactionOutput[];
3255
+ lockTime?: number | string;
3256
+ subNetworkID?: string;
3257
+ gas?: number | string;
3258
+ payload?: string;
2581
3259
  };
2582
3260
  type KaspaSignTransactionParams = {
2583
3261
  version: number;
2584
- inputs: KaspaSignInputParams[];
2585
- outputs: KaspaSignOutputParams[];
3262
+ inputs: Array<KaspaSignInputParams | KaspaStreamingSignInputParams>;
3263
+ outputs: Array<KaspaSignOutputParams | KaspaStreamingSignOutputParams>;
2586
3264
  lockTime: number | string;
2587
3265
  sigHashType?: SignatureType;
2588
3266
  sigOpCount?: number;
2589
3267
  subNetworkID?: string;
3268
+ payload?: string;
3269
+ gas?: number | string;
3270
+ refTxs?: KaspaRefTransaction[];
2590
3271
  scheme?: string;
2591
3272
  prefix?: string;
2592
3273
  useTweak?: boolean;
@@ -2631,6 +3312,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
2631
3312
  type NostrPublicKey = {
2632
3313
  npub?: string;
2633
3314
  pub?: string;
3315
+ /**
3316
+ * @deprecated Use `pub` instead.
3317
+ */
2634
3318
  publicKey?: string;
2635
3319
  path: string;
2636
3320
  };
@@ -2727,6 +3411,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
2727
3411
 
2728
3412
  interface LnurlAuth {
2729
3413
  pub?: string;
3414
+ /**
3415
+ * @deprecated Use `pub` instead.
3416
+ */
2730
3417
  publickey?: string;
2731
3418
  path?: string;
2732
3419
  signature?: string;
@@ -2803,6 +3490,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
2803
3490
  type TonAddress = {
2804
3491
  path: string;
2805
3492
  pub: string;
3493
+ /**
3494
+ * @deprecated Use `pub` instead.
3495
+ */
2806
3496
  publicKey?: string;
2807
3497
  address: string;
2808
3498
  };
@@ -2914,6 +3604,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
2914
3604
 
2915
3605
  type AlephiumAddress = {
2916
3606
  path: string;
3607
+ /**
3608
+ * @deprecated Use `pub` instead.
3609
+ */
2917
3610
  publicKey?: string;
2918
3611
  pub?: string;
2919
3612
  address: string;
@@ -3016,13 +3709,21 @@ type NeoSignedTx = {
3016
3709
  declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
3017
3710
 
3018
3711
  type CoreApi = {
3712
+ /**
3713
+ * Inject function
3714
+ */
3019
3715
  init: typeof init;
3020
3716
  on: typeof on;
3021
3717
  off: typeof off;
3022
3718
  emit: (event: string, ...args: any[]) => void;
3023
3719
  removeAllListeners: typeof removeAllListeners;
3024
- dispose: () => void;
3720
+ dispose: () => void | Promise<void>;
3025
3721
  call: (params: any) => Promise<any>;
3722
+ /**
3723
+ * Bind a protocol that has already been verified for one transport endpoint.
3724
+ * Every later SDK call for the same connectId uses it as a strict expectation.
3725
+ */
3726
+ setDeviceConnectProtocol: (connectId: string, connectProtocol: HardwareConnectProtocol | undefined) => void;
3026
3727
  uiResponse: typeof uiResponse;
3027
3728
  cancel: (connectId?: string) => void;
3028
3729
  updateSettings: typeof updateSettings;
@@ -3030,19 +3731,32 @@ type CoreApi = {
3030
3731
  success: boolean;
3031
3732
  }>;
3032
3733
  getLogs: typeof getLogs;
3734
+ clearSessionCache: typeof clearSessionCache;
3735
+ /**
3736
+ * Test function
3737
+ */
3033
3738
  testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
3739
+ testProtocolV2Ping: typeof testProtocolV2Ping;
3034
3740
  preInitialize: typeof preInitialize;
3741
+ /**
3742
+ * Core function
3743
+ */
3035
3744
  checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
3036
3745
  checkBridgeStatus: typeof checkBridgeStatus;
3037
3746
  checkBridgeRelease: typeof checkBridgeRelease;
3038
3747
  checkBootloaderRelease: typeof checkBootloaderRelease;
3039
3748
  checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
3749
+ /**
3750
+ * Device function
3751
+ */
3040
3752
  searchDevices: typeof searchDevices;
3753
+ detectDeviceConnectProtocol: typeof detectDeviceConnectProtocol;
3041
3754
  promptWebDeviceAccess: typeof promptWebDeviceAccess;
3042
3755
  getFeatures: typeof getFeatures;
3043
- getDeviceInfo: typeof getDeviceInfo;
3756
+ getDeviceState: typeof getDeviceState;
3044
3757
  getOnekeyFeatures: typeof getOnekeyFeatures;
3045
3758
  getPassphraseState: typeof getPassphraseState;
3759
+ openWalletSession: typeof openWalletSession;
3046
3760
  deviceBackup: typeof deviceBackup;
3047
3761
  deviceChangePin: typeof deviceChangePin;
3048
3762
  deviceFlags: typeof deviceFlags;
@@ -3069,34 +3783,29 @@ type CoreApi = {
3069
3783
  firmwareUpdateV2: typeof firmwareUpdateV2;
3070
3784
  firmwareUpdateV3: typeof firmwareUpdateV3;
3071
3785
  firmwareUpdateV4: typeof firmwareUpdateV4;
3786
+ registerFirmwareUpdateHostBinding: typeof registerFirmwareUpdateHostBinding$1;
3787
+ unregisterFirmwareUpdateHostBinding: typeof unregisterFirmwareUpdateHostBinding$1;
3788
+ getFirmwareUpdateHostBindingGeneration: typeof getFirmwareUpdateHostBindingGeneration$1;
3789
+ getFirmwareUpdateCapabilities: typeof getFirmwareUpdateCapabilities;
3790
+ prepareFirmwareUpdatePlan: typeof prepareFirmwareUpdatePlan;
3791
+ validateFirmwareUpdatePreparedPlan: typeof validateFirmwareUpdatePreparedPlan;
3072
3792
  cipherKeyValue: typeof cipherKeyValue;
3073
- protocolInfoRequest: typeof protocolInfoRequest;
3074
- ping: typeof ping;
3793
+ /**
3794
+ * Pro2 business API
3795
+ */
3075
3796
  deviceReboot: typeof deviceReboot;
3076
- deviceInfoGet: typeof deviceInfoGet;
3077
- deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
3078
- deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
3079
- deviceFactoryInfoSet: typeof deviceFactoryInfoSet;
3080
- deviceFactoryInfoGet: typeof deviceFactoryInfoGet;
3081
- filesystemPermissionFix: typeof filesystemPermissionFix;
3082
- fileRead: typeof fileRead;
3083
- fileWrite: typeof fileWrite;
3084
- fileDelete: typeof fileDelete;
3085
- dirList: typeof dirList;
3086
- dirMake: typeof dirMake;
3087
- dirRemove: typeof dirRemove;
3088
- pathInfo: typeof pathInfo;
3089
- filesystemFileRead: typeof filesystemFileRead;
3090
- filesystemFileWrite: typeof filesystemFileWrite;
3091
- filesystemFileDelete: typeof filesystemFileDelete;
3092
- filesystemDirList: typeof filesystemDirList;
3093
- filesystemDirMake: typeof filesystemDirMake;
3094
- filesystemDirRemove: typeof filesystemDirRemove;
3095
- filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
3096
- filesystemFormat: typeof filesystemFormat;
3097
- filesystemDiskControl: typeof filesystemDiskControl;
3797
+ deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
3798
+ deviceUploadNft: typeof deviceUploadNft;
3799
+ deviceUploadWallpaper: typeof deviceUploadWallpaper;
3800
+ uploadPortfolio: typeof uploadPortfolio;
3801
+ /**
3802
+ * All network function
3803
+ */
3098
3804
  allNetworkGetAddress: typeof allNetworkGetAddress;
3099
3805
  allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
3806
+ /**
3807
+ * EVM function
3808
+ */
3100
3809
  evmGetAddress: typeof evmGetAddress;
3101
3810
  evmGetPublicKey: typeof evmGetPublicKey;
3102
3811
  evmSignMessage: typeof evmSignMessage;
@@ -3104,86 +3813,167 @@ type CoreApi = {
3104
3813
  evmSignTransaction: typeof evmSignTransaction;
3105
3814
  evmSignTypedData: typeof evmSignTypedData;
3106
3815
  evmVerifyMessage: typeof evmVerifyMessage;
3816
+ /**
3817
+ * BTC function
3818
+ */
3107
3819
  btcGetAddress: typeof btcGetAddress;
3108
3820
  btcGetPublicKey: typeof btcGetPublicKey;
3109
3821
  btcSignMessage: typeof btcSignMessage;
3110
3822
  btcSignPsbt: typeof btcSignPsbt;
3111
3823
  btcSignTransaction: typeof btcSignTransaction;
3112
3824
  btcVerifyMessage: typeof btcVerifyMessage;
3825
+ /**
3826
+ * Starcoin function
3827
+ */
3113
3828
  starcoinGetAddress: typeof starcoinGetAddress;
3114
3829
  starcoinGetPublicKey: typeof starcoinGetPublicKey;
3115
3830
  starcoinSignMessage: typeof starcoinSignMessage;
3116
3831
  starcoinSignTransaction: typeof starcoinSignTransaction;
3117
3832
  starcoinVerifyMessage: typeof starcoinVerifyMessage;
3833
+ /**
3834
+ * Nem function
3835
+ */
3118
3836
  nemGetAddress: typeof nemGetAddress;
3119
3837
  nemSignTransaction: typeof nemSignTransaction;
3838
+ /**
3839
+ * Solana function
3840
+ */
3120
3841
  solGetAddress: typeof solGetAddress;
3121
3842
  solSignTransaction: typeof solSignTransaction;
3122
3843
  solSignOffchainMessage: typeof solSignOffchainMessage;
3123
3844
  solSignMessage: typeof solSignMessage;
3845
+ /**
3846
+ * Stellar function
3847
+ */
3124
3848
  stellarGetAddress: typeof stellarGetAddress;
3125
3849
  stellarSignTransaction: typeof stellarSignTransaction;
3850
+ /**
3851
+ * Tron function
3852
+ */
3126
3853
  tronGetAddress: typeof tronGetAddress;
3127
3854
  tronSignMessage: typeof tronSignMessage;
3128
3855
  tronSignTransaction: typeof tronSignTransaction;
3856
+ /**
3857
+ * Conflux function
3858
+ */
3129
3859
  confluxGetAddress: typeof confluxGetAddress;
3130
3860
  confluxSignMessage: typeof confluxSignMessage;
3131
3861
  confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
3132
3862
  confluxSignTransaction: typeof confluxSignTransaction;
3863
+ /**
3864
+ * Near function
3865
+ */
3133
3866
  nearGetAddress: typeof nearGetAddress;
3134
3867
  nearSignTransaction: typeof nearSignTransaction;
3868
+ /**
3869
+ * Aptos function
3870
+ */
3135
3871
  aptosGetAddress: typeof aptosGetAddress;
3136
3872
  aptosGetPublicKey: typeof aptosGetPublicKey;
3137
3873
  aptosSignMessage: typeof aptosSignMessage;
3138
3874
  aptosSignInMessage: typeof aptosSignInMessage;
3139
3875
  aptosSignTransaction: typeof aptosSignTransaction;
3876
+ /**
3877
+ * Algo function
3878
+ */
3140
3879
  algoGetAddress: typeof algoGetAddress;
3141
3880
  algoSignTransaction: typeof algoSignTransaction;
3881
+ /**
3882
+ * Cosmos function
3883
+ */
3142
3884
  cosmosGetAddress: typeof cosmosGetAddress;
3143
3885
  cosmosGetPublicKey: typeof cosmosGetPublicKey;
3144
3886
  cosmosSignTransaction: typeof cosmosSignTransaction;
3887
+ /**
3888
+ * XRP function
3889
+ */
3145
3890
  xrpGetAddress: typeof xrpGetAddress;
3146
3891
  xrpSignTransaction: typeof xrpSignTransaction;
3892
+ /**
3893
+ * SUI function
3894
+ */
3147
3895
  suiGetAddress: typeof suiGetAddress;
3148
3896
  suiGetPublicKey: typeof suiGetPublicKey;
3149
3897
  suiSignMessage: typeof suiSignMessage;
3150
3898
  suiSignTransaction: typeof suiSignTransaction;
3899
+ /**
3900
+ * Cardano function
3901
+ */
3151
3902
  cardanoGetAddress: typeof cardanoGetAddress;
3152
3903
  cardanoGetPublicKey: typeof cardanoGetPublicKey;
3153
3904
  cardanoSignTransaction: typeof cardanoSignTransaction;
3154
3905
  cardanoSignMessage: typeof cardanoSignMessage;
3906
+ /**
3907
+ * Filecoin function
3908
+ */
3155
3909
  filecoinGetAddress: typeof filecoinGetAddress;
3156
3910
  filecoinSignTransaction: typeof filecoinSignTransaction;
3911
+ /**
3912
+ * Polkadot function
3913
+ */
3157
3914
  polkadotGetAddress: typeof polkadotGetAddress;
3158
3915
  polkadotSignTransaction: typeof polkadotSignTransaction;
3916
+ /**
3917
+ * Kaspa function
3918
+ */
3159
3919
  kaspaGetAddress: typeof kaspaGetAddress;
3160
3920
  kaspaSignTransaction: typeof kaspaSignTransaction;
3921
+ /**
3922
+ * nexa function
3923
+ */
3161
3924
  nexaGetAddress: typeof nexaGetAddress;
3162
3925
  nexaSignTransaction: typeof nexaSignTransaction;
3926
+ /**
3927
+ * Nostr function
3928
+ */
3163
3929
  nostrGetPublicKey: typeof nostrGetPublicKey;
3164
3930
  nostrSignEvent: typeof nostrSignEvent;
3165
3931
  nostrEncryptMessage: typeof nostrEncryptMessage;
3166
3932
  nostrDecryptMessage: typeof nostrDecryptMessage;
3167
3933
  nostrSignSchnorr: typeof nostrSignSchnorr;
3934
+ /**
3935
+ * Lightning Network
3936
+ */
3168
3937
  lnurlAuth: typeof lnurlAuth;
3938
+ /**
3939
+ * Nervos Network
3940
+ */
3169
3941
  nervosGetAddress: typeof nervosGetAddress;
3170
3942
  nervosSignTransaction: typeof nervosSignTransaction;
3943
+ /**
3944
+ * Dnx Network
3945
+ */
3171
3946
  dnxGetAddress: typeof dnxGetAddress;
3172
3947
  dnxSignTransaction: typeof dnxSignTransaction;
3948
+ /**
3949
+ * TON Network
3950
+ */
3173
3951
  tonGetAddress: typeof tonGetAddress;
3174
3952
  tonSignMessage: typeof tonSignMessage;
3175
3953
  tonSignProof: typeof tonSignProof;
3176
3954
  tonSignData: typeof tonSignData;
3955
+ /**
3956
+ * SCDO Network
3957
+ */
3177
3958
  scdoGetAddress: typeof scdoGetAddress;
3178
3959
  scdoSignMessage: typeof scdoSignMessage;
3179
3960
  scdoSignTransaction: typeof scdoSignTransaction;
3961
+ /**
3962
+ * Alephium Network
3963
+ */
3180
3964
  alephiumGetAddress: typeof alephiumGetAddress;
3181
3965
  alephiumSignMessage: typeof alephiumSignMessage;
3182
3966
  alephiumSignTransaction: typeof alephiumSignTransaction;
3967
+ /**
3968
+ * Benfen Network
3969
+ */
3183
3970
  benfenGetAddress: typeof benfenGetAddress;
3184
3971
  benfenGetPublicKey: typeof benfenGetPublicKey;
3185
3972
  benfenSignTransaction: typeof benfenSignTransaction;
3186
3973
  benfenSignMessage: typeof benfenSignMessage;
3974
+ /**
3975
+ * Neo Network
3976
+ */
3187
3977
  neoGetAddress: typeof neoGetAddress;
3188
3978
  neoSignTransaction: typeof neoSignTransaction;
3189
3979
  };
@@ -3256,13 +4046,17 @@ declare const DEVICE: {
3256
4046
  readonly LOADING: "device-loading";
3257
4047
  readonly BUTTON: "button";
3258
4048
  readonly PIN: "pin";
4049
+ readonly PIN_ON_DEVICE: "pin_on_device";
4050
+ readonly PIN_ON_DEVICE_COMPLETE: "pin_on_device_complete";
3259
4051
  readonly PASSPHRASE: "passphrase";
3260
4052
  readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
4053
+ readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
3261
4054
  readonly WORD: "word";
3262
4055
  readonly SUPPORT_FEATURES: "support_features";
3263
4056
  readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
3264
4057
  readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
3265
4058
  readonly FEATURES: "features";
4059
+ readonly STATE: "state";
3266
4060
  };
3267
4061
  interface DeviceConnnectRequest {
3268
4062
  type: typeof DEVICE.CONNECT;
@@ -3281,6 +4075,11 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
3281
4075
  }
3282
4076
  type PassphraseRequestPayload = {
3283
4077
  existsAttachPinUser?: boolean;
4078
+ deviceOnly?: boolean;
4079
+ source?: 'wallet-session-coordinator';
4080
+ reason?: 'open-wallet' | 'session-recovery';
4081
+ expectedPassphraseState?: string;
4082
+ interaction?: HardwareUiInteractionMeta;
3284
4083
  };
3285
4084
  interface DeviceButtonRequest {
3286
4085
  type: typeof DEVICE.BUTTON;
@@ -3293,6 +4092,10 @@ interface DeviceSendFeatures {
3293
4092
  type: typeof DEVICE.FEATURES;
3294
4093
  payload: DeviceFeaturesPayload;
3295
4094
  }
4095
+ interface DeviceSendState {
4096
+ type: typeof DEVICE.STATE;
4097
+ payload: DeviceStateEvent;
4098
+ }
3296
4099
  type DeviceSupportFeaturesPayload = SupportFeatures & {
3297
4100
  device: KnownDevice | null;
3298
4101
  };
@@ -3300,13 +4103,58 @@ interface DeviceSendSupportFeatures {
3300
4103
  type: typeof DEVICE.SUPPORT_FEATURES;
3301
4104
  payload: DeviceSupportFeaturesPayload;
3302
4105
  }
3303
- type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
4106
+ type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
3304
4107
  type DeviceEventMessage = DeviceEvent & {
3305
4108
  event: typeof DEVICE_EVENT;
3306
4109
  };
3307
4110
  type DeviceEventListenerFn = (type: typeof DEVICE_EVENT, cb: (event: DeviceEventMessage) => void) => void;
3308
4111
  declare const createDeviceMessage: MessageFactoryFn<typeof DEVICE_EVENT, DeviceEvent>;
3309
4112
 
4113
+ declare const UI_RESPONSE: {
4114
+ readonly RECEIVE_PIN: "ui-receive_pin";
4115
+ readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
4116
+ readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
4117
+ readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
4118
+ };
4119
+ interface UiResponseCorrelation {
4120
+ interactionId: string;
4121
+ deviceId: string;
4122
+ }
4123
+ interface UiResponseCorrelationFields {
4124
+ interactionId?: string;
4125
+ deviceId?: string;
4126
+ }
4127
+ interface UiResponsePin extends UiResponseCorrelationFields {
4128
+ type: typeof UI_RESPONSE.RECEIVE_PIN;
4129
+ payload: string;
4130
+ }
4131
+ interface UiResponsePassphrase extends UiResponseCorrelationFields {
4132
+ type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
4133
+ payload: {
4134
+ value: string;
4135
+ passphraseOnDevice?: boolean;
4136
+ attachPinOnDevice?: boolean;
4137
+ save?: boolean;
4138
+ };
4139
+ }
4140
+ interface UiResponseSelectDeviceInBootloaderForWebDevice {
4141
+ type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
4142
+ payload: {
4143
+ deviceId: string;
4144
+ };
4145
+ }
4146
+ interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
4147
+ type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
4148
+ payload: {
4149
+ deviceId: string;
4150
+ };
4151
+ }
4152
+ type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
4153
+ type UiResponseMessage = UiResponseEvent & {
4154
+ event: typeof UI_EVENT;
4155
+ };
4156
+ declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
4157
+
3310
4158
  declare const UI_EVENT = "UI_EVENT";
3311
4159
  declare const UI_REQUEST: {
3312
4160
  readonly REQUEST_PIN: "ui-request_pin";
@@ -3341,8 +4189,43 @@ declare const UI_REQUEST: {
3341
4189
  readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
3342
4190
  readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
3343
4191
  };
4192
+ type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
4193
+ type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
4194
+ type HardwareUiInteractionMeta = {
4195
+ interactionId: string;
4196
+ phaseId: string;
4197
+ sequence: number;
4198
+ phase: 'pin' | 'passphrase' | 'passphrase-on-device' | 'button' | 'processing';
4199
+ transition: 'start' | 'complete' | 'finish';
4200
+ outcome?: 'submitted' | 'succeeded' | 'failed' | 'cancelled' | 'disconnected';
4201
+ protocol: 'V2';
4202
+ device?: Device$1;
4203
+ };
4204
+ type ProtocolV2UiEventMetadata = {
4205
+ source?: ProtocolV2UiEventSource;
4206
+ reason?: string;
4207
+ deviceOnly?: boolean;
4208
+ completion?: ProtocolV2UiCompletion;
4209
+ method?: string;
4210
+ page?: string | number;
4211
+ operation?: string;
4212
+ interaction?: HardwareUiInteractionMeta;
4213
+ };
4214
+ type UiRequestWindowClose = {
4215
+ type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
4216
+ payload: HardwareUiInteractionMeta;
4217
+ } | {
4218
+ type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
4219
+ payload: HardwareUiInteractionMeta;
4220
+ } | {
4221
+ type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
4222
+ payload?: undefined;
4223
+ } | {
4224
+ type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
4225
+ payload?: undefined;
4226
+ };
3344
4227
  interface UiRequestWithoutPayload {
3345
- 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;
4228
+ type: 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;
3346
4229
  payload?: typeof undefined;
3347
4230
  }
3348
4231
  interface UiRequestFirmwareProgressing {
@@ -3353,40 +4236,50 @@ interface UiRequestFirmwareProgressing {
3353
4236
  }
3354
4237
  type UiRequestDeviceAction = {
3355
4238
  type: typeof UI_REQUEST.REQUEST_PIN;
3356
- payload: {
3357
- device: Device;
4239
+ payload: ProtocolV2UiEventMetadata & {
4240
+ device: Device$1;
3358
4241
  type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
4242
+ responseCorrelation?: UiResponseCorrelation;
3359
4243
  };
3360
4244
  };
3361
4245
  interface UiRequestButton {
3362
4246
  type: typeof UI_REQUEST.REQUEST_BUTTON;
3363
- payload: DeviceButtonRequest['payload'];
4247
+ payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
3364
4248
  }
3365
4249
  interface UiRequestPassphrase {
3366
4250
  type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
3367
4251
  payload: {
3368
- device: Device;
4252
+ device: Device$1;
3369
4253
  passphraseState?: string;
3370
4254
  existsAttachPinUser?: boolean;
4255
+ deviceOnly?: boolean;
4256
+ source?: 'wallet-session-coordinator';
4257
+ reason?: 'open-wallet' | 'session-recovery';
4258
+ expectedPassphraseState?: string;
4259
+ interaction?: HardwareUiInteractionMeta;
4260
+ responseCorrelation?: UiResponseCorrelation;
3371
4261
  };
3372
4262
  }
3373
4263
  interface UiRequestPassphraseOnDevice {
3374
4264
  type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
3375
4265
  payload: {
3376
- device: Device;
4266
+ device: Device$1;
3377
4267
  passphraseState?: string;
4268
+ source?: 'wallet-session-coordinator';
4269
+ reason?: 'open-wallet' | 'session-recovery';
4270
+ interaction?: HardwareUiInteractionMeta;
3378
4271
  };
3379
4272
  }
3380
4273
  interface UiRequestSelectDeviceInBootloaderForWebDevice {
3381
4274
  type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
3382
4275
  payload: {
3383
- device: Device;
4276
+ device: Device$1;
3384
4277
  };
3385
4278
  }
3386
4279
  interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
3387
4280
  type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
3388
4281
  payload: {
3389
- device: Device;
4282
+ device: Device$1;
3390
4283
  };
3391
4284
  }
3392
4285
  interface FirmwareProcessing {
@@ -3399,7 +4292,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
3399
4292
  interface FirmwareProgress {
3400
4293
  type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
3401
4294
  payload: {
3402
- device: Device;
4295
+ device: Device$1;
3403
4296
  progress: number;
3404
4297
  progressType: IFirmwareUpdateProgressType;
3405
4298
  transferredBytes?: number;
@@ -3411,7 +4304,7 @@ interface FirmwareProgress {
3411
4304
  interface FirmwareTip {
3412
4305
  type: typeof UI_REQUEST.FIRMWARE_TIP;
3413
4306
  payload: {
3414
- device: Device;
4307
+ device: Device$1;
3415
4308
  data: {
3416
4309
  message: string;
3417
4310
  };
@@ -3430,14 +4323,14 @@ interface DeviceProgress {
3430
4323
  interface PreviousAddressResult {
3431
4324
  type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
3432
4325
  payload: {
3433
- device: Device;
4326
+ device: Device$1;
3434
4327
  data: {
3435
4328
  address?: string;
3436
4329
  path?: string;
3437
4330
  };
3438
4331
  };
3439
4332
  }
3440
- type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
4333
+ type UiEvent = UiRequestWithoutPayload | UiRequestWindowClose | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
3441
4334
  declare enum FirmwareUpdateTipMessage {
3442
4335
  CheckLatestUiResource = "CheckLatestUiResource",
3443
4336
  StartDownloadFirmware = "StartDownloadFirmware",
@@ -3571,43 +4464,6 @@ interface MethodResponseMessage {
3571
4464
  declare const createResponseMessage: (id: number, success: boolean, payload: any) => MethodResponseMessage;
3572
4465
  type CallMethodKeys = keyof CoreApi;
3573
4466
 
3574
- declare const UI_RESPONSE: {
3575
- readonly RECEIVE_PIN: "ui-receive_pin";
3576
- readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
3577
- readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
3578
- readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
3579
- };
3580
- interface UiResponsePin {
3581
- type: typeof UI_RESPONSE.RECEIVE_PIN;
3582
- payload: string;
3583
- }
3584
- interface UiResponsePassphrase {
3585
- type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
3586
- payload: {
3587
- value: string;
3588
- passphraseOnDevice?: boolean;
3589
- attachPinOnDevice?: boolean;
3590
- save?: boolean;
3591
- };
3592
- }
3593
- interface UiResponseSelectDeviceInBootloaderForWebDevice {
3594
- type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
3595
- payload: {
3596
- deviceId: string;
3597
- };
3598
- }
3599
- interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
3600
- type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
3601
- payload: {
3602
- deviceId: string;
3603
- };
3604
- }
3605
- type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
3606
- type UiResponseMessage = UiResponseEvent & {
3607
- event: typeof UI_EVENT;
3608
- };
3609
- declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
3610
-
3611
4467
  declare const LOG_EVENT = "LOG_EVENT";
3612
4468
  declare const LOG: {
3613
4469
  readonly OUTPUT: "log-output";
@@ -3683,10 +4539,14 @@ type UiPromiseResponse = UiResponseEvent | {
3683
4539
  };
3684
4540
  type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
3685
4541
  type: T;
3686
- }>, T, Device$1>;
4542
+ }>, T, Device> & {
4543
+ responseCorrelation?: UiResponseCorrelation;
4544
+ };
3687
4545
 
3688
4546
  declare const LogBlockEvent: Set<string>;
3689
4547
  declare function getLogBlockLabel(message: unknown): string | undefined;
4548
+ declare function getSafeLogPayload(value: unknown, blockLabel?: string): unknown;
4549
+ declare function formatLogMethodLabel(label: string, methodName?: string): string;
3690
4550
 
3691
4551
  declare const executeCallback: (id: string, ...args: any[]) => void;
3692
4552
  declare const cleanupCallback: (id: string) => void;
@@ -3750,30 +4610,109 @@ declare enum LoggerNames {
3750
4610
  }
3751
4611
  declare const getLogger: (key: LoggerNames) => Log;
3752
4612
 
3753
- declare const httpRequest: (url: string, type: string) => any;
4613
+ type HttpRequestOptions = {
4614
+ /** Additional request headers, such as a byte range for package metadata reads. */
4615
+ headers?: Record<string, string>;
4616
+ /** Axios adapter-defined request timeout retained for existing opt-in callers. */
4617
+ timeoutMs?: number;
4618
+ /** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
4619
+ connectTimeoutMs?: number;
4620
+ /** Maximum idle interval between response-body progress events. */
4621
+ readTimeoutMs?: number;
4622
+ /** Wall-clock deadline across all attempts and retry backoff. */
4623
+ overallTimeoutMs?: number;
4624
+ maxRetries?: number;
4625
+ retryDelayMs?: number;
4626
+ };
4627
+
4628
+ declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
3754
4629
  declare const getTimeStamp: () => number;
3755
4630
 
4631
+ /**
4632
+ * Validates version string
4633
+ * @param {string} version Version string
4634
+ * @returns {boolean} True if version string is valid, false if not
4635
+ */
3756
4636
  declare const isValidVersionString: (version: string) => boolean;
4637
+ /**
4638
+ * Validates a version array
4639
+ * @param {number[]} version Version array
4640
+ * @returns {boolean} True if version array is valid, false if not
4641
+ */
3757
4642
  declare const isValidVersionArray: (version: number[]) => boolean;
4643
+ /**
4644
+ * Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
4645
+ * @param {number[]} version Version array
4646
+ * @returns {number[]} Version array with all positions filled
4647
+ */
3758
4648
  declare const normalizeVersionArray: (version: number[]) => number[];
4649
+ /**
4650
+ * Returns a valid version array from a version string
4651
+ * @param {string} version Version string
4652
+ * @returns {number[]} Version array
4653
+ */
3759
4654
  declare const versionSplit: (version: string) => number[];
4655
+ /**
4656
+ * Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
4657
+ * @param {string | number[]} a Version to compare from
4658
+ * @param {string | number[]} b Version to compare with
4659
+ * @returns {number} Returns 1 if newer, -1 if older and 0 if equal
4660
+ */
3760
4661
  declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
3761
4662
 
3762
- 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">;
4663
+ declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"ProtocolInfo"> | 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<"NftUpdate"> | TypedResponseMessage<"OnboardingStatusGet"> | TypedResponseMessage<"OnboardingStatus"> | TypedResponseMessage<"PortfolioUpdate"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage">;
4664
+
4665
+ type DeviceFeaturesInput = Features | Messages.Features;
3763
4666
 
3764
- declare const getDeviceType: (features?: Features) => IDeviceType;
4667
+ /**
4668
+ * get device type by features
4669
+ */
4670
+ declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
4671
+ /**
4672
+ * get device type by ble name
4673
+ * @param name Ble name
4674
+ */
3765
4675
  declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
3766
- declare const getDeviceBleName: (features?: Features) => string | null;
3767
- declare const getDeviceUUID: (features: Features) => string;
3768
- declare const getDeviceLabel: (features?: Features) => string | null;
3769
- declare const getMethodVersionRange: (features: Features | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
3770
- declare const isMethodVersionRangeUnsupported: (versionRange?: IVersionRange) => boolean;
3771
- declare const getFirmwareType: (features: Features | undefined) => EFirmwareType;
3772
-
3773
- declare const getDeviceFirmwareVersion: (features: Features | undefined) => IVersionArray;
3774
- declare const getDeviceBLEFirmwareVersion: (features: Features) => IVersionArray;
3775
- declare const getDeviceBootloaderVersion: (features: Features | undefined) => IVersionArray;
3776
- declare const getDeviceBoardloaderVersion: (features: Features) => IVersionArray;
4676
+ /**
4677
+ * Get Connected Device ble name by features
4678
+ * @returns
4679
+ */
4680
+ declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
4681
+ /**
4682
+ * Get Connected Device serial number by features
4683
+ */
4684
+ declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
4685
+ /**
4686
+ * @deprecated Use getDeviceSerialNo instead.
4687
+ */
4688
+ declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
4689
+ /**
4690
+ * Get Connected Device label by features
4691
+ */
4692
+ declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
4693
+ /**
4694
+ * Get firmware version range by features
4695
+ * Type has a higher priority than Model
4696
+ */
4697
+ declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
4698
+ declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
4699
+
4700
+ /**
4701
+ * Get Connected Device version by features
4702
+ */
4703
+ declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4704
+ /**
4705
+ * Get Connected Device bootloader version by features
4706
+ */
4707
+ declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4708
+ /**
4709
+ * Get Connected Device boardloader/romloader version by features
4710
+ */
4711
+ declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4712
+ /**
4713
+ * Get Connected Device bluetooth firmware version by features
4714
+ */
4715
+ declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
3777
4716
 
3778
4717
  declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
3779
4718
  type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
@@ -3781,7 +4720,7 @@ type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
3781
4720
  type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
3782
4721
  declare class DataManager {
3783
4722
  static deviceMap: DeviceTypeMap & {
3784
- [k: string]: DeviceTypeMap[keyof DeviceTypeMap] | undefined;
4723
+ [k: string]: NonNullable<DeviceTypeMap[keyof DeviceTypeMap]> | undefined;
3785
4724
  };
3786
4725
  static assets: AssetsMap | null;
3787
4726
  static settings: ConnectSettings;
@@ -3789,12 +4728,21 @@ declare class DataManager {
3789
4728
  [schema in ProtobufMessageSchema]: JSON;
3790
4729
  };
3791
4730
  static lastCheckTimestamp: number;
4731
+ static protocolV2ResourcesConfigError: Error | undefined;
3792
4732
  static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
4733
+ /**
4734
+ * Touch、Pro System UI Resource Update
4735
+ * ** Interval upgrade is not considered **
4736
+ */
3793
4737
  static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
3794
4738
  features: Features;
3795
4739
  forcedUpdateRes?: boolean | undefined;
3796
4740
  firmwareType: EFirmwareType;
3797
4741
  }) => string | undefined;
4742
+ /**
4743
+ * Touch、Pro System full UI Resource Update
4744
+ * ** Interval upgrade is not considered **
4745
+ */
3798
4746
  static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
3799
4747
  static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
3800
4748
  static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
@@ -3816,24 +4764,41 @@ declare class DataManager {
3816
4764
  "en-US": string;
3817
4765
  } | undefined;
3818
4766
  private static enrichFirmwareReleaseInfo;
3819
- static load(settings: ConnectSettings): Promise<void>;
4767
+ static load(settings: ConnectSettings): Promise<boolean>;
4768
+ private static applyRemoteConfig;
3820
4769
  static updateEnv(newEnv: ConnectSettings['env']): void;
3821
4770
  static checkAndReloadData(): Promise<void>;
4771
+ /** Force a fresh remote config before an update is allowed to mutate the device. */
4772
+ static forceReloadData({ requireResources, }?: {
4773
+ requireResources?: boolean;
4774
+ }): Promise<void>;
4775
+ static getProtocolV2Resources(deviceType?: EDeviceType.Pro2 | EDeviceType.Neo): IProtocolV2Resource[] | undefined;
4776
+ static getProtocolV2BootResources(deviceType?: EDeviceType.Pro2 | EDeviceType.Neo): IProtocolV2BootResources | undefined;
3822
4777
  static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
3823
4778
  static getSettings(key?: undefined): ConnectSettings;
3824
4779
  static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
3825
4780
  static isBleConnect: (env: ConnectSettings['env']) => boolean;
4781
+ /** Desktop WebUSB doesn't need browser permission prompt */
3826
4782
  static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
4783
+ /** Browser WebUSB needs permission prompt */
3827
4784
  static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
3828
4785
  }
3829
4786
 
3830
- declare const supportInputPinOnSoftware: (features: Features) => SupportFeatureType;
4787
+ declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
4788
+ /**
4789
+ * Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
4790
+ */
3831
4791
  declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
3832
4792
  features: Features;
3833
4793
  updateType: 'firmware' | 'ble';
3834
4794
  targetVersion?: string | undefined;
3835
4795
  firmwareType: EFirmwareType;
3836
4796
  }) => 'ble' | IFirmwareField;
4797
+ /**
4798
+ * Returns the optional firmware version
4799
+ * Used in firmware web update
4800
+ * https://firmware.onekey.so/
4801
+ */
3837
4802
  declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
3838
4803
 
3839
4804
  declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
@@ -3843,15 +4808,40 @@ declare function checkNeedUpdateBootForClassicAndMini({ features, willUpdateFirm
3843
4808
  firmwareType: EFirmwareType;
3844
4809
  }): boolean;
3845
4810
 
4811
+ type DeviceSettingsProtocol = 'V1' | 'V2';
4812
+ type DeviceSettingsField = keyof DeviceSettingsParams;
4813
+ declare const DEVICE_SETTINGS_SHARED_FIELDS: readonly ["language", "label", "usePassphrase", "autoLockDelayMs", "autoShutdownDelayMs", "hapticFeedback", "bluetoothEnabled"];
4814
+ declare const DEVICE_SETTINGS_V1_ONLY_FIELDS: readonly ["homescreen", "passphraseSource", "displayRotation", "passphraseAlwaysOnDevice", "safetyChecks", "experimentalFeatures", "changeBrightness"];
4815
+ declare const DEVICE_SETTINGS_V2_ONLY_FIELDS: readonly ["brightness", "airgapMode", "animationEnabled", "tapToWake", "deviceNameDisplayEnabled", "fidoEnabled", "usbLockEnabled", "randomKeypad"];
4816
+ declare const PROTOCOL_V2_NEVER_TIMEOUT_MS = 268435456;
4817
+ declare const normalizeSafetyCheckLevel: (value: SafetyCheckLevel | null | undefined) => Enum_SafetyCheckLevel | null | undefined;
3846
4818
  declare const getLanguageConfig: (deviceType: IDeviceType) => Record<string, string>[];
3847
- type DurationParts = {
3848
- seconds: number;
3849
- minute: number;
3850
- hour: number;
3851
- day: number;
4819
+ type DeviceSettingsDurationOption = {
4820
+ label: string;
4821
+ valueMs: number;
3852
4822
  };
3853
- declare const getAutoLockOptions: (_deviceType: IDeviceType) => DurationParts[];
3854
- declare const getAutoShutDownOptions: (_deviceType: IDeviceType) => DurationParts[];
4823
+ type DeviceSettingsValueOption<T> = {
4824
+ label: string;
4825
+ value: T;
4826
+ };
4827
+ declare const getAutoLockOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
4828
+ declare const getAutoShutDownOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
4829
+ type DeviceSettingsCapabilities = {
4830
+ protocol: DeviceSettingsProtocol;
4831
+ supportedFields: readonly DeviceSettingsField[];
4832
+ languageOptions: ReadonlyArray<Record<string, string>>;
4833
+ autoLockDelayOptions: readonly DeviceSettingsDurationOption[];
4834
+ autoShutdownDelayOptions: readonly DeviceSettingsDurationOption[];
4835
+ ranges: {
4836
+ brightness?: {
4837
+ min: number;
4838
+ max: number;
4839
+ };
4840
+ };
4841
+ safetyCheckOptions: ReadonlyArray<DeviceSettingsValueOption<Enum_SafetyCheckLevel>>;
4842
+ onDeviceConfirmationFields: readonly DeviceSettingsField[];
4843
+ };
4844
+ declare const getDeviceSettingsCapabilities: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsCapabilities;
3855
4845
 
3856
4846
  declare const getHDPath: (path: string) => Array<number>;
3857
4847
  declare const getScriptType: (path: Array<number>) => InputScriptType;
@@ -3864,6 +4854,10 @@ type SizeConfig = {
3864
4854
  height: number;
3865
4855
  radius?: number;
3866
4856
  };
4857
+ declare const getNftSize: ({ deviceType, thumbnail, }: {
4858
+ deviceType: IDeviceType;
4859
+ thumbnail?: boolean | undefined;
4860
+ }) => SizeConfig | undefined;
3867
4861
  declare const getHomeScreenSize: ({ deviceType, homeScreenType, thumbnail, }: {
3868
4862
  deviceType: IDeviceType;
3869
4863
  homeScreenType: 'WallPaper' | 'Nft';
@@ -3888,8 +4882,12 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
3888
4882
  declare const corsValidator: (url?: string) => string | undefined;
3889
4883
  declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
3890
4884
 
4885
+ declare const registerFirmwareUpdateHostBinding: (binding: FirmwareUpdateHostBinding) => number;
4886
+ declare const unregisterFirmwareUpdateHostBinding: (generation?: number) => boolean;
4887
+ declare const getFirmwareUpdateHostBindingGeneration: () => number;
4888
+
3891
4889
  declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
3892
4890
  declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
3893
4891
  declare const HardwareTopLevelSdk: () => CoreApi;
3894
4892
 
3895
- 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 };
4893
+ 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, DeviceUnlockParams, 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, HardwareUiInteractionMeta, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2BootResources, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2Resource, IProtocolV2ResourceBundle, IProtocolV2ResourceFile, IProtocolV2ResourceType, IProtocolV2Resources, 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, UiRequestWindowClose, UiRequestWithoutPayload, UiResponseCorrelation, UiResponseCorrelationFields, 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, getNftSize, 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 };