@onekeyfe/hd-core 1.2.3-alpha.3 → 1.2.3-alpha.5

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 (65) hide show
  1. package/README.md +1 -1
  2. package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +503 -10
  3. package/__tests__/DeviceCommands.test.ts +21 -0
  4. package/__tests__/core-error-output.test.ts +169 -1
  5. package/__tests__/device-lifecycle-events.test.ts +350 -2
  6. package/__tests__/open-wallet-session-error-response.test.ts +2 -2
  7. package/__tests__/open-wallet-session.test.ts +8 -411
  8. package/__tests__/protocol-v2-bootloader-mode.test.ts +8 -2
  9. package/__tests__/protocol-v2.test.ts +99 -0
  10. package/__tests__/public-device-state-api.test.ts +2 -7
  11. package/__tests__/search-devices.test.ts +196 -8
  12. package/__tests__/sol-sign-offchain-message.test.ts +0 -8
  13. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  14. package/dist/api/GetFeatures.d.ts.map +1 -1
  15. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  16. package/dist/api/OpenWalletSession.d.ts.map +1 -1
  17. package/dist/api/SearchDevices.d.ts +2 -15
  18. package/dist/api/SearchDevices.d.ts.map +1 -1
  19. package/dist/api/allnetwork/AllNetworkGetAddress.d.ts +2 -0
  20. package/dist/api/allnetwork/AllNetworkGetAddress.d.ts.map +1 -1
  21. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +7 -1
  22. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
  23. package/dist/api/allnetwork/AllNetworkGetAddressByLoop.d.ts.map +1 -1
  24. package/dist/api/device/DeviceVerify.d.ts.map +1 -1
  25. package/dist/core/RequestQueue.d.ts +1 -0
  26. package/dist/core/RequestQueue.d.ts.map +1 -1
  27. package/dist/core/index.d.ts +1 -0
  28. package/dist/core/index.d.ts.map +1 -1
  29. package/dist/data-manager/TransportManager.d.ts +2 -0
  30. package/dist/data-manager/TransportManager.d.ts.map +1 -1
  31. package/dist/device/Device.d.ts +2 -0
  32. package/dist/device/Device.d.ts.map +1 -1
  33. package/dist/device/DeviceCommands.d.ts +4 -4
  34. package/dist/device/DeviceCommands.d.ts.map +1 -1
  35. package/dist/index.d.ts +19 -21
  36. package/dist/index.js +456 -186
  37. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -1
  38. package/dist/types/api/getFeatures.d.ts.map +1 -1
  39. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  40. package/dist/types/api/openWalletSession.d.ts +1 -10
  41. package/dist/types/api/openWalletSession.d.ts.map +1 -1
  42. package/dist/types/params.d.ts.map +1 -1
  43. package/dist/utils/patch.d.ts +1 -1
  44. package/dist/utils/patch.d.ts.map +1 -1
  45. package/package.json +4 -4
  46. package/src/api/FirmwareUpdateV4.ts +4 -0
  47. package/src/api/GetFeatures.ts +1 -0
  48. package/src/api/GetPassphraseState.ts +1 -0
  49. package/src/api/OpenWalletSession.ts +7 -77
  50. package/src/api/SearchDevices.ts +121 -27
  51. package/src/api/allnetwork/AllNetworkGetAddress.ts +79 -45
  52. package/src/api/allnetwork/AllNetworkGetAddressBase.ts +95 -24
  53. package/src/api/allnetwork/AllNetworkGetAddressByLoop.ts +3 -0
  54. package/src/api/device/DeviceVerify.ts +8 -0
  55. package/src/core/RequestQueue.ts +20 -0
  56. package/src/core/index.ts +135 -43
  57. package/src/data/messages/messages-protocol-v2.json +21 -0
  58. package/src/data-manager/TransportManager.ts +14 -3
  59. package/src/device/Device.ts +59 -28
  60. package/src/device/DeviceCommands.ts +6 -1
  61. package/src/protocols/protocol-v2/walletSession.ts +7 -0
  62. package/src/types/api/getFeatures.ts +2 -1
  63. package/src/types/api/getPassphraseState.ts +2 -5
  64. package/src/types/api/openWalletSession.ts +7 -19
  65. package/src/types/params.ts +7 -0
@@ -1,6 +1,13 @@
1
1
  import type { HardwareConnectProtocol } from '@onekeyfe/hd-shared';
2
2
 
3
3
  export interface CommonParams {
4
+ /**
5
+ * Keep the transport session after this call instead of releasing it.
6
+ * This is a Device.run() hold flag, not a wallet identity. It does not replace
7
+ * `useEmptyPassphrase`, `passphraseState`, or `openWalletSession`.
8
+ * USB multi-step flows and Electron BLE firmware windows still need this to
9
+ * avoid dropping the link between calls.
10
+ */
4
11
  keepSession?: boolean;
5
12
  /**
6
13
  * polling connect max retry count