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

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