@ledgerhq/device-management-kit 0.0.0-signer-eth-20250122093657 → 0.0.0-sol-signer-20251203164116

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 (1346) hide show
  1. package/README.md +88 -39
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/cjs/package.json +48 -43
  4. package/lib/cjs/src/api/DeviceManagementKit.js +1 -1
  5. package/lib/cjs/src/api/DeviceManagementKit.js.map +3 -3
  6. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  7. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +3 -3
  8. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  9. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  10. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js +1 -1
  11. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  12. package/lib/cjs/src/api/DmkConfig.js +1 -1
  13. package/lib/cjs/src/api/DmkConfig.js.map +1 -1
  14. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  15. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  16. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  17. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  18. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js +1 -1
  19. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
  20. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  21. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  22. package/lib/cjs/src/api/command/Command.js +1 -1
  23. package/lib/cjs/src/api/command/Command.js.map +1 -1
  24. package/lib/cjs/src/api/command/Errors.js +1 -1
  25. package/lib/cjs/src/api/command/Errors.js.map +3 -3
  26. package/lib/cjs/src/api/command/di/commandModule.js +1 -1
  27. package/lib/cjs/src/api/command/di/commandModule.js.map +3 -3
  28. package/lib/cjs/src/api/command/di/commandModule.test.js +1 -1
  29. package/lib/cjs/src/api/command/di/commandModule.test.js.map +2 -2
  30. package/lib/cjs/src/api/command/model/CommandResult.js +1 -1
  31. package/lib/cjs/src/api/command/model/CommandResult.js.map +2 -2
  32. package/lib/cjs/src/api/command/os/CloseAppCommand.js +1 -1
  33. package/lib/cjs/src/api/command/os/CloseAppCommand.js.map +2 -2
  34. package/lib/cjs/src/api/command/os/CloseAppCommand.test.js +1 -1
  35. package/lib/cjs/src/api/command/os/CloseAppCommand.test.js.map +2 -2
  36. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.js +1 -1
  37. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.js.map +2 -2
  38. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.test.js +1 -1
  39. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.test.js.map +2 -2
  40. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.js +1 -1
  41. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.js.map +2 -2
  42. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.test.js +1 -1
  43. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.test.js.map +3 -3
  44. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  45. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  46. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  47. package/lib/cjs/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  48. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js +1 -1
  49. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  50. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  51. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  52. package/lib/cjs/src/api/command/os/ListAppsCommand.js +1 -1
  53. package/lib/cjs/src/api/command/os/ListAppsCommand.js.map +2 -2
  54. package/lib/cjs/src/api/command/os/ListAppsCommand.test.js +1 -1
  55. package/lib/cjs/src/api/command/os/ListAppsCommand.test.js.map +2 -2
  56. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js +2 -0
  57. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  58. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  59. package/lib/cjs/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  60. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js +2 -0
  61. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  62. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  63. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  64. package/lib/cjs/src/api/command/os/OpenAppCommand.js +1 -1
  65. package/lib/cjs/src/api/command/os/OpenAppCommand.js.map +2 -2
  66. package/lib/cjs/src/api/command/os/OpenAppCommand.test.js +1 -1
  67. package/lib/cjs/src/api/command/os/OpenAppCommand.test.js.map +2 -2
  68. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.js +2 -0
  69. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.js.map +7 -0
  70. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.test.js +2 -0
  71. package/lib/cjs/src/api/command/os/SecureElementFlagsParser.test.js.map +7 -0
  72. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  73. package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  74. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js +1 -1
  75. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  76. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  77. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  78. package/lib/cjs/src/api/command/utils/CommandUtils.js +1 -1
  79. package/lib/cjs/src/api/command/utils/CommandUtils.js.map +3 -3
  80. package/lib/cjs/src/api/command/utils/CommandUtils.test.js +1 -1
  81. package/lib/cjs/src/api/command/utils/CommandUtils.test.js.map +3 -3
  82. package/lib/cjs/src/api/command/utils/GlobalCommandError.js +1 -1
  83. package/lib/cjs/src/api/command/utils/GlobalCommandError.js.map +2 -2
  84. package/lib/cjs/src/api/device/DeviceModel.js +1 -1
  85. package/lib/cjs/src/api/device/DeviceModel.js.map +2 -2
  86. package/lib/cjs/src/api/device/SecureElementFlags.js +2 -0
  87. package/lib/cjs/src/api/device/SecureElementFlags.js.map +7 -0
  88. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  89. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  90. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  91. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  92. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  93. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  94. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  95. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  96. package/lib/cjs/src/api/device-action/di/deviceActionModule.js +1 -1
  97. package/lib/cjs/src/api/device-action/di/deviceActionModule.js.map +3 -3
  98. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js +1 -1
  99. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  100. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js +1 -1
  101. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  102. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  103. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  104. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  105. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  106. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +2 -0
  107. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +7 -0
  108. package/lib/cjs/src/api/device-action/os/Errors.js +1 -1
  109. package/lib/cjs/src/api/device-action/os/Errors.js.map +3 -3
  110. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  111. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  112. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  113. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  114. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js +2 -0
  115. package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  116. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  117. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +3 -3
  118. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  119. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  120. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
  121. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
  122. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  123. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  124. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js +1 -1
  125. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js.map +1 -1
  126. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  127. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  128. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  129. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  130. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js +2 -0
  131. package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  132. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  133. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  134. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  135. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  136. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  137. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +3 -3
  138. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  139. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  140. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  141. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  142. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  143. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  144. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js +1 -1
  145. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js.map +1 -1
  146. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  147. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  148. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  149. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  150. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js +2 -0
  151. package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  152. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  153. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  154. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  155. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  156. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js +1 -1
  157. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +1 -1
  158. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  159. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  160. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  161. package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  162. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  163. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  164. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  165. package/lib/cjs/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  166. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  167. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  168. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  169. package/lib/cjs/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  170. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  171. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  172. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  173. package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  174. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  175. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  176. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  177. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  178. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  179. package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  180. package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
  181. package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +2 -2
  182. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
  183. package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  184. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  185. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +2 -2
  186. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.js +2 -0
  187. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.js.map +7 -0
  188. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js +2 -0
  189. package/lib/cjs/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js.map +7 -0
  190. package/lib/cjs/src/api/index.js +1 -1
  191. package/lib/cjs/src/api/index.js.map +3 -3
  192. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.js +1 -1
  193. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.js.map +3 -3
  194. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  195. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  196. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  197. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +3 -3
  198. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  199. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  200. package/lib/cjs/src/api/secure-channel/constants.js +2 -0
  201. package/lib/cjs/src/api/secure-channel/constants.js.map +7 -0
  202. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +2 -0
  203. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +7 -0
  204. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js +2 -0
  205. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js.map +7 -0
  206. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js +2 -0
  207. package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js.map +7 -0
  208. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +2 -0
  209. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +7 -0
  210. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js +2 -0
  211. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js.map +7 -0
  212. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js +2 -0
  213. package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js.map +7 -0
  214. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +2 -0
  215. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +7 -0
  216. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js +2 -0
  217. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js.map +7 -0
  218. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js +2 -0
  219. package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +7 -0
  220. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +2 -0
  221. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +7 -0
  222. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js +2 -0
  223. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js.map +7 -0
  224. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js +2 -0
  225. package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js.map +7 -0
  226. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js +2 -0
  227. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +7 -0
  228. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +2 -0
  229. package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +7 -0
  230. package/lib/cjs/src/api/secure-channel/task/types.js +2 -0
  231. package/lib/cjs/src/api/secure-channel/task/types.js.map +7 -0
  232. package/lib/cjs/src/api/secure-channel/types.js +2 -0
  233. package/lib/cjs/src/api/secure-channel/types.js.map +7 -0
  234. package/lib/cjs/src/api/secure-channel/utils.js +2 -0
  235. package/lib/cjs/src/api/secure-channel/utils.js.map +7 -0
  236. package/lib/cjs/src/api/secure-channel/utils.test.js +2 -0
  237. package/lib/cjs/src/api/secure-channel/utils.test.js.map +7 -0
  238. package/lib/cjs/src/api/transport/model/ConnectedDevice.js +1 -1
  239. package/lib/cjs/src/api/transport/model/ConnectedDevice.js.map +3 -3
  240. package/lib/cjs/src/api/transport/model/DeviceApduSender.js +2 -0
  241. package/lib/cjs/src/api/transport/model/DeviceApduSender.js.map +7 -0
  242. package/lib/cjs/src/api/transport/model/DeviceConnection.js +1 -1
  243. package/lib/cjs/src/api/transport/model/DeviceConnection.js.map +1 -1
  244. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  245. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  246. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  247. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  248. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  249. package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  250. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js +1 -1
  251. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js.map +1 -1
  252. package/lib/cjs/src/api/transport/model/Errors.js +1 -1
  253. package/lib/cjs/src/api/transport/model/Errors.js.map +3 -3
  254. package/lib/cjs/src/api/transport/model/Transport.js.map +1 -1
  255. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.js +1 -1
  256. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.js.map +3 -3
  257. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  258. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  259. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.test.js +1 -1
  260. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.test.js.map +3 -3
  261. package/lib/cjs/src/api/transport/model/TransportDiscoveredDevice.js +1 -1
  262. package/lib/cjs/src/api/transport/model/TransportDiscoveredDevice.js.map +1 -1
  263. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  264. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  265. package/lib/cjs/src/api/types.js +1 -1
  266. package/lib/cjs/src/api/types.js.map +1 -1
  267. package/lib/cjs/src/api/utils/AppName.js +2 -0
  268. package/lib/cjs/src/api/utils/AppName.js.map +7 -0
  269. package/lib/cjs/src/api/utils/AppName.test.js +2 -0
  270. package/lib/cjs/src/api/utils/AppName.test.js.map +7 -0
  271. package/lib/cjs/src/api/utils/Base64String.test.js +1 -1
  272. package/lib/cjs/src/api/utils/Base64String.test.js.map +2 -2
  273. package/lib/cjs/src/api/utils/HexaString.js +1 -1
  274. package/lib/cjs/src/api/utils/HexaString.js.map +3 -3
  275. package/lib/cjs/src/api/utils/HexaString.test.js +1 -1
  276. package/lib/cjs/src/api/utils/HexaString.test.js.map +2 -2
  277. package/lib/cjs/src/di.js +1 -1
  278. package/lib/cjs/src/di.js.map +3 -3
  279. package/lib/cjs/src/di.stub.js +1 -1
  280. package/lib/cjs/src/di.stub.js.map +2 -2
  281. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  282. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  283. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  284. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  285. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  286. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  287. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  288. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  289. package/lib/cjs/src/internal/config/di/configModule.js +1 -1
  290. package/lib/cjs/src/internal/config/di/configModule.js.map +3 -3
  291. package/lib/cjs/src/internal/config/di/configModule.test.js +1 -1
  292. package/lib/cjs/src/internal/config/di/configModule.test.js.map +2 -2
  293. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js +1 -1
  294. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  295. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  296. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  297. package/lib/cjs/src/internal/crypto/CryptoService.js +2 -0
  298. package/lib/cjs/src/internal/crypto/CryptoService.js.map +7 -0
  299. package/lib/cjs/src/internal/crypto/NobleCryptoService.js +2 -0
  300. package/lib/cjs/src/internal/crypto/NobleCryptoService.js.map +7 -0
  301. package/lib/cjs/src/internal/crypto/NobleCryptoService.test.js +2 -0
  302. package/lib/cjs/src/internal/crypto/NobleCryptoService.test.js.map +7 -0
  303. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +1 -1
  304. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  305. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  306. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  307. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js +1 -1
  308. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  309. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js +1 -1
  310. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +3 -3
  311. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
  312. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  313. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  314. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  315. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js +1 -1
  316. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js.map +2 -2
  317. package/lib/cjs/src/internal/device-session/model/DevicePinger.js +2 -0
  318. package/lib/cjs/src/internal/device-session/model/DevicePinger.js.map +7 -0
  319. package/lib/cjs/src/internal/device-session/model/DevicePinger.test.js +2 -0
  320. package/lib/cjs/src/internal/device-session/model/DevicePinger.test.js.map +7 -0
  321. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  322. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  323. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  324. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  325. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.js +2 -0
  326. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.js.map +7 -0
  327. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js +2 -0
  328. package/lib/cjs/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js.map +7 -0
  329. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js +1 -1
  330. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js.map +3 -3
  331. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  332. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +3 -3
  333. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js +2 -0
  334. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.js.map +7 -0
  335. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js +2 -0
  336. package/lib/cjs/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +7 -0
  337. package/lib/cjs/src/internal/device-session/model/Frame.js +1 -1
  338. package/lib/cjs/src/internal/device-session/model/Frame.js.map +3 -3
  339. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
  340. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
  341. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  342. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  343. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  344. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  345. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  346. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  347. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.js +1 -1
  348. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.js.map +3 -3
  349. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  350. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  351. package/lib/cjs/src/internal/device-session/service/DeviceSessionService.js +1 -1
  352. package/lib/cjs/src/internal/device-session/service/DeviceSessionService.js.map +1 -1
  353. package/lib/cjs/src/internal/device-session/service/MutexService.js +2 -0
  354. package/lib/cjs/src/internal/device-session/service/MutexService.js.map +7 -0
  355. package/lib/cjs/src/internal/device-session/service/MutexService.test.js +2 -0
  356. package/lib/cjs/src/internal/device-session/service/MutexService.test.js.map +7 -0
  357. package/lib/cjs/src/internal/device-session/service/RefresherService.js +2 -0
  358. package/lib/cjs/src/internal/device-session/service/RefresherService.js.map +7 -0
  359. package/lib/cjs/src/internal/device-session/service/RefresherService.test.js +2 -0
  360. package/lib/cjs/src/internal/device-session/service/RefresherService.test.js.map +7 -0
  361. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  362. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  363. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  364. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  365. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  366. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  367. package/lib/cjs/src/internal/device-session/utils/deviceSessionUtils.js +2 -0
  368. package/lib/cjs/src/internal/device-session/utils/deviceSessionUtils.js.map +7 -0
  369. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
  370. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
  371. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  372. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  373. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js +1 -1
  374. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js.map +2 -2
  375. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  376. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  377. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  378. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  379. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.js +1 -1
  380. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.js.map +3 -3
  381. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  382. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  383. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  384. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  385. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  386. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  387. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +2 -0
  388. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +7 -0
  389. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js +2 -0
  390. package/lib/cjs/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js.map +7 -0
  391. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +1 -1
  392. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +3 -3
  393. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  394. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  395. package/lib/cjs/src/internal/discovery/use-case/ReconnectUseCase.js +2 -0
  396. package/lib/cjs/src/internal/discovery/use-case/ReconnectUseCase.js.map +7 -0
  397. package/lib/cjs/src/internal/discovery/use-case/ReconnectUseCase.test.js +2 -0
  398. package/lib/cjs/src/internal/discovery/use-case/ReconnectUseCase.test.js.map +7 -0
  399. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  400. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  401. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  402. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  403. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  404. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  405. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  406. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  407. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +1 -1
  408. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  409. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  410. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  411. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  412. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  413. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  414. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  415. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  416. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  417. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  418. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  419. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  420. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  421. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  422. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  423. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  424. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  425. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
  426. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  427. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  428. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  429. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js +1 -1
  430. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  431. package/lib/cjs/src/internal/manager-api/model/Application.js +1 -1
  432. package/lib/cjs/src/internal/manager-api/model/Application.js.map +1 -1
  433. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  434. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  435. package/lib/cjs/src/internal/manager-api/model/Errors.js +1 -1
  436. package/lib/cjs/src/internal/manager-api/model/Errors.js.map +3 -3
  437. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  438. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  439. package/lib/cjs/src/internal/manager-api/model/Language.js +2 -0
  440. package/lib/cjs/src/internal/manager-api/model/Language.js.map +7 -0
  441. package/lib/cjs/src/internal/manager-api/model/Params.js +1 -1
  442. package/lib/cjs/src/internal/manager-api/model/Params.js.map +1 -1
  443. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  444. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  445. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  446. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  447. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +1 -1
  448. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +1 -1
  449. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  450. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  451. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  452. package/lib/cjs/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  453. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  454. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  455. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  456. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  457. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js +2 -0
  458. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  459. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  460. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  461. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  462. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  463. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  464. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  465. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  466. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  467. package/lib/cjs/src/internal/secure-channel/model/Const.js +2 -0
  468. package/lib/cjs/src/internal/secure-channel/model/Const.js.map +7 -0
  469. package/lib/cjs/src/internal/secure-channel/model/Errors.js +2 -0
  470. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +7 -0
  471. package/lib/cjs/src/internal/secure-channel/model/Params.js +2 -0
  472. package/lib/cjs/src/internal/secure-channel/model/Params.js.map +7 -0
  473. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  474. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  475. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  476. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  477. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +2 -0
  478. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  479. package/lib/cjs/src/internal/send/di/sendModule.js +1 -1
  480. package/lib/cjs/src/internal/send/di/sendModule.js.map +3 -3
  481. package/lib/cjs/src/internal/send/di/sendModule.test.js +1 -1
  482. package/lib/cjs/src/internal/send/di/sendModule.test.js.map +2 -2
  483. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +1 -1
  484. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  485. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  486. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  487. package/lib/cjs/src/internal/transport/di/transportModule.js +1 -1
  488. package/lib/cjs/src/internal/transport/di/transportModule.js.map +3 -3
  489. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  490. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  491. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js +1 -1
  492. package/lib/cjs/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  493. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  494. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  495. package/lib/cjs/src/internal/transport/service/TransportService.js +1 -1
  496. package/lib/cjs/src/internal/transport/service/TransportService.js.map +1 -1
  497. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  498. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  499. package/lib/esm/package.json +48 -43
  500. package/lib/esm/src/api/DeviceManagementKit.js +1 -1
  501. package/lib/esm/src/api/DeviceManagementKit.js.map +3 -3
  502. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  503. package/lib/esm/src/api/DeviceManagementKit.test.js.map +3 -3
  504. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  505. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  506. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js +1 -1
  507. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  508. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
  509. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
  510. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
  511. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
  512. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js +1 -1
  513. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
  514. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  515. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  516. package/lib/esm/src/api/command/Errors.js +1 -1
  517. package/lib/esm/src/api/command/Errors.js.map +3 -3
  518. package/lib/esm/src/api/command/di/commandModule.js +1 -1
  519. package/lib/esm/src/api/command/di/commandModule.js.map +3 -3
  520. package/lib/esm/src/api/command/di/commandModule.test.js +1 -1
  521. package/lib/esm/src/api/command/di/commandModule.test.js.map +2 -2
  522. package/lib/esm/src/api/command/model/CommandResult.js.map +2 -2
  523. package/lib/esm/src/api/command/os/CloseAppCommand.js +1 -1
  524. package/lib/esm/src/api/command/os/CloseAppCommand.js.map +2 -2
  525. package/lib/esm/src/api/command/os/CloseAppCommand.test.js +1 -1
  526. package/lib/esm/src/api/command/os/CloseAppCommand.test.js.map +2 -2
  527. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.js +1 -1
  528. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.js.map +2 -2
  529. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.test.js +1 -1
  530. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.test.js.map +2 -2
  531. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.js +1 -1
  532. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.js.map +2 -2
  533. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.test.js +1 -1
  534. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.test.js.map +3 -3
  535. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js +2 -0
  536. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.js.map +7 -0
  537. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js +2 -0
  538. package/lib/esm/src/api/command/os/GetCustomImageSizeCommand.test.js.map +7 -0
  539. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +1 -1
  540. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +3 -3
  541. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js +1 -1
  542. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js.map +3 -3
  543. package/lib/esm/src/api/command/os/ListAppsCommand.js +1 -1
  544. package/lib/esm/src/api/command/os/ListAppsCommand.js.map +2 -2
  545. package/lib/esm/src/api/command/os/ListAppsCommand.test.js +1 -1
  546. package/lib/esm/src/api/command/os/ListAppsCommand.test.js.map +2 -2
  547. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js +2 -0
  548. package/lib/esm/src/api/command/os/ListLanguagePackCommand.js.map +7 -0
  549. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js +2 -0
  550. package/lib/esm/src/api/command/os/ListLanguagePackCommand.test.js.map +7 -0
  551. package/lib/esm/src/api/command/os/LoadCertificateCommand.js +2 -0
  552. package/lib/esm/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  553. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  554. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  555. package/lib/esm/src/api/command/os/OpenAppCommand.js +1 -1
  556. package/lib/esm/src/api/command/os/OpenAppCommand.js.map +2 -2
  557. package/lib/esm/src/api/command/os/OpenAppCommand.test.js +1 -1
  558. package/lib/esm/src/api/command/os/OpenAppCommand.test.js.map +2 -2
  559. package/lib/esm/src/api/command/os/SecureElementFlagsParser.js +2 -0
  560. package/lib/esm/src/api/command/os/SecureElementFlagsParser.js.map +7 -0
  561. package/lib/esm/src/api/command/os/SecureElementFlagsParser.test.js +2 -0
  562. package/lib/esm/src/api/command/os/SecureElementFlagsParser.test.js.map +7 -0
  563. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
  564. package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
  565. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js +1 -1
  566. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js.map +3 -3
  567. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  568. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  569. package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
  570. package/lib/esm/src/api/command/utils/CommandUtils.js.map +3 -3
  571. package/lib/esm/src/api/command/utils/CommandUtils.test.js +1 -1
  572. package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +3 -3
  573. package/lib/esm/src/api/command/utils/GlobalCommandError.js +1 -1
  574. package/lib/esm/src/api/command/utils/GlobalCommandError.js.map +2 -2
  575. package/lib/esm/src/api/device/DeviceModel.js +1 -1
  576. package/lib/esm/src/api/device/DeviceModel.js.map +2 -2
  577. package/lib/esm/src/api/device/SecureElementFlags.js +1 -0
  578. package/lib/esm/src/api/device/SecureElementFlags.js.map +7 -0
  579. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  580. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  581. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  582. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
  583. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  584. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  585. package/lib/esm/src/api/device-action/di/deviceActionModule.js +1 -1
  586. package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +3 -3
  587. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +1 -1
  588. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
  589. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +1 -1
  590. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
  591. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  592. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  593. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  594. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  595. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -0
  596. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +7 -0
  597. package/lib/esm/src/api/device-action/os/Errors.js +1 -1
  598. package/lib/esm/src/api/device-action/os/Errors.js.map +3 -3
  599. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +2 -0
  600. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +7 -0
  601. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js +2 -0
  602. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.js.map +7 -0
  603. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js +1 -0
  604. package/lib/esm/src/api/device-action/os/GetDeviceMetadata/types.js.map +7 -0
  605. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
  606. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +3 -3
  607. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  608. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  609. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
  610. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
  611. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  612. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  613. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
  614. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
  615. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
  616. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
  617. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js +1 -0
  618. package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
  619. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +1 -1
  620. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +2 -2
  621. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  622. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  623. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  624. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +3 -3
  625. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  626. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  627. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  628. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
  629. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  630. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  631. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
  632. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
  633. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
  634. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
  635. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js +1 -0
  636. package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
  637. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  638. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  639. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  640. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  641. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
  642. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
  643. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
  644. package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
  645. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js +2 -0
  646. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.js.map +7 -0
  647. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js +2 -0
  648. package/lib/esm/src/api/device-action/task/GetApplicationsMetadataTask.test.js.map +7 -0
  649. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js +2 -0
  650. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.js.map +7 -0
  651. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js +2 -0
  652. package/lib/esm/src/api/device-action/task/GetFirmwareMetadataTask.test.js.map +7 -0
  653. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
  654. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
  655. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
  656. package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
  657. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  658. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  659. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
  660. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
  661. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
  662. package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
  663. package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
  664. package/lib/esm/src/api/device-model/model/DeviceModel.js.map +2 -2
  665. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
  666. package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
  667. package/lib/esm/src/api/device-session/DeviceSessionState.js +1 -1
  668. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +2 -2
  669. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.js +2 -0
  670. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.js.map +7 -0
  671. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js +2 -0
  672. package/lib/esm/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.js.map +7 -0
  673. package/lib/esm/src/api/index.js +1 -1
  674. package/lib/esm/src/api/index.js.map +3 -3
  675. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.js +1 -1
  676. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.js.map +3 -3
  677. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  678. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  679. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  680. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +3 -3
  681. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  682. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  683. package/lib/esm/src/api/secure-channel/constants.js +2 -0
  684. package/lib/esm/src/api/secure-channel/constants.js.map +7 -0
  685. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +2 -0
  686. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +7 -0
  687. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js +2 -0
  688. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.js.map +7 -0
  689. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/types.js +1 -0
  690. package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/types.js.map +7 -0
  691. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +2 -0
  692. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +7 -0
  693. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js +2 -0
  694. package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.js.map +7 -0
  695. package/lib/esm/src/api/secure-channel/device-action/InstallApp/types.js +1 -0
  696. package/lib/esm/src/api/secure-channel/device-action/InstallApp/types.js.map +7 -0
  697. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +2 -0
  698. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +7 -0
  699. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js +2 -0
  700. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.js.map +7 -0
  701. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js +2 -0
  702. package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +7 -0
  703. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +2 -0
  704. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +7 -0
  705. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js +2 -0
  706. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.js.map +7 -0
  707. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/types.js +1 -0
  708. package/lib/esm/src/api/secure-channel/device-action/UninstallApp/types.js.map +7 -0
  709. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js +2 -0
  710. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +7 -0
  711. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +2 -0
  712. package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +7 -0
  713. package/lib/esm/src/api/secure-channel/task/types.js +2 -0
  714. package/lib/esm/src/api/secure-channel/task/types.js.map +7 -0
  715. package/lib/esm/src/api/secure-channel/types.js +1 -0
  716. package/lib/esm/src/api/secure-channel/types.js.map +7 -0
  717. package/lib/esm/src/api/secure-channel/utils.js +2 -0
  718. package/lib/esm/src/api/secure-channel/utils.js.map +7 -0
  719. package/lib/esm/src/api/secure-channel/utils.test.js +2 -0
  720. package/lib/esm/src/api/secure-channel/utils.test.js.map +7 -0
  721. package/lib/esm/src/api/transport/model/ConnectedDevice.js +1 -1
  722. package/lib/esm/src/api/transport/model/ConnectedDevice.js.map +3 -3
  723. package/lib/esm/src/api/transport/model/DeviceApduSender.js +1 -0
  724. package/lib/esm/src/api/transport/model/DeviceApduSender.js.map +7 -0
  725. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  726. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  727. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +2 -0
  728. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +7 -0
  729. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
  730. package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
  731. package/lib/esm/src/api/transport/model/Errors.js +1 -1
  732. package/lib/esm/src/api/transport/model/Errors.js.map +3 -3
  733. package/lib/esm/src/api/transport/model/TransportConnectedDevice.js +1 -1
  734. package/lib/esm/src/api/transport/model/TransportConnectedDevice.js.map +3 -3
  735. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  736. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  737. package/lib/esm/src/api/transport/model/TransportConnectedDevice.test.js +1 -1
  738. package/lib/esm/src/api/transport/model/TransportConnectedDevice.test.js.map +3 -3
  739. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  740. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  741. package/lib/esm/src/api/utils/AppName.js +2 -0
  742. package/lib/esm/src/api/utils/AppName.js.map +7 -0
  743. package/lib/esm/src/api/utils/AppName.test.js +2 -0
  744. package/lib/esm/src/api/utils/AppName.test.js.map +7 -0
  745. package/lib/esm/src/api/utils/Base64String.test.js +1 -1
  746. package/lib/esm/src/api/utils/Base64String.test.js.map +2 -2
  747. package/lib/esm/src/api/utils/HexaString.js +1 -1
  748. package/lib/esm/src/api/utils/HexaString.js.map +3 -3
  749. package/lib/esm/src/api/utils/HexaString.test.js +1 -1
  750. package/lib/esm/src/api/utils/HexaString.test.js.map +2 -2
  751. package/lib/esm/src/di.js +1 -1
  752. package/lib/esm/src/di.js.map +3 -3
  753. package/lib/esm/src/di.stub.js +1 -1
  754. package/lib/esm/src/di.stub.js.map +2 -2
  755. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  756. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  757. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  758. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  759. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  760. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  761. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  762. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  763. package/lib/esm/src/internal/config/di/configModule.js +1 -1
  764. package/lib/esm/src/internal/config/di/configModule.js.map +3 -3
  765. package/lib/esm/src/internal/config/di/configModule.test.js +1 -1
  766. package/lib/esm/src/internal/config/di/configModule.test.js.map +2 -2
  767. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js +1 -1
  768. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  769. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  770. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  771. package/lib/esm/src/internal/crypto/CryptoService.js +1 -0
  772. package/lib/esm/src/internal/crypto/CryptoService.js.map +7 -0
  773. package/lib/esm/src/internal/crypto/NobleCryptoService.js +2 -0
  774. package/lib/esm/src/internal/crypto/NobleCryptoService.js.map +7 -0
  775. package/lib/esm/src/internal/crypto/NobleCryptoService.test.js +2 -0
  776. package/lib/esm/src/internal/crypto/NobleCryptoService.test.js.map +7 -0
  777. package/lib/esm/src/internal/device-model/di/deviceModelModule.js +1 -1
  778. package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +3 -3
  779. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +1 -1
  780. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
  781. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js +1 -1
  782. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js.map +3 -3
  783. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js +1 -1
  784. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +3 -3
  785. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
  786. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
  787. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
  788. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
  789. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js +1 -1
  790. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js.map +2 -2
  791. package/lib/esm/src/internal/device-session/model/DevicePinger.js +2 -0
  792. package/lib/esm/src/internal/device-session/model/DevicePinger.js.map +7 -0
  793. package/lib/esm/src/internal/device-session/model/DevicePinger.test.js +2 -0
  794. package/lib/esm/src/internal/device-session/model/DevicePinger.test.js.map +7 -0
  795. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  796. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  797. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  798. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  799. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.js +2 -0
  800. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.js.map +7 -0
  801. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js +2 -0
  802. package/lib/esm/src/internal/device-session/model/DeviceSessionEventDispatcher.test.js.map +7 -0
  803. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js +1 -1
  804. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js.map +3 -3
  805. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  806. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +3 -3
  807. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js +2 -0
  808. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.js.map +7 -0
  809. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js +2 -0
  810. package/lib/esm/src/internal/device-session/model/DeviceSessionStateHandler.test.js.map +7 -0
  811. package/lib/esm/src/internal/device-session/model/Frame.js +1 -1
  812. package/lib/esm/src/internal/device-session/model/Frame.js.map +3 -3
  813. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
  814. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
  815. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  816. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  817. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
  818. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
  819. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  820. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  821. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.js +1 -1
  822. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.js.map +3 -3
  823. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  824. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  825. package/lib/esm/src/internal/device-session/service/MutexService.js +2 -0
  826. package/lib/esm/src/internal/device-session/service/MutexService.js.map +7 -0
  827. package/lib/esm/src/internal/device-session/service/MutexService.test.js +2 -0
  828. package/lib/esm/src/internal/device-session/service/MutexService.test.js.map +7 -0
  829. package/lib/esm/src/internal/device-session/service/RefresherService.js +2 -0
  830. package/lib/esm/src/internal/device-session/service/RefresherService.js.map +7 -0
  831. package/lib/esm/src/internal/device-session/service/RefresherService.test.js +2 -0
  832. package/lib/esm/src/internal/device-session/service/RefresherService.test.js.map +7 -0
  833. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js +1 -1
  834. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +3 -3
  835. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  836. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  837. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  838. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  839. package/lib/esm/src/internal/device-session/utils/deviceSessionUtils.js +2 -0
  840. package/lib/esm/src/internal/device-session/utils/deviceSessionUtils.js.map +7 -0
  841. package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
  842. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
  843. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  844. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  845. package/lib/esm/src/internal/discovery/di/discoveryTypes.js +1 -1
  846. package/lib/esm/src/internal/discovery/di/discoveryTypes.js.map +2 -2
  847. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  848. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  849. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  850. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  851. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.js +1 -1
  852. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.js.map +3 -3
  853. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  854. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  855. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  856. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  857. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  858. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  859. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js +2 -0
  860. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.js.map +7 -0
  861. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js +2 -0
  862. package/lib/esm/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.js.map +7 -0
  863. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +1 -1
  864. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +3 -3
  865. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  866. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  867. package/lib/esm/src/internal/discovery/use-case/ReconnectUseCase.js +2 -0
  868. package/lib/esm/src/internal/discovery/use-case/ReconnectUseCase.js.map +7 -0
  869. package/lib/esm/src/internal/discovery/use-case/ReconnectUseCase.test.js +2 -0
  870. package/lib/esm/src/internal/discovery/use-case/ReconnectUseCase.test.js.map +7 -0
  871. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js +1 -1
  872. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +2 -2
  873. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  874. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  875. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +1 -1
  876. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +3 -3
  877. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  878. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
  879. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +1 -1
  880. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
  881. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
  882. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
  883. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  884. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  885. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  886. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  887. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  888. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  889. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  890. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  891. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js +1 -1
  892. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +1 -1
  893. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  894. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  895. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
  896. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
  897. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  898. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  899. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js +1 -1
  900. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js.map +2 -2
  901. package/lib/esm/src/internal/manager-api/model/Application.js +1 -1
  902. package/lib/esm/src/internal/manager-api/model/Application.js.map +1 -1
  903. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  904. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  905. package/lib/esm/src/internal/manager-api/model/Errors.js +1 -1
  906. package/lib/esm/src/internal/manager-api/model/Errors.js.map +3 -3
  907. package/lib/esm/src/internal/manager-api/model/Language.js +1 -0
  908. package/lib/esm/src/internal/manager-api/model/Language.js.map +7 -0
  909. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  910. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +3 -3
  911. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  912. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  913. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js +2 -0
  914. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.js.map +7 -0
  915. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js +2 -0
  916. package/lib/esm/src/internal/manager-api/use-case/SetProviderUseCase.test.js.map +7 -0
  917. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  918. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  919. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  920. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  921. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js +1 -0
  922. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  923. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  924. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  925. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  926. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  927. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  928. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  929. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  930. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  931. package/lib/esm/src/internal/secure-channel/model/Const.js +2 -0
  932. package/lib/esm/src/internal/secure-channel/model/Const.js.map +7 -0
  933. package/lib/esm/src/internal/secure-channel/model/Errors.js +2 -0
  934. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +7 -0
  935. package/lib/esm/src/internal/secure-channel/model/Params.js +1 -0
  936. package/lib/esm/src/internal/secure-channel/model/Params.js.map +7 -0
  937. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  938. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  939. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  940. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  941. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js +1 -0
  942. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  943. package/lib/esm/src/internal/send/di/sendModule.js +1 -1
  944. package/lib/esm/src/internal/send/di/sendModule.js.map +3 -3
  945. package/lib/esm/src/internal/send/di/sendModule.test.js +1 -1
  946. package/lib/esm/src/internal/send/di/sendModule.test.js.map +2 -2
  947. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +1 -1
  948. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
  949. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  950. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  951. package/lib/esm/src/internal/transport/di/transportModule.js +1 -1
  952. package/lib/esm/src/internal/transport/di/transportModule.js.map +3 -3
  953. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  954. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  955. package/lib/esm/src/internal/transport/service/DefaultTransportService.js +1 -1
  956. package/lib/esm/src/internal/transport/service/DefaultTransportService.js.map +3 -3
  957. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  958. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  959. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  960. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  961. package/lib/types/src/api/DeviceManagementKit.d.ts +42 -10
  962. package/lib/types/src/api/DeviceManagementKit.d.ts.map +1 -1
  963. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  964. package/lib/types/src/api/DmkConfig.d.ts +2 -0
  965. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  966. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
  967. package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
  968. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts +66 -0
  969. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
  970. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts +1 -0
  971. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts.map +1 -1
  972. package/lib/types/src/api/command/Command.d.ts +4 -0
  973. package/lib/types/src/api/command/Command.d.ts.map +1 -1
  974. package/lib/types/src/api/command/Errors.d.ts +5 -0
  975. package/lib/types/src/api/command/Errors.d.ts.map +1 -1
  976. package/lib/types/src/api/command/di/commandModule.d.ts.map +1 -1
  977. package/lib/types/src/api/command/model/CommandResult.d.ts +3 -3
  978. package/lib/types/src/api/command/model/CommandResult.d.ts.map +1 -1
  979. package/lib/types/src/api/command/os/CloseAppCommand.d.ts +1 -0
  980. package/lib/types/src/api/command/os/CloseAppCommand.d.ts.map +1 -1
  981. package/lib/types/src/api/command/os/GetAppAndVersionCommand.d.ts +1 -0
  982. package/lib/types/src/api/command/os/GetAppAndVersionCommand.d.ts.map +1 -1
  983. package/lib/types/src/api/command/os/GetBatteryStatusCommand.d.ts +1 -0
  984. package/lib/types/src/api/command/os/GetBatteryStatusCommand.d.ts.map +1 -1
  985. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts +17 -0
  986. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.d.ts.map +1 -0
  987. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts +2 -0
  988. package/lib/types/src/api/command/os/GetCustomImageSizeCommand.test.d.ts.map +1 -0
  989. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +39 -4
  990. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  991. package/lib/types/src/api/command/os/ListAppsCommand.d.ts +1 -0
  992. package/lib/types/src/api/command/os/ListAppsCommand.d.ts.map +1 -1
  993. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts +25 -0
  994. package/lib/types/src/api/command/os/ListLanguagePackCommand.d.ts.map +1 -0
  995. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts +2 -0
  996. package/lib/types/src/api/command/os/ListLanguagePackCommand.test.d.ts.map +1 -0
  997. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts +26 -0
  998. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts.map +1 -0
  999. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts +2 -0
  1000. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts.map +1 -0
  1001. package/lib/types/src/api/command/os/OpenAppCommand.d.ts +1 -0
  1002. package/lib/types/src/api/command/os/OpenAppCommand.d.ts.map +1 -1
  1003. package/lib/types/src/api/command/os/SecureElementFlagsParser.d.ts +43 -0
  1004. package/lib/types/src/api/command/os/SecureElementFlagsParser.d.ts.map +1 -0
  1005. package/lib/types/src/api/command/os/SecureElementFlagsParser.test.d.ts +2 -0
  1006. package/lib/types/src/api/command/os/SecureElementFlagsParser.test.d.ts.map +1 -0
  1007. package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
  1008. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts +5 -1
  1009. package/lib/types/src/api/command/use-case/SendCommandUseCase.d.ts.map +1 -1
  1010. package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
  1011. package/lib/types/src/api/command/utils/CommandUtils.d.ts +4 -0
  1012. package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
  1013. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts +1 -1
  1014. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts.map +1 -1
  1015. package/lib/types/src/api/device/DeviceModel.d.ts +2 -1
  1016. package/lib/types/src/api/device/DeviceModel.d.ts.map +1 -1
  1017. package/lib/types/src/api/device/SecureElementFlags.d.ts +41 -0
  1018. package/lib/types/src/api/device/SecureElementFlags.d.ts.map +1 -0
  1019. package/lib/types/src/api/device-action/DeviceAction.d.ts +9 -1
  1020. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  1021. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts +2 -1
  1022. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  1023. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +9 -0
  1024. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  1025. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts +5 -2
  1026. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
  1027. package/lib/types/src/api/device-action/di/deviceActionModule.d.ts.map +1 -1
  1028. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts +5 -2
  1029. package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts.map +1 -1
  1030. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts +40 -0
  1031. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -0
  1032. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts +2 -0
  1033. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts.map +1 -0
  1034. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +19 -0
  1035. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -0
  1036. package/lib/types/src/api/device-action/os/Errors.d.ts +25 -0
  1037. package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
  1038. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts +58 -0
  1039. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts.map +1 -0
  1040. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts +2 -0
  1041. package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.test.d.ts.map +1 -0
  1042. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts +29 -0
  1043. package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts.map +1 -0
  1044. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts +1 -1
  1045. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
  1046. package/lib/types/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.d.ts.map +1 -1
  1047. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +3 -4
  1048. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
  1049. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts +40 -0
  1050. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts.map +1 -0
  1051. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts +2 -0
  1052. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts.map +1 -0
  1053. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts +66 -0
  1054. package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts.map +1 -0
  1055. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts +1 -1
  1056. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts.map +1 -1
  1057. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
  1058. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts +0 -1
  1059. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts.map +1 -1
  1060. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts +15 -0
  1061. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -0
  1062. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts +2 -0
  1063. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts.map +1 -0
  1064. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +25 -0
  1065. package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -0
  1066. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  1067. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -1
  1068. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  1069. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts +30 -0
  1070. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts.map +1 -0
  1071. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts +2 -0
  1072. package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts.map +1 -0
  1073. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts +31 -0
  1074. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.d.ts.map +1 -0
  1075. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts +2 -0
  1076. package/lib/types/src/api/device-action/task/GetApplicationsMetadataTask.test.d.ts.map +1 -0
  1077. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts +18 -0
  1078. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.d.ts.map +1 -0
  1079. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts +2 -0
  1080. package/lib/types/src/api/device-action/task/GetFirmwareMetadataTask.test.d.ts.map +1 -0
  1081. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +21 -0
  1082. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -0
  1083. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts +2 -0
  1084. package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts.map +1 -0
  1085. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts +1 -0
  1086. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts.map +1 -1
  1087. package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
  1088. package/lib/types/src/api/device-model/model/DeviceModel.d.ts +2 -0
  1089. package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
  1090. package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
  1091. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +97 -0
  1092. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  1093. package/lib/types/src/api/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
  1094. package/lib/types/src/api/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
  1095. package/lib/types/src/api/device-session/use-case/{ToggleDeviceSessionRefresher.d.ts → DisableDeviceSessionRefresher.d.ts} +6 -6
  1096. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.d.ts.map +1 -0
  1097. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.d.ts +2 -0
  1098. package/lib/types/src/api/device-session/use-case/DisableDeviceSessionRefresher.test.d.ts.map +1 -0
  1099. package/lib/types/src/api/index.d.ts +13 -2
  1100. package/lib/types/src/api/index.d.ts.map +1 -1
  1101. package/lib/types/src/api/logger-subscriber/service/ConsoleLogger.d.ts +1 -0
  1102. package/lib/types/src/api/logger-subscriber/service/ConsoleLogger.d.ts.map +1 -1
  1103. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts +1 -1
  1104. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts.map +1 -1
  1105. package/lib/types/src/api/secure-channel/constants.d.ts +2 -0
  1106. package/lib/types/src/api/secure-channel/constants.d.ts.map +1 -0
  1107. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts +8 -0
  1108. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts.map +1 -0
  1109. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.d.ts +2 -0
  1110. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.test.d.ts.map +1 -0
  1111. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts +50 -0
  1112. package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts.map +1 -0
  1113. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts +8 -0
  1114. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -0
  1115. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.d.ts +2 -0
  1116. package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.test.d.ts.map +1 -0
  1117. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts +46 -0
  1118. package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts.map +1 -0
  1119. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts +8 -0
  1120. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts.map +1 -0
  1121. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.d.ts +2 -0
  1122. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.test.d.ts.map +1 -0
  1123. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts +59 -0
  1124. package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts.map +1 -0
  1125. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts +8 -0
  1126. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -0
  1127. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.d.ts +2 -0
  1128. package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.test.d.ts.map +1 -0
  1129. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts +43 -0
  1130. package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts.map +1 -0
  1131. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts +30 -0
  1132. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts.map +1 -0
  1133. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.test.d.ts +2 -0
  1134. package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.test.d.ts.map +1 -0
  1135. package/lib/types/src/api/secure-channel/task/types.d.ts +117 -0
  1136. package/lib/types/src/api/secure-channel/task/types.d.ts.map +1 -0
  1137. package/lib/types/src/api/secure-channel/types.d.ts +4 -0
  1138. package/lib/types/src/api/secure-channel/types.d.ts.map +1 -0
  1139. package/lib/types/src/api/secure-channel/utils.d.ts +36 -0
  1140. package/lib/types/src/api/secure-channel/utils.d.ts.map +1 -0
  1141. package/lib/types/src/api/secure-channel/utils.test.d.ts +2 -0
  1142. package/lib/types/src/api/secure-channel/utils.test.d.ts.map +1 -0
  1143. package/lib/types/src/api/transport/model/ConnectedDevice.d.ts +3 -2
  1144. package/lib/types/src/api/transport/model/ConnectedDevice.d.ts.map +1 -1
  1145. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts +17 -0
  1146. package/lib/types/src/api/transport/model/DeviceApduSender.d.ts.map +1 -0
  1147. package/lib/types/src/api/transport/model/DeviceConnection.d.ts +2 -1
  1148. package/lib/types/src/api/transport/model/DeviceConnection.d.ts.map +1 -1
  1149. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts +1 -1
  1150. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts.map +1 -1
  1151. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts +63 -0
  1152. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -0
  1153. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts +2 -0
  1154. package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts.map +1 -0
  1155. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts +2 -0
  1156. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts.map +1 -1
  1157. package/lib/types/src/api/transport/model/Errors.d.ts +27 -3
  1158. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  1159. package/lib/types/src/api/transport/model/Transport.d.ts +2 -2
  1160. package/lib/types/src/api/transport/model/Transport.d.ts.map +1 -1
  1161. package/lib/types/src/api/transport/model/TransportConnectedDevice.d.ts +3 -1
  1162. package/lib/types/src/api/transport/model/TransportConnectedDevice.d.ts.map +1 -1
  1163. package/lib/types/src/api/transport/model/TransportDiscoveredDevice.d.ts +2 -0
  1164. package/lib/types/src/api/transport/model/TransportDiscoveredDevice.d.ts.map +1 -1
  1165. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts +7 -7
  1166. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts.map +1 -1
  1167. package/lib/types/src/api/types.d.ts +10 -2
  1168. package/lib/types/src/api/types.d.ts.map +1 -1
  1169. package/lib/types/src/api/utils/AppName.d.ts +2 -0
  1170. package/lib/types/src/api/utils/AppName.d.ts.map +1 -0
  1171. package/lib/types/src/api/utils/AppName.test.d.ts +2 -0
  1172. package/lib/types/src/api/utils/AppName.test.d.ts.map +1 -0
  1173. package/lib/types/src/api/utils/HexaString.d.ts +4 -3
  1174. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  1175. package/lib/types/src/di.d.ts.map +1 -1
  1176. package/lib/types/src/di.stub.d.ts +1 -1
  1177. package/lib/types/src/di.stub.d.ts.map +1 -1
  1178. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts +1 -1
  1179. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts.map +1 -1
  1180. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts +3 -3
  1181. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts.map +1 -1
  1182. package/lib/types/src/internal/config/di/configModule.d.ts.map +1 -1
  1183. package/lib/types/src/internal/crypto/CryptoService.d.ts +12 -0
  1184. package/lib/types/src/internal/crypto/CryptoService.d.ts.map +1 -0
  1185. package/lib/types/src/internal/crypto/NobleCryptoService.d.ts +8 -0
  1186. package/lib/types/src/internal/crypto/NobleCryptoService.d.ts.map +1 -0
  1187. package/lib/types/src/internal/crypto/NobleCryptoService.test.d.ts +2 -0
  1188. package/lib/types/src/internal/crypto/NobleCryptoService.test.d.ts.map +1 -0
  1189. package/lib/types/src/internal/device-model/di/deviceModelModule.d.ts.map +1 -1
  1190. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts +1 -0
  1191. package/lib/types/src/internal/device-session/data/ApduResponseConst.d.ts.map +1 -1
  1192. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts +6 -1
  1193. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts.map +1 -1
  1194. package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
  1195. package/lib/types/src/internal/device-session/di/deviceSessionTypes.d.ts +1 -1
  1196. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts +18 -0
  1197. package/lib/types/src/internal/device-session/model/DevicePinger.d.ts.map +1 -0
  1198. package/lib/types/src/internal/device-session/model/DevicePinger.test.d.ts +2 -0
  1199. package/lib/types/src/internal/device-session/model/DevicePinger.test.d.ts.map +1 -0
  1200. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +30 -12
  1201. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  1202. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts +3 -2
  1203. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  1204. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.d.ts +35 -0
  1205. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.d.ts.map +1 -0
  1206. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.test.d.ts +2 -0
  1207. package/lib/types/src/internal/device-session/model/DeviceSessionEventDispatcher.test.d.ts.map +1 -0
  1208. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts +17 -79
  1209. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts.map +1 -1
  1210. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts +20 -0
  1211. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.d.ts.map +1 -0
  1212. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.test.d.ts +2 -0
  1213. package/lib/types/src/internal/device-session/model/DeviceSessionStateHandler.test.d.ts.map +1 -0
  1214. package/lib/types/src/internal/device-session/model/Frame.d.ts.map +1 -1
  1215. package/lib/types/src/internal/device-session/service/DefaultApduReceiverService.d.ts.map +1 -1
  1216. package/lib/types/src/internal/device-session/service/DefaultDeviceSessionService.d.ts +7 -5
  1217. package/lib/types/src/internal/device-session/service/DefaultDeviceSessionService.d.ts.map +1 -1
  1218. package/lib/types/src/internal/device-session/service/DeviceSessionService.d.ts +28 -1
  1219. package/lib/types/src/internal/device-session/service/DeviceSessionService.d.ts.map +1 -1
  1220. package/lib/types/src/internal/device-session/service/MutexService.d.ts +6 -0
  1221. package/lib/types/src/internal/device-session/service/MutexService.d.ts.map +1 -0
  1222. package/lib/types/src/internal/device-session/service/MutexService.test.d.ts +2 -0
  1223. package/lib/types/src/internal/device-session/service/MutexService.test.d.ts.map +1 -0
  1224. package/lib/types/src/internal/device-session/service/RefresherService.d.ts +15 -0
  1225. package/lib/types/src/internal/device-session/service/RefresherService.d.ts.map +1 -0
  1226. package/lib/types/src/internal/device-session/service/RefresherService.test.d.ts +2 -0
  1227. package/lib/types/src/internal/device-session/service/RefresherService.test.d.ts.map +1 -0
  1228. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts +3 -1
  1229. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseCase.d.ts.map +1 -1
  1230. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts +3 -0
  1231. package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -0
  1232. package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
  1233. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts +2 -1
  1234. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts.map +1 -1
  1235. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts +14 -4
  1236. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts.map +1 -1
  1237. package/lib/types/src/internal/discovery/use-case/DisconnectUseCase.d.ts.map +1 -1
  1238. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts +24 -0
  1239. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.d.ts.map +1 -0
  1240. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.d.ts +2 -0
  1241. package/lib/types/src/internal/discovery/use-case/ListenToAvailableDevicesUseCase.test.d.ts.map +1 -0
  1242. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts +1 -1
  1243. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts.map +1 -1
  1244. package/lib/types/src/internal/discovery/use-case/ReconnectUseCase.d.ts +32 -0
  1245. package/lib/types/src/internal/discovery/use-case/ReconnectUseCase.d.ts.map +1 -0
  1246. package/lib/types/src/internal/discovery/use-case/ReconnectUseCase.test.d.ts +2 -0
  1247. package/lib/types/src/internal/discovery/use-case/ReconnectUseCase.test.d.ts.map +1 -0
  1248. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts +1 -1
  1249. package/lib/types/src/internal/discovery/use-case/StartDiscoveringUseCase.d.ts.map +1 -1
  1250. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts +4 -2
  1251. package/lib/types/src/internal/discovery/use-case/StopDiscoveringUseCase.d.ts.map +1 -1
  1252. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
  1253. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts +5 -5
  1254. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts.map +1 -1
  1255. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +29 -18
  1256. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  1257. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +46 -40
  1258. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  1259. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts +106 -17
  1260. package/lib/types/src/internal/manager-api/data/ManagerApiDto.d.ts.map +1 -1
  1261. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +11 -9
  1262. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  1263. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  1264. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts +1 -0
  1265. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts.map +1 -1
  1266. package/lib/types/src/internal/manager-api/model/Application.d.ts +14 -11
  1267. package/lib/types/src/internal/manager-api/model/Application.d.ts.map +1 -1
  1268. package/lib/types/src/internal/manager-api/model/Const.d.ts +2 -1
  1269. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  1270. package/lib/types/src/internal/manager-api/model/Errors.d.ts +0 -6
  1271. package/lib/types/src/internal/manager-api/model/Errors.d.ts.map +1 -1
  1272. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +18 -0
  1273. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  1274. package/lib/types/src/internal/manager-api/model/Language.d.ts +12 -0
  1275. package/lib/types/src/internal/manager-api/model/Language.d.ts.map +1 -0
  1276. package/lib/types/src/internal/manager-api/model/Params.d.ts +33 -62
  1277. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +1 -1
  1278. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts +13 -7
  1279. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  1280. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +71 -5
  1281. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  1282. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts +13 -0
  1283. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.d.ts.map +1 -0
  1284. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts +2 -0
  1285. package/lib/types/src/internal/manager-api/use-case/SetProviderUseCase.test.d.ts.map +1 -0
  1286. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts +18 -0
  1287. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts.map +1 -0
  1288. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts +2 -0
  1289. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts.map +1 -0
  1290. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts +52 -0
  1291. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts.map +1 -0
  1292. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts +10 -0
  1293. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts.map +1 -0
  1294. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts +9 -0
  1295. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -0
  1296. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts +2 -0
  1297. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts.map +1 -0
  1298. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts +6 -0
  1299. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts.map +1 -0
  1300. package/lib/types/src/internal/secure-channel/model/Const.d.ts +2 -0
  1301. package/lib/types/src/internal/secure-channel/model/Const.d.ts.map +1 -0
  1302. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +34 -0
  1303. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -0
  1304. package/lib/types/src/internal/secure-channel/model/Params.d.ts +84 -0
  1305. package/lib/types/src/internal/secure-channel/model/Params.d.ts.map +1 -0
  1306. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +21 -0
  1307. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -0
  1308. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts +2 -0
  1309. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts.map +1 -0
  1310. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +56 -0
  1311. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -0
  1312. package/lib/types/src/internal/send/di/sendModule.d.ts.map +1 -1
  1313. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +9 -1
  1314. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts.map +1 -1
  1315. package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
  1316. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts +2 -0
  1317. package/lib/types/src/internal/transport/service/DefaultTransportService.d.ts.map +1 -1
  1318. package/lib/types/src/internal/transport/service/TransportService.d.ts +3 -1
  1319. package/lib/types/src/internal/transport/service/TransportService.d.ts.map +1 -1
  1320. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts +7 -6
  1321. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts.map +1 -1
  1322. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  1323. package/package.json +45 -40
  1324. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js +0 -2
  1325. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js.map +0 -7
  1326. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +0 -2
  1327. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +0 -7
  1328. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +0 -2
  1329. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +0 -7
  1330. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +0 -2
  1331. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +0 -7
  1332. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js +0 -2
  1333. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.js.map +0 -7
  1334. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +0 -2
  1335. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +0 -7
  1336. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +0 -2
  1337. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +0 -7
  1338. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +0 -2
  1339. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +0 -7
  1340. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.d.ts.map +0 -1
  1341. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.d.ts +0 -2
  1342. package/lib/types/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.d.ts.map +0 -1
  1343. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts +0 -13
  1344. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts.map +0 -1
  1345. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts +0 -2
  1346. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- const E=1e3;export{E as DEVICE_SESSION_REFRESH_INTERVAL};
1
+ const E=1e3,I=1e3,S={isRefresherDisabled:!1,pollingInterval:1e3};export{S as DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,I as DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL,E as DEVICE_SESSION_REFRESHER_POLLING_INTERVAL};
2
2
  //# sourceMappingURL=DeviceSessionRefresherConst.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/data/DeviceSessionRefresherConst.ts"],
4
- "sourcesContent": ["export const DEVICE_SESSION_REFRESH_INTERVAL = 1000;\n"],
5
- "mappings": "AAAO,MAAMA,EAAkC",
6
- "names": ["DEVICE_SESSION_REFRESH_INTERVAL"]
4
+ "sourcesContent": ["// used for default args\nexport const DEVICE_SESSION_REFRESHER_POLLING_INTERVAL = 1000;\n\n// used to set a minimum interval for the exposed refresher options\nexport const DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL = 1000;\n\nexport const DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS = {\n isRefresherDisabled: false,\n pollingInterval: DEVICE_SESSION_REFRESHER_POLLING_INTERVAL,\n};\n"],
5
+ "mappings": "AACO,MAAMA,EAA4C,IAG5CC,EAAoD,IAEpDC,EAA2C,CACtD,oBAAqB,GACrB,gBAAiB,GACnB",
6
+ "names": ["DEVICE_SESSION_REFRESHER_POLLING_INTERVAL", "DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL", "DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{ContainerModule as a}from"inversify";import{ToggleDeviceSessionRefresherUseCase as p}from"../../../api/device-session/use-case/ToggleDeviceSessionRefresher";import{DefaultApduReceiverService as u}from"../../device-session/service/DefaultApduReceiverService";import{DefaultApduSenderService as v}from"../../device-session/service/DefaultApduSenderService";import{DefaultDeviceSessionService as g}from"../../device-session/service/DefaultDeviceSessionService";import{CloseSessionsUseCase as m}from"../../device-session/use-case/CloseSessionsUseCase";import{GetDeviceSessionStateUseCase as f}from"../../device-session/use-case/GetDeviceSessionStateUseCase";import{loggerTypes as c}from"../../logger-publisher/di/loggerTypes";import{StubUseCase as n}from"../../../../src/di.stub";import{deviceSessionTypes as e}from"./deviceSessionTypes";const M=({stub:S}={stub:!1})=>new a((r,l,d,i,A,y,C)=>{r(e.ApduSenderServiceFactory).toFactory(o=>{const t=o.container.get(c.LoggerPublisherServiceFactory);return s=>new v(s,t)}),r(e.ApduReceiverServiceFactory).toFactory(o=>{const t=o.container.get(c.LoggerPublisherServiceFactory);return(s={})=>new u(s,t)}),r(e.DeviceSessionService).to(g).inSingletonScope(),r(e.GetDeviceSessionStateUseCase).to(f),r(e.CloseSessionsUseCase).to(m),r(e.ToggleDeviceSessionRefresherUseCase).to(p),S&&(i(e.GetDeviceSessionStateUseCase).to(n),i(e.ToggleDeviceSessionRefresherUseCase).to(n))});export{M as deviceSessionModuleFactory};
1
+ import{ContainerModule as n}from"inversify";import{DisableDeviceSessionRefresherUseCase as a}from"../../../api/device-session/use-case/DisableDeviceSessionRefresher";import{DefaultApduReceiverService as u}from"../../device-session/service/DefaultApduReceiverService";import{DefaultApduSenderService as v}from"../../device-session/service/DefaultApduSenderService";import{DefaultDeviceSessionService as m}from"../../device-session/service/DefaultDeviceSessionService";import{CloseSessionsUseCase as g}from"../../device-session/use-case/CloseSessionsUseCase";import{GetDeviceSessionStateUseCase as l}from"../../device-session/use-case/GetDeviceSessionStateUseCase";import{loggerTypes as c}from"../../logger-publisher/di/loggerTypes";import{StubUseCase as S}from"../../../../src/di.stub";import{deviceSessionTypes as e}from"./deviceSessionTypes";const b=({stub:p}={stub:!1})=>new n(({bind:r,rebindSync:i})=>{r(e.ApduSenderServiceFactory).toFactory(o=>{const s=o.get(c.LoggerPublisherServiceFactory);return t=>new v(t,s)}),r(e.ApduReceiverServiceFactory).toFactory(o=>{const s=o.get(c.LoggerPublisherServiceFactory);return(t={})=>new u(t,s)}),r(e.DeviceSessionService).to(m).inSingletonScope(),r(e.GetDeviceSessionStateUseCase).to(l),r(e.CloseSessionsUseCase).to(g),r(e.DisableDeviceSessionRefresherUseCase).to(a),p&&(i(e.GetDeviceSessionStateUseCase).to(S),i(e.DisableDeviceSessionRefresherUseCase).to(S))});export{b as deviceSessionModuleFactory};
2
2
  //# sourceMappingURL=deviceSessionModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionModule.ts"],
4
- "sourcesContent": ["import { ContainerModule, type interfaces } from \"inversify\";\n\nimport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduReceiverConstructorArgs } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nimport { type ApduSenderServiceConstructorArgs } from \"@api/device-session/service/ApduSenderService\";\nimport { ToggleDeviceSessionRefresherUseCase } from \"@api/device-session/use-case/ToggleDeviceSessionRefresher\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DefaultApduReceiverService } from \"@internal/device-session/service/DefaultApduReceiverService\";\nimport { DefaultApduSenderService } from \"@internal/device-session/service/DefaultApduSenderService\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { CloseSessionsUseCase } from \"@internal/device-session/use-case/CloseSessionsUseCase\";\nimport { GetDeviceSessionStateUseCase } from \"@internal/device-session/use-case/GetDeviceSessionStateUseCase\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { deviceSessionTypes } from \"./deviceSessionTypes\";\n\nexport type DeviceSessionModuleArgs = Partial<{\n stub: boolean;\n}>;\n\nexport const deviceSessionModuleFactory = (\n { stub }: DeviceSessionModuleArgs = { stub: false },\n) =>\n new ContainerModule(\n (\n bind,\n _unbind,\n _isBound,\n rebind,\n _unbindAsync,\n _onActivation,\n _onDeactivation,\n ) => {\n bind<interfaces.Factory<ApduSenderService>>(\n deviceSessionTypes.ApduSenderServiceFactory,\n ).toFactory((context) => {\n const logger = context.container.get<\n (name: string) => LoggerPublisherService\n >(loggerTypes.LoggerPublisherServiceFactory);\n\n return (args: ApduSenderServiceConstructorArgs) => {\n return new DefaultApduSenderService(args, logger);\n };\n });\n\n bind<interfaces.Factory<ApduReceiverService>>(\n deviceSessionTypes.ApduReceiverServiceFactory,\n ).toFactory((context) => {\n const logger = context.container.get<\n (name: string) => LoggerPublisherService\n >(loggerTypes.LoggerPublisherServiceFactory);\n\n return (args: ApduReceiverConstructorArgs = {}) => {\n return new DefaultApduReceiverService(args, logger);\n };\n });\n\n bind(deviceSessionTypes.DeviceSessionService)\n .to(DefaultDeviceSessionService)\n .inSingletonScope();\n\n bind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n GetDeviceSessionStateUseCase,\n );\n bind(deviceSessionTypes.CloseSessionsUseCase).to(CloseSessionsUseCase);\n bind(deviceSessionTypes.ToggleDeviceSessionRefresherUseCase).to(\n ToggleDeviceSessionRefresherUseCase,\n );\n\n if (stub) {\n rebind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(StubUseCase);\n rebind(deviceSessionTypes.ToggleDeviceSessionRefresherUseCase).to(\n StubUseCase,\n );\n }\n },\n );\n"],
5
- "mappings": "AAAA,OAAS,mBAAAA,MAAwC,YAMjD,OAAS,uCAAAC,MAA2C,4DAEpD,OAAS,8BAAAC,MAAkC,8DAC3C,OAAS,4BAAAC,MAAgC,4DACzC,OAAS,+BAAAC,MAAmC,+DAC5C,OAAS,wBAAAC,MAA4B,yDACrC,OAAS,gCAAAC,MAAoC,iEAC7C,OAAS,eAAAC,MAAmB,4CAC5B,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,sBAAAC,MAA0B,uBAM5B,MAAMC,EAA6B,CACxC,CAAE,KAAAC,CAAK,EAA6B,CAAE,KAAM,EAAM,IAElD,IAAIX,EACF,CACEY,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,IACG,CACHN,EACEH,EAAmB,wBACrB,EAAE,UAAWU,GAAY,CACvB,MAAMC,EAASD,EAAQ,UAAU,IAE/BZ,EAAY,6BAA6B,EAE3C,OAAQc,GACC,IAAIlB,EAAyBkB,EAAMD,CAAM,CAEpD,CAAC,EAEDR,EACEH,EAAmB,0BACrB,EAAE,UAAWU,GAAY,CACvB,MAAMC,EAASD,EAAQ,UAAU,IAE/BZ,EAAY,6BAA6B,EAE3C,MAAO,CAACc,EAAoC,CAAC,IACpC,IAAInB,EAA2BmB,EAAMD,CAAM,CAEtD,CAAC,EAEDR,EAAKH,EAAmB,oBAAoB,EACzC,GAAGL,CAA2B,EAC9B,iBAAiB,EAEpBQ,EAAKH,EAAmB,4BAA4B,EAAE,GACpDH,CACF,EACAM,EAAKH,EAAmB,oBAAoB,EAAE,GAAGJ,CAAoB,EACrEO,EAAKH,EAAmB,mCAAmC,EAAE,GAC3DR,CACF,EAEIU,IACFI,EAAON,EAAmB,4BAA4B,EAAE,GAAGD,CAAW,EACtEO,EAAON,EAAmB,mCAAmC,EAAE,GAC7DD,CACF,EAEJ,CACF",
6
- "names": ["ContainerModule", "ToggleDeviceSessionRefresherUseCase", "DefaultApduReceiverService", "DefaultApduSenderService", "DefaultDeviceSessionService", "CloseSessionsUseCase", "GetDeviceSessionStateUseCase", "loggerTypes", "StubUseCase", "deviceSessionTypes", "deviceSessionModuleFactory", "stub", "bind", "_unbind", "_isBound", "rebind", "_unbindAsync", "_onActivation", "_onDeactivation", "context", "logger", "args"]
4
+ "sourcesContent": ["import { ContainerModule, type Factory } from \"inversify\";\n\nimport { type ApduReceiverService } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduReceiverConstructorArgs } from \"@api/device-session/service/ApduReceiverService\";\nimport { type ApduSenderService } from \"@api/device-session/service/ApduSenderService\";\nimport { type ApduSenderServiceConstructorArgs } from \"@api/device-session/service/ApduSenderService\";\nimport { DisableDeviceSessionRefresherUseCase } from \"@api/device-session/use-case/DisableDeviceSessionRefresher\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DefaultApduReceiverService } from \"@internal/device-session/service/DefaultApduReceiverService\";\nimport { DefaultApduSenderService } from \"@internal/device-session/service/DefaultApduSenderService\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { CloseSessionsUseCase } from \"@internal/device-session/use-case/CloseSessionsUseCase\";\nimport { GetDeviceSessionStateUseCase } from \"@internal/device-session/use-case/GetDeviceSessionStateUseCase\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { deviceSessionTypes } from \"./deviceSessionTypes\";\n\nexport type DeviceSessionModuleArgs = Partial<{\n stub: boolean;\n}>;\n\nexport const deviceSessionModuleFactory = (\n { stub }: DeviceSessionModuleArgs = { stub: false },\n) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind<Factory<ApduSenderService>>(\n deviceSessionTypes.ApduSenderServiceFactory,\n ).toFactory((context) => {\n const logger = context.get<(name: string) => LoggerPublisherService>(\n loggerTypes.LoggerPublisherServiceFactory,\n );\n\n return (args: ApduSenderServiceConstructorArgs) => {\n return new DefaultApduSenderService(args, logger);\n };\n });\n\n bind<Factory<ApduReceiverService>>(\n deviceSessionTypes.ApduReceiverServiceFactory,\n ).toFactory((context) => {\n const logger = context.get<(name: string) => LoggerPublisherService>(\n loggerTypes.LoggerPublisherServiceFactory,\n );\n\n return (args: ApduReceiverConstructorArgs = {}) => {\n return new DefaultApduReceiverService(args, logger);\n };\n });\n\n bind(deviceSessionTypes.DeviceSessionService)\n .to(DefaultDeviceSessionService)\n .inSingletonScope();\n\n bind(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n GetDeviceSessionStateUseCase,\n );\n bind(deviceSessionTypes.CloseSessionsUseCase).to(CloseSessionsUseCase);\n bind(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n DisableDeviceSessionRefresherUseCase,\n );\n\n if (stub) {\n rebindSync(deviceSessionTypes.GetDeviceSessionStateUseCase).to(\n StubUseCase,\n );\n rebindSync(deviceSessionTypes.DisableDeviceSessionRefresherUseCase).to(\n StubUseCase,\n );\n }\n });\n"],
5
+ "mappings": "AAAA,OAAS,mBAAAA,MAAqC,YAM9C,OAAS,wCAAAC,MAA4C,6DAErD,OAAS,8BAAAC,MAAkC,8DAC3C,OAAS,4BAAAC,MAAgC,4DACzC,OAAS,+BAAAC,MAAmC,+DAC5C,OAAS,wBAAAC,MAA4B,yDACrC,OAAS,gCAAAC,MAAoC,iEAC7C,OAAS,eAAAC,MAAmB,4CAC5B,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,sBAAAC,MAA0B,uBAM5B,MAAMC,EAA6B,CACxC,CAAE,KAAAC,CAAK,EAA6B,CAAE,KAAM,EAAM,IAElD,IAAIX,EAAgB,CAAC,CAAE,KAAAY,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EACEH,EAAmB,wBACrB,EAAE,UAAWK,GAAY,CACvB,MAAMC,EAASD,EAAQ,IACrBP,EAAY,6BACd,EAEA,OAAQS,GACC,IAAIb,EAAyBa,EAAMD,CAAM,CAEpD,CAAC,EAEDH,EACEH,EAAmB,0BACrB,EAAE,UAAWK,GAAY,CACvB,MAAMC,EAASD,EAAQ,IACrBP,EAAY,6BACd,EAEA,MAAO,CAACS,EAAoC,CAAC,IACpC,IAAId,EAA2Bc,EAAMD,CAAM,CAEtD,CAAC,EAEDH,EAAKH,EAAmB,oBAAoB,EACzC,GAAGL,CAA2B,EAC9B,iBAAiB,EAEpBQ,EAAKH,EAAmB,4BAA4B,EAAE,GACpDH,CACF,EACAM,EAAKH,EAAmB,oBAAoB,EAAE,GAAGJ,CAAoB,EACrEO,EAAKH,EAAmB,oCAAoC,EAAE,GAC5DR,CACF,EAEIU,IACFE,EAAWJ,EAAmB,4BAA4B,EAAE,GAC1DD,CACF,EACAK,EAAWJ,EAAmB,oCAAoC,EAAE,GAClED,CACF,EAEJ,CAAC",
6
+ "names": ["ContainerModule", "DisableDeviceSessionRefresherUseCase", "DefaultApduReceiverService", "DefaultApduSenderService", "DefaultDeviceSessionService", "CloseSessionsUseCase", "GetDeviceSessionStateUseCase", "loggerTypes", "StubUseCase", "deviceSessionTypes", "deviceSessionModuleFactory", "stub", "bind", "rebindSync", "context", "logger", "args"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Container as t}from"inversify";import{deviceSessionModuleFactory as i}from"./deviceSessionModule";describe("deviceSessionModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=i(),o=new t,o.load(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
1
+ import{Container as t}from"inversify";import{deviceSessionModuleFactory as i}from"./deviceSessionModule";describe("deviceSessionModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=i(),o=new t,o.loadSync(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
2
2
  //# sourceMappingURL=deviceSessionModule.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionModule.test.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { deviceSessionModuleFactory } from \"./deviceSessionModule\";\n\ndescribe(\"deviceSessionModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceSessionModuleFactory>;\n beforeEach(() => {\n mod = deviceSessionModuleFactory();\n container = new Container();\n container.load(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,8BAAAC,MAAkC,wBAE3C,SAAS,6BAA8B,IAAM,CAC3C,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAA2B,EACjCC,EAAY,IAAIF,EAChBE,EAAU,KAAKC,CAAG,CACpB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { deviceSessionModuleFactory } from \"./deviceSessionModule\";\n\ndescribe(\"deviceSessionModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof deviceSessionModuleFactory>;\n beforeEach(() => {\n mod = deviceSessionModuleFactory();\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,8BAAAC,MAAkC,wBAE3C,SAAS,6BAA8B,IAAM,CAC3C,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAA2B,EACjCC,EAAY,IAAIF,EAChBE,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["Container", "deviceSessionModuleFactory", "container", "mod"]
7
7
  }
@@ -1,2 +1,2 @@
1
- const e={ApduSenderServiceFactory:Symbol.for("ApduSenderServiceFactory"),ApduReceiverServiceFactory:Symbol.for("ApduReceiverServiceFactory"),DeviceSessionService:Symbol.for("DeviceSessionService"),GetDeviceSessionStateUseCase:Symbol.for("GetDeviceSessionStateUseCase"),ToggleDeviceSessionRefresherUseCase:Symbol.for("ToggleDeviceSessionRefresherUseCase"),CloseSessionsUseCase:Symbol.for("CloseSessionsUseCase")};export{e as deviceSessionTypes};
1
+ const e={ApduSenderServiceFactory:Symbol.for("ApduSenderServiceFactory"),ApduReceiverServiceFactory:Symbol.for("ApduReceiverServiceFactory"),DeviceSessionService:Symbol.for("DeviceSessionService"),GetDeviceSessionStateUseCase:Symbol.for("GetDeviceSessionStateUseCase"),DisableDeviceSessionRefresherUseCase:Symbol.for("DisableDeviceSessionRefresherUseCase"),CloseSessionsUseCase:Symbol.for("CloseSessionsUseCase")};export{e as deviceSessionTypes};
2
2
  //# sourceMappingURL=deviceSessionTypes.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/di/deviceSessionTypes.ts"],
4
- "sourcesContent": ["export const deviceSessionTypes = {\n ApduSenderServiceFactory: Symbol.for(\"ApduSenderServiceFactory\"),\n ApduReceiverServiceFactory: Symbol.for(\"ApduReceiverServiceFactory\"),\n DeviceSessionService: Symbol.for(\"DeviceSessionService\"),\n GetDeviceSessionStateUseCase: Symbol.for(\"GetDeviceSessionStateUseCase\"),\n ToggleDeviceSessionRefresherUseCase: Symbol.for(\n \"ToggleDeviceSessionRefresherUseCase\",\n ),\n CloseSessionsUseCase: Symbol.for(\"CloseSessionsUseCase\"),\n};\n"],
5
- "mappings": "AAAO,MAAMA,EAAqB,CAChC,yBAA0B,OAAO,IAAI,0BAA0B,EAC/D,2BAA4B,OAAO,IAAI,4BAA4B,EACnE,qBAAsB,OAAO,IAAI,sBAAsB,EACvD,6BAA8B,OAAO,IAAI,8BAA8B,EACvE,oCAAqC,OAAO,IAC1C,qCACF,EACA,qBAAsB,OAAO,IAAI,sBAAsB,CACzD",
4
+ "sourcesContent": ["export const deviceSessionTypes = {\n ApduSenderServiceFactory: Symbol.for(\"ApduSenderServiceFactory\"),\n ApduReceiverServiceFactory: Symbol.for(\"ApduReceiverServiceFactory\"),\n DeviceSessionService: Symbol.for(\"DeviceSessionService\"),\n GetDeviceSessionStateUseCase: Symbol.for(\"GetDeviceSessionStateUseCase\"),\n DisableDeviceSessionRefresherUseCase: Symbol.for(\n \"DisableDeviceSessionRefresherUseCase\",\n ),\n CloseSessionsUseCase: Symbol.for(\"CloseSessionsUseCase\"),\n};\n"],
5
+ "mappings": "AAAO,MAAMA,EAAqB,CAChC,yBAA0B,OAAO,IAAI,0BAA0B,EAC/D,2BAA4B,OAAO,IAAI,4BAA4B,EACnE,qBAAsB,OAAO,IAAI,sBAAsB,EACvD,6BAA8B,OAAO,IAAI,8BAA8B,EACvE,qCAAsC,OAAO,IAC3C,sCACF,EACA,qBAAsB,OAAO,IAAI,sBAAsB,CACzD",
6
6
  "names": ["deviceSessionTypes"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{DeviceModelId as c}from"../../../api/device/DeviceModel";import{GetAppAndVersionCommand as a,GetOsVersionCommand as m}from"../../../api/index";import{PINGER_TIMEOUT as o}from"../../device-session/data/ApduResponseConst";import{DEVICE_SESSION_REFRESHER_POLLING_INTERVAL as p}from"../../device-session/data/DeviceSessionRefresherConst";import{SessionEvents as i}from"../../device-session/model/DeviceSessionEventDispatcher";class D{constructor(e,t,r,n){this.connectedDevice=t;this._sessionEventDispatcher=r;this._sendCommandFunction=n,this._logger=e("device-pinger"),this._subscription=this._sessionEventDispatcher.listen().subscribe(async s=>await this.mapEventAction(s))}_sendCommandFunction;_subscription;_logger;async ping(){try{return await this.mapDevicePingAction(this.connectedDevice.deviceModel.id)}catch(e){throw this._logger.error("Error while pinging device",{data:{error:e}}),e}}mapEventAction=async e=>{switch(e.eventName){case i.REFRESH_NEEDED:return await this.ping();default:return null}};async mapDevicePingAction(e){switch(e){case c.NANO_S:{const t=async()=>{const s=await this._sendCommandFunction(new a,o);return this._sendCommandFunction(new m,o),s},r=new Promise(s=>{setTimeout(()=>s(null),p*2+100)}),n=await Promise.race([t(),r]);return n?this._sessionEventDispatcher.dispatch({eventName:i.COMMAND_SUCCEEDED,eventData:n}):this._sessionEventDispatcher.dispatch({eventName:i.DEVICE_STATE_UPDATE_LOCKED}),n}default:{const t=await this._sendCommandFunction(new a,o);return this._sessionEventDispatcher.dispatch({eventName:i.COMMAND_SUCCEEDED,eventData:t}),t}}}unsubscribe(){this._subscription.unsubscribe()}}export{D as DevicePinger};
2
+ //# sourceMappingURL=DevicePinger.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DevicePinger.ts"],
4
+ "sourcesContent": ["import { type Subscription } from \"rxjs\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n GetOsVersionCommand,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport {\n type Command,\n type CommandResult,\n type LoggerPublisherService,\n} from \"@api/types\";\nimport { PINGER_TIMEOUT } from \"@internal/device-session/data/ApduResponseConst\";\nimport { DEVICE_SESSION_REFRESHER_POLLING_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\ntype SendCommandFunction = <Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n abortTimeout?: number,\n) => Promise<CommandResult<Response, ErrorStatusCodes>>;\n\nexport class DevicePinger {\n private readonly _sendCommandFunction: SendCommandFunction;\n private _subscription: Subscription;\n private _logger: LoggerPublisherService;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n private connectedDevice: TransportConnectedDevice,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n sendCommandFunction: SendCommandFunction,\n ) {\n this._sendCommandFunction = sendCommandFunction;\n this._logger = loggerModuleFactory(\"device-pinger\");\n this._subscription = this._sessionEventDispatcher\n .listen()\n .subscribe(async (event) => await this.mapEventAction(event));\n }\n\n public async ping(): Promise<CommandResult<GetAppAndVersionResponse> | null> {\n try {\n const result = await this.mapDevicePingAction(\n this.connectedDevice.deviceModel.id,\n );\n return result;\n } catch (error) {\n this._logger.error(\"Error while pinging device\", {\n data: {\n error,\n },\n });\n throw error;\n }\n }\n\n private mapEventAction = async (event: NewEvent) => {\n switch (event.eventName) {\n case SessionEvents.REFRESH_NEEDED:\n return await this.ping();\n default:\n return null;\n }\n };\n\n private async mapDevicePingAction(deviceModelId: DeviceModelId) {\n switch (deviceModelId) {\n case DeviceModelId.NANO_S: {\n const chainPromise: () => Promise<\n CommandResult<GetAppAndVersionResponse>\n > = async () => {\n const appVersionResult = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n PINGER_TIMEOUT,\n );\n\n this._sendCommandFunction(new GetOsVersionCommand(), PINGER_TIMEOUT);\n return appVersionResult;\n };\n\n const timeoutPromise: Promise<null> = new Promise((resolve) => {\n setTimeout(\n () => resolve(null),\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 2 + 100,\n );\n });\n\n const resultOrTimeout: CommandResult<GetAppAndVersionResponse> | null =\n await Promise.race([chainPromise(), timeoutPromise]);\n\n if (!resultOrTimeout) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: resultOrTimeout,\n });\n }\n return resultOrTimeout;\n }\n default: {\n const result = await this._sendCommandFunction(\n new GetAppAndVersionCommand(),\n PINGER_TIMEOUT,\n );\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: result,\n });\n return result;\n }\n }\n }\n\n public unsubscribe(): void {\n this._subscription.unsubscribe();\n }\n}\n"],
5
+ "mappings": "AAEA,OAAS,iBAAAA,MAAqB,0BAC9B,OACE,2BAAAC,EAEA,uBAAAC,MAEK,aAMP,OAAS,kBAAAC,MAAsB,kDAC/B,OAAS,6CAAAC,MAAiD,4DAC1D,OAGE,iBAAAC,MACK,8DAOA,MAAMC,CAAa,CAKxB,YACEC,EACQC,EACAC,EACRC,EACA,CAHQ,qBAAAF,EACA,6BAAAC,EAGR,KAAK,qBAAuBC,EAC5B,KAAK,QAAUH,EAAoB,eAAe,EAClD,KAAK,cAAgB,KAAK,wBACvB,OAAO,EACP,UAAU,MAAOI,GAAU,MAAM,KAAK,eAAeA,CAAK,CAAC,CAChE,CAfiB,qBACT,cACA,QAeR,MAAa,MAAgE,CAC3E,GAAI,CAIF,OAHe,MAAM,KAAK,oBACxB,KAAK,gBAAgB,YAAY,EACnC,CAEF,OAASC,EAAO,CACd,WAAK,QAAQ,MAAM,6BAA8B,CAC/C,KAAM,CACJ,MAAAA,CACF,CACF,CAAC,EACKA,CACR,CACF,CAEQ,eAAiB,MAAOD,GAAoB,CAClD,OAAQA,EAAM,UAAW,CACvB,KAAKN,EAAc,eACjB,OAAO,MAAM,KAAK,KAAK,EACzB,QACE,OAAO,IACX,CACF,EAEA,MAAc,oBAAoBQ,EAA8B,CAC9D,OAAQA,EAAe,CACrB,KAAKb,EAAc,OAAQ,CACzB,MAAMc,EAEF,SAAY,CACd,MAAMC,EAAmB,MAAM,KAAK,qBAClC,IAAId,EACJE,CACF,EAEA,YAAK,qBAAqB,IAAID,EAAuBC,CAAc,EAC5DY,CACT,EAEMC,EAAgC,IAAI,QAASC,GAAY,CAC7D,WACE,IAAMA,EAAQ,IAAI,EAClBb,EAA4C,EAAI,GAClD,CACF,CAAC,EAEKc,EACJ,MAAM,QAAQ,KAAK,CAACJ,EAAa,EAAGE,CAAc,CAAC,EAErD,OAAKE,EAKH,KAAK,wBAAwB,SAAS,CACpC,UAAWb,EAAc,kBACzB,UAAWa,CACb,CAAC,EAPD,KAAK,wBAAwB,SAAS,CACpC,UAAWb,EAAc,0BAC3B,CAAC,EAOIa,CACT,CACA,QAAS,CACP,MAAMC,EAAS,MAAM,KAAK,qBACxB,IAAIlB,EACJE,CACF,EACA,YAAK,wBAAwB,SAAS,CACpC,UAAWE,EAAc,kBACzB,UAAWc,CACb,CAAC,EACMA,CACT,CACF,CACF,CAEO,aAAoB,CACzB,KAAK,cAAc,YAAY,CACjC,CACF",
6
+ "names": ["DeviceModelId", "GetAppAndVersionCommand", "GetOsVersionCommand", "PINGER_TIMEOUT", "DEVICE_SESSION_REFRESHER_POLLING_INTERVAL", "SessionEvents", "DevicePinger", "loggerModuleFactory", "connectedDevice", "_sessionEventDispatcher", "sendCommandFunction", "event", "error", "deviceModelId", "chainPromise", "appVersionResult", "timeoutPromise", "resolve", "resultOrTimeout", "result"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{Subject as D}from"rxjs";import{afterEach as f,beforeEach as C,describe as N,expect as n,it as r,vi as t}from"vitest";import{DeviceModelId as E}from"../../../api/device/DeviceModel";import{GetAppAndVersionCommand as S}from"../../../api/index";import{DEVICE_SESSION_REFRESHER_POLLING_INTERVAL as g}from"../../device-session/data/DeviceSessionRefresherConst";import{SessionEvents as i}from"../../device-session/model/DeviceSessionEventDispatcher";import{DevicePinger as p}from"./DevicePinger";N("DevicePinger",()=>{let e,u;const v=t.fn(()=>u);let c,a,l,s;C(()=>{c=new D,a={listen:()=>c.asObservable(),dispatch:t.fn()},e=t.fn(),u={info:t.fn(),warn:t.fn(),error:t.fn(),debug:t.fn(),subscribers:[]},l={deviceModel:{id:E.NANO_X}},s=new p(v,l,a,e)}),f(()=>{s.unsubscribe(),t.restoreAllMocks()}),r("should call sendCommandFunction and dispatch COMMAND_SUCCEEDED event on successful ping for non-NANO_S",async()=>{const o={status:"success",data:{foo:"bar"}};e.mockResolvedValue(o);const d=await s.ping();n(e).toHaveBeenCalledTimes(1);const m=e.mock.calls[0][0];n(m).toBeInstanceOf(S),n(a.dispatch).toHaveBeenCalledWith({eventName:i.COMMAND_SUCCEEDED,eventData:o}),n(d).toEqual(o)}),r("should log error and throw error on ping failure",async()=>{const o=new Error("ping failed");e.mockRejectedValue(o),await n(s.ping()).rejects.toThrow("ping failed"),n(e).toHaveBeenCalledTimes(1)}),r("should dispatch DEVICE_STATE_UPDATE_LOCKED and return null on timeout for NANO_S",async()=>{l.deviceModel.id=E.NANO_S,s.unsubscribe(),s=new p(v,l,a,e);const o=new Promise(()=>{});e.mockReturnValueOnce(o),t.useFakeTimers();const d=s.ping();t.advanceTimersByTime(g*4);const m=await d;n(m).toBeNull(),n(a.dispatch).toHaveBeenCalledWith({eventName:i.DEVICE_STATE_UPDATE_LOCKED}),n(e).toHaveBeenCalledTimes(1),t.useRealTimers()}),r("should call ping on REFRESH_NEEDED event",async()=>{const o={status:"success",data:{foo:"bar"}};e.mockResolvedValue(o),c.next({eventName:i.REFRESH_NEEDED,eventData:void 0}),await Promise.resolve(),n(e).toHaveBeenCalled(),n(a.dispatch).toHaveBeenCalledWith({eventName:i.COMMAND_SUCCEEDED,eventData:o})}),r("should not process events after unsubscribe is called",async()=>{s.unsubscribe(),e.mockClear(),c.next({eventName:i.REFRESH_NEEDED,eventData:void 0}),await Promise.resolve(),n(e).not.toHaveBeenCalled()})});
2
+ //# sourceMappingURL=DevicePinger.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DevicePinger.test.ts"],
4
+ "sourcesContent": ["import { Subject } from \"rxjs\";\nimport { afterEach, beforeEach, describe, expect, it, vi } from \"vitest\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport {\n GetAppAndVersionCommand,\n type TransportConnectedDevice,\n} from \"@api/index\";\nimport type { LoggerPublisherService } from \"@api/types\";\nimport { DEVICE_SESSION_REFRESHER_POLLING_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\nimport { DevicePinger } from \"./DevicePinger\";\n\ndescribe(\"DevicePinger\", () => {\n let dummySendCommandFunction: ReturnType<typeof vi.fn>;\n let mockLogger: LoggerPublisherService & {\n info: ReturnType<typeof vi.fn>;\n warn: ReturnType<typeof vi.fn>;\n error: ReturnType<typeof vi.fn>;\n };\n const mockedLoggerModuleFactory = vi.fn(() => mockLogger);\n let eventSubject: Subject<NewEvent>;\n let mockSessionEventDispatcher: DeviceSessionEventDispatcher;\n let dummyConnectedDevice: TransportConnectedDevice;\n let devicePinger: DevicePinger;\n\n beforeEach(() => {\n eventSubject = new Subject<NewEvent>();\n mockSessionEventDispatcher = {\n listen: () => eventSubject.asObservable(),\n dispatch: vi.fn(),\n } as unknown as DeviceSessionEventDispatcher;\n\n dummySendCommandFunction = vi.fn();\n mockLogger = {\n info: vi.fn(),\n warn: vi.fn(),\n error: vi.fn(),\n debug: vi.fn(),\n subscribers: [],\n };\n\n dummyConnectedDevice = {\n deviceModel: {\n id: DeviceModelId.NANO_X,\n },\n } as unknown as TransportConnectedDevice;\n\n devicePinger = new DevicePinger(\n mockedLoggerModuleFactory,\n dummyConnectedDevice,\n mockSessionEventDispatcher,\n dummySendCommandFunction,\n );\n });\n\n afterEach(() => {\n devicePinger.unsubscribe();\n vi.restoreAllMocks();\n });\n\n it(\"should call sendCommandFunction and dispatch COMMAND_SUCCEEDED event on successful ping for non-NANO_S\", async () => {\n // given\n const dummyResult = {\n status: \"success\",\n data: { foo: \"bar\" },\n };\n dummySendCommandFunction.mockResolvedValue(dummyResult);\n\n // when\n const result = await devicePinger.ping();\n\n // then\n expect(dummySendCommandFunction).toHaveBeenCalledTimes(1);\n const commandArg = dummySendCommandFunction.mock\n .calls[0]![0] as GetAppAndVersionCommand;\n expect(commandArg).toBeInstanceOf(GetAppAndVersionCommand);\n expect(mockSessionEventDispatcher.dispatch).toHaveBeenCalledWith({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: dummyResult,\n });\n expect(result).toEqual(dummyResult);\n });\n\n it(\"should log error and throw error on ping failure\", async () => {\n // given\n const dummyError = new Error(\"ping failed\");\n dummySendCommandFunction.mockRejectedValue(dummyError);\n\n // then\n await expect(devicePinger.ping()).rejects.toThrow(\"ping failed\");\n expect(dummySendCommandFunction).toHaveBeenCalledTimes(1);\n });\n\n it(\"should dispatch DEVICE_STATE_UPDATE_LOCKED and return null on timeout for NANO_S\", async () => {\n // given\n dummyConnectedDevice.deviceModel.id = DeviceModelId.NANO_S;\n devicePinger.unsubscribe();\n devicePinger = new DevicePinger(\n mockedLoggerModuleFactory,\n dummyConnectedDevice,\n mockSessionEventDispatcher,\n dummySendCommandFunction,\n );\n const neverResolvingPromise = new Promise(() => {});\n dummySendCommandFunction.mockReturnValueOnce(neverResolvingPromise);\n vi.useFakeTimers();\n\n // when\n const pingPromise = devicePinger.ping();\n vi.advanceTimersByTime(DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 4);\n\n const result = await pingPromise;\n\n // then\n expect(result).toBeNull();\n expect(mockSessionEventDispatcher.dispatch).toHaveBeenCalledWith({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n expect(dummySendCommandFunction).toHaveBeenCalledTimes(1);\n\n vi.useRealTimers();\n });\n\n it(\"should call ping on REFRESH_NEEDED event\", async () => {\n // given\n const dummyResult = {\n status: \"success\",\n data: { foo: \"bar\" },\n };\n dummySendCommandFunction.mockResolvedValue(dummyResult);\n\n // when\n eventSubject.next({\n eventName: SessionEvents.REFRESH_NEEDED,\n eventData: undefined,\n });\n await Promise.resolve();\n\n // then\n expect(dummySendCommandFunction).toHaveBeenCalled();\n expect(mockSessionEventDispatcher.dispatch).toHaveBeenCalledWith({\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: dummyResult,\n });\n });\n\n it(\"should not process events after unsubscribe is called\", async () => {\n // given\n devicePinger.unsubscribe();\n dummySendCommandFunction.mockClear();\n\n // when\n eventSubject.next({\n eventName: SessionEvents.REFRESH_NEEDED,\n eventData: undefined,\n });\n await Promise.resolve();\n\n // then\n expect(dummySendCommandFunction).not.toHaveBeenCalled();\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,WAAAA,MAAe,OACxB,OAAS,aAAAC,EAAW,cAAAC,EAAY,YAAAC,EAAU,UAAAC,EAAQ,MAAAC,EAAI,MAAAC,MAAU,SAEhE,OAAS,iBAAAC,MAAqB,0BAC9B,OACE,2BAAAC,MAEK,aAEP,OAAS,6CAAAC,MAAiD,4DAC1D,OAGE,iBAAAC,MACK,8DAEP,OAAS,gBAAAC,MAAoB,iBAE7BR,EAAS,eAAgB,IAAM,CAC7B,IAAIS,EACAC,EAKJ,MAAMC,EAA4BR,EAAG,GAAG,IAAMO,CAAU,EACxD,IAAIE,EACAC,EACAC,EACAC,EAEJhB,EAAW,IAAM,CACfa,EAAe,IAAIf,EACnBgB,EAA6B,CAC3B,OAAQ,IAAMD,EAAa,aAAa,EACxC,SAAUT,EAAG,GAAG,CAClB,EAEAM,EAA2BN,EAAG,GAAG,EACjCO,EAAa,CACX,KAAMP,EAAG,GAAG,EACZ,KAAMA,EAAG,GAAG,EACZ,MAAOA,EAAG,GAAG,EACb,MAAOA,EAAG,GAAG,EACb,YAAa,CAAC,CAChB,EAEAW,EAAuB,CACrB,YAAa,CACX,GAAIV,EAAc,MACpB,CACF,EAEAW,EAAe,IAAIP,EACjBG,EACAG,EACAD,EACAJ,CACF,CACF,CAAC,EAEDX,EAAU,IAAM,CACdiB,EAAa,YAAY,EACzBZ,EAAG,gBAAgB,CACrB,CAAC,EAEDD,EAAG,yGAA0G,SAAY,CAEvH,MAAMc,EAAc,CAClB,OAAQ,UACR,KAAM,CAAE,IAAK,KAAM,CACrB,EACAP,EAAyB,kBAAkBO,CAAW,EAGtD,MAAMC,EAAS,MAAMF,EAAa,KAAK,EAGvCd,EAAOQ,CAAwB,EAAE,sBAAsB,CAAC,EACxD,MAAMS,EAAaT,EAAyB,KACzC,MAAM,CAAC,EAAG,CAAC,EACdR,EAAOiB,CAAU,EAAE,eAAeb,CAAuB,EACzDJ,EAAOY,EAA2B,QAAQ,EAAE,qBAAqB,CAC/D,UAAWN,EAAc,kBACzB,UAAWS,CACb,CAAC,EACDf,EAAOgB,CAAM,EAAE,QAAQD,CAAW,CACpC,CAAC,EAEDd,EAAG,mDAAoD,SAAY,CAEjE,MAAMiB,EAAa,IAAI,MAAM,aAAa,EAC1CV,EAAyB,kBAAkBU,CAAU,EAGrD,MAAMlB,EAAOc,EAAa,KAAK,CAAC,EAAE,QAAQ,QAAQ,aAAa,EAC/Dd,EAAOQ,CAAwB,EAAE,sBAAsB,CAAC,CAC1D,CAAC,EAEDP,EAAG,mFAAoF,SAAY,CAEjGY,EAAqB,YAAY,GAAKV,EAAc,OACpDW,EAAa,YAAY,EACzBA,EAAe,IAAIP,EACjBG,EACAG,EACAD,EACAJ,CACF,EACA,MAAMW,EAAwB,IAAI,QAAQ,IAAM,CAAC,CAAC,EAClDX,EAAyB,oBAAoBW,CAAqB,EAClEjB,EAAG,cAAc,EAGjB,MAAMkB,EAAcN,EAAa,KAAK,EACtCZ,EAAG,oBAAoBG,EAA4C,CAAC,EAEpE,MAAMW,EAAS,MAAMI,EAGrBpB,EAAOgB,CAAM,EAAE,SAAS,EACxBhB,EAAOY,EAA2B,QAAQ,EAAE,qBAAqB,CAC/D,UAAWN,EAAc,0BAC3B,CAAC,EACDN,EAAOQ,CAAwB,EAAE,sBAAsB,CAAC,EAExDN,EAAG,cAAc,CACnB,CAAC,EAEDD,EAAG,2CAA4C,SAAY,CAEzD,MAAMc,EAAc,CAClB,OAAQ,UACR,KAAM,CAAE,IAAK,KAAM,CACrB,EACAP,EAAyB,kBAAkBO,CAAW,EAGtDJ,EAAa,KAAK,CAChB,UAAWL,EAAc,eACzB,UAAW,MACb,CAAC,EACD,MAAM,QAAQ,QAAQ,EAGtBN,EAAOQ,CAAwB,EAAE,iBAAiB,EAClDR,EAAOY,EAA2B,QAAQ,EAAE,qBAAqB,CAC/D,UAAWN,EAAc,kBACzB,UAAWS,CACb,CAAC,CACH,CAAC,EAEDd,EAAG,wDAAyD,SAAY,CAEtEa,EAAa,YAAY,EACzBN,EAAyB,UAAU,EAGnCG,EAAa,KAAK,CAChB,UAAWL,EAAc,eACzB,UAAW,MACb,CAAC,EACD,MAAM,QAAQ,QAAQ,EAGtBN,EAAOQ,CAAwB,EAAE,IAAI,iBAAiB,CACxD,CAAC,CACH,CAAC",
6
+ "names": ["Subject", "afterEach", "beforeEach", "describe", "expect", "it", "vi", "DeviceModelId", "GetAppAndVersionCommand", "DEVICE_SESSION_REFRESHER_POLLING_INTERVAL", "SessionEvents", "DevicePinger", "dummySendCommandFunction", "mockLogger", "mockedLoggerModuleFactory", "eventSubject", "mockSessionEventDispatcher", "dummyConnectedDevice", "devicePinger", "dummyResult", "result", "commandArg", "dummyError", "neverResolvingPromise", "pingPromise"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{Left as c}from"purify-ts";import{BehaviorSubject as a}from"rxjs";import{v4 as d}from"uuid";import{CommandUtils as p}from"../../../api/command/utils/CommandUtils";import{DeviceStatus as s}from"../../../api/device/DeviceStatus";import{DeviceSessionStateType as v}from"../../../api/device-session/DeviceSessionState";import{DeviceBusyError as u}from"../../../api/Error";import{DEVICE_SESSION_REFRESH_INTERVAL as S}from"../../device-session/data/DeviceSessionRefresherConst";import{DeviceSessionRefresher as D}from"./DeviceSessionRefresher";class R{_id;_connectedDevice;_deviceState;_refresher;_managerApiService;constructor({connectedDevice:e,id:t=d()},r,i){this._id=t,this._connectedDevice=e,this._deviceState=new a({sessionStateType:v.Connected,deviceStatus:s.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._refresher=new D({refreshInterval:S,deviceStatus:s.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id,sendApduFn:o=>this.sendApdu(o,{isPolling:!0,triggersDisconnection:!1}),updateStateFn:o=>{const n=this._deviceState.getValue();this.setDeviceSessionState(o(n))}},r("device-session-refresher")),this._managerApiService=i}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}setDeviceSessionState(e){this._deviceState.next(e)}updateDeviceStatus(e){const t=this._deviceState.getValue();this._refresher.setDeviceStatus(e),this._deviceState.next({...t,deviceStatus:e})}async sendApdu(e,t={isPolling:!1,triggersDisconnection:!1}){return this._deviceState.getValue().deviceStatus===s.BUSY?c(new u):(t.isPolling||this.updateDeviceStatus(s.BUSY),(await this._connectedDevice.sendApdu(e,t.triggersDisconnection)).ifRight(o=>{p.isLockedDeviceResponse(o)?this.updateDeviceStatus(s.LOCKED):this.updateDeviceStatus(s.CONNECTED)}).ifLeft(()=>{this.updateDeviceStatus(s.CONNECTED)}))}async sendCommand(e){const t=e.getApdu();return(await this.sendApdu(t.getRawApdu(),{isPolling:!1,triggersDisconnection:e.triggersDisconnection??!1})).caseOf({Left:i=>{throw i},Right:i=>e.parseResponse(i,this._connectedDevice.deviceModel.id)})}executeDeviceAction(e){const{observable:t,cancel:r}=e._execute({sendCommand:async i=>this.sendCommand(i),getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:i=>(this.setDeviceSessionState(i),this._deviceState.getValue()),getManagerApiService:()=>this._managerApiService});return{observable:t,cancel:r}}close(){this.updateDeviceStatus(s.NOT_CONNECTED),this._deviceState.complete(),this._refresher.stop()}toggleRefresher(e){e?this._refresher.start():this._refresher.stop()}}export{R as DeviceSession};
1
+ import{BehaviorSubject as d}from"rxjs";import{v4 as h}from"uuid";import{CommandUtils as S}from"../../../api/command/utils/CommandUtils";import{DeviceStatus as v}from"../../../api/device/DeviceStatus";import{DeviceSessionStateType as u}from"../../../api/device-session/DeviceSessionState";import{bufferToHexaString as a}from"../../../api/index";import{DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS as m}from"../../device-session/data/DeviceSessionRefresherConst";import{MutexService as l}from"../../device-session/service/MutexService";import{RefresherService as D}from"../../device-session/service/RefresherService";import{DevicePinger as _}from"./DevicePinger";import{DeviceSessionEventDispatcher as g,SessionEvents as o}from"./DeviceSessionEventDispatcher";import{DeviceSessionRefresher as f}from"./DeviceSessionRefresher";import{DeviceSessionStateHandler as E}from"./DeviceSessionStateHandler";class L{_id;_connectedDevice;_deviceState;_managerApiService;_secureChannelService;_logger;_refresherOptions;_pinger;_deviceSessionRefresher;_refresherService;_commandMutex=new l;_sessionEventDispatcher=new g;constructor({connectedDevice:e,id:r=h()},s,t,i,n){this._id=r,this._connectedDevice=e,this._logger=s("device-session"),this._managerApiService=t,this._secureChannelService=i,this._refresherOptions={...m,...n},this._deviceState=new d({sessionStateType:u.Connected,deviceStatus:v.CONNECTED,deviceModelId:this._connectedDevice.deviceModel.id}),this._pinger=new _(s,e,this._sessionEventDispatcher,(c,p)=>this.sendCommand(c,p)),this._deviceSessionRefresher=new f(s,this._refresherOptions,this._sessionEventDispatcher,this._connectedDevice),new E(s,this._sessionEventDispatcher,this._connectedDevice,this._deviceState,c=>this.setDeviceSessionState(c)),this._refresherService=new D(s,{start:()=>this._deviceSessionRefresher.restartRefresher(),stop:()=>this._deviceSessionRefresher.stopRefresher()})}async initialiseSession(){try{await this._pinger.ping()}catch(e){throw this._logger.error("Error while initialising session",{data:{error:e}}),e}finally{this._refresherOptions.isRefresherDisabled||this._deviceSessionRefresher.startRefresher()}}get id(){return this._id}get connectedDevice(){return this._connectedDevice}get state(){return this._deviceState.asObservable()}getDeviceSessionState(){return this._deviceState.getValue()}setDeviceSessionState(e){this._deviceState.next(e)}async sendApdu(e,r={isPolling:!1,triggersDisconnection:!1,abortTimeout:void 0}){const s=await this._commandMutex.lock();try{this._sessionEventDispatcher.dispatch({eventName:o.DEVICE_STATE_UPDATE_BUSY}),this._logger.debug(`[exchange] => ${a(e,!1)}`);const t=await this._connectedDevice.sendApdu(e,r.triggersDisconnection,r.abortTimeout);return t.ifRight(i=>{this._logger.debug(`[exchange] <= ${a(i.data,!1)}${a(i.statusCode,!1)}`),S.isLockedDeviceResponse(i)?this._sessionEventDispatcher.dispatch({eventName:o.DEVICE_STATE_UPDATE_LOCKED}):this._sessionEventDispatcher.dispatch({eventName:o.DEVICE_STATE_UPDATE_CONNECTED})}).ifLeft(()=>{this._sessionEventDispatcher.dispatch({eventName:o.DEVICE_STATE_UPDATE_CONNECTED})}),t}finally{s()}}async sendCommand(e,r){this._logger.debug(`[sendCommand] ${e.name}`);const s=e.getApdu();return(await this.sendApdu(s.getRawApdu(),{isPolling:!1,triggersDisconnection:e.triggersDisconnection??!1,abortTimeout:r})).caseOf({Left:i=>{throw this._logger.error("[sendCommand] error",{data:{err:i}}),i},Right:i=>{const n=e.parseResponse(i,this._connectedDevice.deviceModel.id);return this._logger.debug("[sendCommand] result",{data:{result:n}}),n}})}executeDeviceAction(e){const{observable:r,cancel:s}=e._execute({sendApdu:async t=>this.sendApdu(t),sendCommand:async(t,i)=>this.sendCommand(t,i),getDeviceModel:()=>this._connectedDevice.deviceModel,getDeviceSessionState:()=>this._deviceState.getValue(),getDeviceSessionStateObservable:()=>this.state,setDeviceSessionState:t=>(this.setDeviceSessionState(t),this._deviceState.getValue()),disableRefresher:t=>this._refresherService.disableRefresher(t),getManagerApiService:()=>this._managerApiService,getSecureChannelService:()=>this._secureChannelService});return{observable:r,cancel:s}}close(){this._updateDeviceStatus(v.NOT_CONNECTED),this._deviceState.complete(),this._deviceSessionRefresher.stopRefresher()}disableRefresher(e){return this._refresherService.disableRefresher(e)}_updateDeviceStatus(e){const r=this._deviceState.getValue();this._deviceState.next({...r,deviceStatus:e})}}export{L as DeviceSession};
2
2
  //# sourceMappingURL=DeviceSession.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSession.ts"],
4
- "sourcesContent": ["import { type Either, Left } from \"purify-ts\";\nimport { BehaviorSubject } from \"rxjs\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nimport { type Command } from \"@api/command/Command\";\nimport { type CommandResult } from \"@api/command/model/CommandResult\";\nimport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nimport { type ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { type DeviceSessionId } from \"@api/device-session/types\";\nimport { DeviceBusyError, type DmkError } from \"@api/Error\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DEVICE_SESSION_REFRESH_INTERVAL } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\n\nimport { DeviceSessionRefresher } from \"./DeviceSessionRefresher\";\n\nexport type SessionConstructorArgs = {\n connectedDevice: TransportConnectedDevice;\n id?: DeviceSessionId;\n};\n\n/**\n * Represents a session with a device.\n */\nexport class DeviceSession {\n private readonly _id: DeviceSessionId;\n private readonly _connectedDevice: TransportConnectedDevice;\n private readonly _deviceState: BehaviorSubject<DeviceSessionState>;\n private readonly _refresher: DeviceSessionRefresher;\n private readonly _managerApiService: ManagerApiService;\n\n constructor(\n { connectedDevice, id = uuidv4() }: SessionConstructorArgs,\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n managerApiService: ManagerApiService,\n ) {\n this._id = id;\n this._connectedDevice = connectedDevice;\n this._deviceState = new BehaviorSubject<DeviceSessionState>({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n });\n this._refresher = new DeviceSessionRefresher(\n {\n refreshInterval: DEVICE_SESSION_REFRESH_INTERVAL,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n sendApduFn: (rawApdu: Uint8Array) =>\n this.sendApdu(rawApdu, {\n isPolling: true,\n triggersDisconnection: false,\n }),\n updateStateFn: (callback) => {\n const state = this._deviceState.getValue();\n this.setDeviceSessionState(callback(state));\n },\n },\n loggerModuleFactory(\"device-session-refresher\"),\n );\n this._managerApiService = managerApiService;\n }\n\n public get id() {\n return this._id;\n }\n\n public get connectedDevice() {\n return this._connectedDevice;\n }\n\n public get state() {\n return this._deviceState.asObservable();\n }\n\n public setDeviceSessionState(state: DeviceSessionState) {\n this._deviceState.next(state);\n }\n\n private updateDeviceStatus(deviceStatus: DeviceStatus) {\n const sessionState = this._deviceState.getValue();\n this._refresher.setDeviceStatus(deviceStatus);\n this._deviceState.next({\n ...sessionState,\n deviceStatus,\n });\n }\n\n async sendApdu(\n rawApdu: Uint8Array,\n options: {\n isPolling: boolean;\n triggersDisconnection: boolean;\n } = {\n isPolling: false,\n triggersDisconnection: false,\n },\n ): Promise<Either<DmkError, ApduResponse>> {\n const sessionState = this._deviceState.getValue();\n if (sessionState.deviceStatus === DeviceStatus.BUSY) {\n return Left(new DeviceBusyError());\n }\n\n if (!options.isPolling) this.updateDeviceStatus(DeviceStatus.BUSY);\n\n const errorOrResponse = await this._connectedDevice.sendApdu(\n rawApdu,\n options.triggersDisconnection,\n );\n\n return errorOrResponse\n .ifRight((response: ApduResponse) => {\n if (CommandUtils.isLockedDeviceResponse(response)) {\n this.updateDeviceStatus(DeviceStatus.LOCKED);\n } else {\n this.updateDeviceStatus(DeviceStatus.CONNECTED);\n }\n })\n .ifLeft(() => {\n this.updateDeviceStatus(DeviceStatus.CONNECTED);\n });\n }\n\n async sendCommand<Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n ): Promise<CommandResult<Response, ErrorStatusCodes>> {\n const apdu = command.getApdu();\n const response = await this.sendApdu(apdu.getRawApdu(), {\n isPolling: false,\n triggersDisconnection: command.triggersDisconnection ?? false,\n });\n\n return response.caseOf({\n Left: (err) => {\n throw err;\n },\n Right: (r) =>\n command.parseResponse(r, this._connectedDevice.deviceModel.id),\n });\n }\n\n executeDeviceAction<\n Output,\n Input,\n Error extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n >(\n deviceAction: DeviceAction<Output, Input, Error, IntermediateValue>,\n ): ExecuteDeviceActionReturnType<Output, Error, IntermediateValue> {\n const { observable, cancel } = deviceAction._execute({\n sendCommand: async <Response, ErrorStatusCodes, Args>(\n command: Command<Response, ErrorStatusCodes, Args>,\n ) => this.sendCommand(command),\n getDeviceSessionState: () => this._deviceState.getValue(),\n getDeviceSessionStateObservable: () => this.state,\n setDeviceSessionState: (state: DeviceSessionState) => {\n this.setDeviceSessionState(state);\n return this._deviceState.getValue();\n },\n getManagerApiService: () => this._managerApiService,\n });\n\n return {\n observable,\n cancel,\n };\n }\n\n close() {\n this.updateDeviceStatus(DeviceStatus.NOT_CONNECTED);\n this._deviceState.complete();\n this._refresher.stop();\n }\n\n toggleRefresher(enabled: boolean) {\n if (enabled) {\n this._refresher.start();\n } else {\n this._refresher.stop();\n }\n }\n}\n"],
5
- "mappings": "AAAA,OAAsB,QAAAA,MAAY,YAClC,OAAS,mBAAAC,MAAuB,OAChC,OAAS,MAAMC,MAAc,OAI7B,OAAS,gBAAAC,MAAoB,kCAC7B,OAAS,gBAAAC,MAAoB,2BAO7B,OAEE,0BAAAC,MACK,yCAEP,OAAS,mBAAAC,MAAsC,aAG/C,OAAS,mCAAAC,MAAuC,4DAGhD,OAAS,0BAAAC,MAA8B,2BAUhC,MAAMC,CAAc,CACR,IACA,iBACA,aACA,WACA,mBAEjB,YACE,CAAE,gBAAAC,EAAiB,GAAAC,EAAKT,EAAO,CAAE,EACjCU,EACAC,EACA,CACA,KAAK,IAAMF,EACX,KAAK,iBAAmBD,EACxB,KAAK,aAAe,IAAIT,EAAoC,CAC1D,iBAAkBI,EAAuB,UACzC,aAAcD,EAAa,UAC3B,cAAe,KAAK,iBAAiB,YAAY,EACnD,CAAC,EACD,KAAK,WAAa,IAAII,EACpB,CACE,gBAAiBD,EACjB,aAAcH,EAAa,UAC3B,cAAe,KAAK,iBAAiB,YAAY,GACjD,WAAaU,GACX,KAAK,SAASA,EAAS,CACrB,UAAW,GACX,sBAAuB,EACzB,CAAC,EACH,cAAgBC,GAAa,CAC3B,MAAMC,EAAQ,KAAK,aAAa,SAAS,EACzC,KAAK,sBAAsBD,EAASC,CAAK,CAAC,CAC5C,CACF,EACAJ,EAAoB,0BAA0B,CAChD,EACA,KAAK,mBAAqBC,CAC5B,CAEA,IAAW,IAAK,CACd,OAAO,KAAK,GACd,CAEA,IAAW,iBAAkB,CAC3B,OAAO,KAAK,gBACd,CAEA,IAAW,OAAQ,CACjB,OAAO,KAAK,aAAa,aAAa,CACxC,CAEO,sBAAsBG,EAA2B,CACtD,KAAK,aAAa,KAAKA,CAAK,CAC9B,CAEQ,mBAAmBC,EAA4B,CACrD,MAAMC,EAAe,KAAK,aAAa,SAAS,EAChD,KAAK,WAAW,gBAAgBD,CAAY,EAC5C,KAAK,aAAa,KAAK,CACrB,GAAGC,EACH,aAAAD,CACF,CAAC,CACH,CAEA,MAAM,SACJH,EACAK,EAGI,CACF,UAAW,GACX,sBAAuB,EACzB,EACyC,CAEzC,OADqB,KAAK,aAAa,SAAS,EAC/B,eAAiBf,EAAa,KACtCJ,EAAK,IAAIM,CAAiB,GAG9Ba,EAAQ,WAAW,KAAK,mBAAmBf,EAAa,IAAI,GAEzC,MAAM,KAAK,iBAAiB,SAClDU,EACAK,EAAQ,qBACV,GAGG,QAASC,GAA2B,CAC/BjB,EAAa,uBAAuBiB,CAAQ,EAC9C,KAAK,mBAAmBhB,EAAa,MAAM,EAE3C,KAAK,mBAAmBA,EAAa,SAAS,CAElD,CAAC,EACA,OAAO,IAAM,CACZ,KAAK,mBAAmBA,EAAa,SAAS,CAChD,CAAC,EACL,CAEA,MAAM,YACJiB,EACoD,CACpD,MAAMC,EAAOD,EAAQ,QAAQ,EAM7B,OALiB,MAAM,KAAK,SAASC,EAAK,WAAW,EAAG,CACtD,UAAW,GACX,sBAAuBD,EAAQ,uBAAyB,EAC1D,CAAC,GAEe,OAAO,CACrB,KAAOE,GAAQ,CACb,MAAMA,CACR,EACA,MAAQC,GACNH,EAAQ,cAAcG,EAAG,KAAK,iBAAiB,YAAY,EAAE,CACjE,CAAC,CACH,CAEA,oBAMEC,EACiE,CACjE,KAAM,CAAE,WAAAC,EAAY,OAAAC,CAAO,EAAIF,EAAa,SAAS,CACnD,YAAa,MACXJ,GACG,KAAK,YAAYA,CAAO,EAC7B,sBAAuB,IAAM,KAAK,aAAa,SAAS,EACxD,gCAAiC,IAAM,KAAK,MAC5C,sBAAwBL,IACtB,KAAK,sBAAsBA,CAAK,EACzB,KAAK,aAAa,SAAS,GAEpC,qBAAsB,IAAM,KAAK,kBACnC,CAAC,EAED,MAAO,CACL,WAAAU,EACA,OAAAC,CACF,CACF,CAEA,OAAQ,CACN,KAAK,mBAAmBvB,EAAa,aAAa,EAClD,KAAK,aAAa,SAAS,EAC3B,KAAK,WAAW,KAAK,CACvB,CAEA,gBAAgBwB,EAAkB,CAC5BA,EACF,KAAK,WAAW,MAAM,EAEtB,KAAK,WAAW,KAAK,CAEzB,CACF",
6
- "names": ["Left", "BehaviorSubject", "uuidv4", "CommandUtils", "DeviceStatus", "DeviceSessionStateType", "DeviceBusyError", "DEVICE_SESSION_REFRESH_INTERVAL", "DeviceSessionRefresher", "DeviceSession", "connectedDevice", "id", "loggerModuleFactory", "managerApiService", "rawApdu", "callback", "state", "deviceStatus", "sessionState", "options", "response", "command", "apdu", "err", "r", "deviceAction", "observable", "cancel", "enabled"]
4
+ "sourcesContent": ["import { type Either } from \"purify-ts\";\nimport { BehaviorSubject, type Observable } from \"rxjs\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nimport { type Command } from \"@api/command/Command\";\nimport { type CommandResult } from \"@api/command/model/CommandResult\";\nimport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport {\n type DeviceAction,\n type DeviceActionIntermediateValue,\n type ExecuteDeviceActionReturnType,\n} from \"@api/device-action/DeviceAction\";\nimport { type ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { type DeviceSessionId } from \"@api/device-session/types\";\nimport { type DmkError } from \"@api/Error\";\nimport { bufferToHexaString } from \"@api/index\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { MutexService } from \"@internal/device-session/service/MutexService\";\nimport { RefresherService } from \"@internal/device-session/service/RefresherService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { DevicePinger } from \"./DevicePinger\";\nimport {\n DeviceSessionEventDispatcher,\n SessionEvents,\n} from \"./DeviceSessionEventDispatcher\";\nimport { DeviceSessionRefresher } from \"./DeviceSessionRefresher\";\nimport { DeviceSessionStateHandler } from \"./DeviceSessionStateHandler\";\n\nexport type SessionConstructorArgs = {\n connectedDevice: TransportConnectedDevice;\n id?: DeviceSessionId;\n};\n\nexport type DeviceSessionRefresherOptions = {\n isRefresherDisabled: boolean;\n pollingInterval?: number;\n};\n\ntype SendApduOptions = {\n isPolling?: boolean;\n triggersDisconnection?: boolean;\n abortTimeout?: number;\n};\n\n/**\n * Represents a session with a device.\n */\nexport class DeviceSession {\n private readonly _id: DeviceSessionId;\n private readonly _connectedDevice: TransportConnectedDevice;\n private readonly _deviceState: BehaviorSubject<DeviceSessionState>;\n private readonly _managerApiService: ManagerApiService;\n private readonly _secureChannelService: SecureChannelService;\n private readonly _logger: LoggerPublisherService;\n private readonly _refresherOptions: DeviceSessionRefresherOptions;\n private _pinger: DevicePinger;\n private _deviceSessionRefresher: DeviceSessionRefresher;\n private readonly _refresherService: RefresherService;\n private _commandMutex = new MutexService();\n private _sessionEventDispatcher = new DeviceSessionEventDispatcher();\n\n constructor(\n { connectedDevice, id = uuidv4() }: SessionConstructorArgs,\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n managerApiService: ManagerApiService,\n secureChannelService: SecureChannelService,\n deviceSessionRefresherOptions: DeviceSessionRefresherOptions | undefined,\n ) {\n this._id = id;\n this._connectedDevice = connectedDevice;\n this._logger = loggerModuleFactory(\"device-session\");\n this._managerApiService = managerApiService;\n this._secureChannelService = secureChannelService;\n this._refresherOptions = {\n ...DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n ...deviceSessionRefresherOptions,\n };\n this._deviceState = new BehaviorSubject<DeviceSessionState>({\n sessionStateType: DeviceSessionStateType.Connected,\n deviceStatus: DeviceStatus.CONNECTED,\n deviceModelId: this._connectedDevice.deviceModel.id,\n });\n\n this._pinger = new DevicePinger(\n loggerModuleFactory,\n connectedDevice,\n this._sessionEventDispatcher,\n (command, abortTimeout) => this.sendCommand(command, abortTimeout),\n );\n this._deviceSessionRefresher = new DeviceSessionRefresher(\n loggerModuleFactory,\n this._refresherOptions,\n this._sessionEventDispatcher,\n this._connectedDevice,\n );\n new DeviceSessionStateHandler(\n loggerModuleFactory,\n this._sessionEventDispatcher,\n this._connectedDevice,\n this._deviceState,\n (state) => this.setDeviceSessionState(state),\n );\n\n this._refresherService = new RefresherService(loggerModuleFactory, {\n start: () => this._deviceSessionRefresher.restartRefresher(),\n stop: () => this._deviceSessionRefresher.stopRefresher(),\n });\n }\n\n public async initialiseSession(): Promise<void> {\n try {\n await this._pinger.ping();\n } catch (error) {\n this._logger.error(\"Error while initialising session\", {\n data: { error },\n });\n throw error;\n } finally {\n if (!this._refresherOptions.isRefresherDisabled) {\n this._deviceSessionRefresher.startRefresher();\n }\n }\n }\n\n public get id(): DeviceSessionId {\n return this._id;\n }\n\n public get connectedDevice(): TransportConnectedDevice {\n return this._connectedDevice;\n }\n\n public get state(): Observable<DeviceSessionState> {\n return this._deviceState.asObservable();\n }\n\n public getDeviceSessionState(): DeviceSessionState {\n return this._deviceState.getValue();\n }\n\n public setDeviceSessionState(state: DeviceSessionState): void {\n this._deviceState.next(state);\n }\n\n public async sendApdu(\n rawApdu: Uint8Array,\n options: SendApduOptions = {\n isPolling: false,\n triggersDisconnection: false,\n abortTimeout: undefined,\n },\n ): Promise<Either<DmkError, ApduResponse>> {\n const release = await this._commandMutex.lock();\n\n try {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_BUSY,\n });\n\n this._logger.debug(`[exchange] => ${bufferToHexaString(rawApdu, false)}`);\n const result = await this._connectedDevice.sendApdu(\n rawApdu,\n options.triggersDisconnection,\n options.abortTimeout,\n );\n\n result\n .ifRight((response: ApduResponse) => {\n this._logger.debug(\n `[exchange] <= ${bufferToHexaString(response.data, false)}${bufferToHexaString(response.statusCode, false)}`,\n );\n if (CommandUtils.isLockedDeviceResponse(response)) {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_LOCKED,\n });\n } else {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n }\n })\n .ifLeft(() => {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n });\n });\n return result;\n } finally {\n release();\n }\n }\n\n public async sendCommand<Response, Args, ErrorStatusCodes>(\n command: Command<Response, Args, ErrorStatusCodes>,\n abortTimeout?: number,\n ): Promise<CommandResult<Response, ErrorStatusCodes>> {\n this._logger.debug(`[sendCommand] ${command.name}`);\n const apdu = command.getApdu();\n\n const response = await this.sendApdu(apdu.getRawApdu(), {\n isPolling: false,\n triggersDisconnection: command.triggersDisconnection ?? false,\n abortTimeout,\n });\n\n return response.caseOf({\n Left: (err) => {\n this._logger.error(\"[sendCommand] error\", { data: { err } });\n throw err;\n },\n Right: (r) => {\n const result = command.parseResponse(\n r,\n this._connectedDevice.deviceModel.id,\n );\n this._logger.debug(\"[sendCommand] result\", { data: { result } });\n return result;\n },\n });\n }\n\n public executeDeviceAction<\n Output,\n Input,\n E extends DmkError,\n IntermediateValue extends DeviceActionIntermediateValue,\n >(\n deviceAction: DeviceAction<Output, Input, E, IntermediateValue>,\n ): ExecuteDeviceActionReturnType<Output, E, IntermediateValue> {\n const { observable, cancel } = deviceAction._execute({\n sendApdu: async (apdu: Uint8Array) => this.sendApdu(apdu),\n sendCommand: async <Response, ErrorStatusCodes, Args>(\n command: Command<Response, ErrorStatusCodes, Args>,\n abortTimeout?: number,\n ) => this.sendCommand(command, abortTimeout),\n getDeviceModel: () => this._connectedDevice.deviceModel,\n getDeviceSessionState: () => this._deviceState.getValue(),\n getDeviceSessionStateObservable: () => this.state,\n setDeviceSessionState: (state: DeviceSessionState) => {\n this.setDeviceSessionState(state);\n return this._deviceState.getValue();\n },\n disableRefresher: (blockerId: string) =>\n this._refresherService.disableRefresher(blockerId),\n getManagerApiService: () => this._managerApiService,\n getSecureChannelService: () => this._secureChannelService,\n });\n return { observable, cancel };\n }\n\n public close(): void {\n this._updateDeviceStatus(DeviceStatus.NOT_CONNECTED);\n this._deviceState.complete();\n this._deviceSessionRefresher.stopRefresher();\n }\n\n public disableRefresher(id: string): () => void {\n return this._refresherService.disableRefresher(id);\n }\n\n private _updateDeviceStatus(deviceStatus: DeviceStatus): void {\n const state = this._deviceState.getValue();\n this._deviceState.next({ ...state, deviceStatus });\n }\n}\n"],
5
+ "mappings": "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",
6
+ "names": ["BehaviorSubject", "uuidv4", "CommandUtils", "DeviceStatus", "DeviceSessionStateType", "bufferToHexaString", "DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS", "MutexService", "RefresherService", "DevicePinger", "DeviceSessionEventDispatcher", "SessionEvents", "DeviceSessionRefresher", "DeviceSessionStateHandler", "DeviceSession", "connectedDevice", "id", "loggerModuleFactory", "managerApiService", "secureChannelService", "deviceSessionRefresherOptions", "command", "abortTimeout", "state", "error", "rawApdu", "options", "release", "result", "response", "apdu", "err", "r", "deviceAction", "observable", "cancel", "blockerId", "deviceStatus"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{connectedDeviceStubBuilder as o}from"../../../api/transport/model/TransportConnectedDevice.stub";import{DeviceSession as t}from"../../device-session/model/DeviceSession";const c=(e={},r,i)=>new t({connectedDevice:o(),id:"fakeSessionId",...e},r,i);export{c as deviceSessionStubBuilder};
1
+ import{connectedDeviceStubBuilder as s}from"../../../api/transport/model/TransportConnectedDevice.stub";import{DeviceSession as t}from"../../device-session/model/DeviceSession";const p=(e={},r,i,o,n)=>new t({connectedDevice:s(),id:"fakeSessionId",...e},r,i,o,n);export{p as deviceSessionStubBuilder};
2
2
  //# sourceMappingURL=DeviceSession.stub.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSession.stub.ts"],
4
- "sourcesContent": ["import { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nimport {\n DeviceSession,\n type SessionConstructorArgs,\n} from \"@internal/device-session/model/DeviceSession\";\nimport type { ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\n\nexport const deviceSessionStubBuilder = (\n props: Partial<SessionConstructorArgs> = {},\n loggerFactory: (tag: string) => LoggerPublisherService,\n managerApi: ManagerApiService,\n) =>\n new DeviceSession(\n {\n connectedDevice: connectedDeviceStubBuilder(),\n id: \"fakeSessionId\",\n ...props,\n },\n loggerFactory,\n managerApi,\n );\n"],
5
- "mappings": "AACA,OAAS,8BAAAA,MAAkC,qDAC3C,OACE,iBAAAC,MAEK,+CAGA,MAAMC,EAA2B,CACtCC,EAAyC,CAAC,EAC1CC,EACAC,IAEA,IAAIJ,EACF,CACE,gBAAiBD,EAA2B,EAC5C,GAAI,gBACJ,GAAGG,CACL,EACAC,EACAC,CACF",
6
- "names": ["connectedDeviceStubBuilder", "DeviceSession", "deviceSessionStubBuilder", "props", "loggerFactory", "managerApi"]
4
+ "sourcesContent": ["import { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nimport {\n DeviceSession,\n type DeviceSessionRefresherOptions,\n type SessionConstructorArgs,\n} from \"@internal/device-session/model/DeviceSession\";\nimport type { ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nexport const deviceSessionStubBuilder = (\n props: Partial<SessionConstructorArgs> = {},\n loggerFactory: (tag: string) => LoggerPublisherService,\n managerApi: ManagerApiService,\n secureChannel: SecureChannelService,\n deviceSessionRefresherOptions: DeviceSessionRefresherOptions,\n) =>\n new DeviceSession(\n {\n connectedDevice: connectedDeviceStubBuilder(),\n id: \"fakeSessionId\",\n ...props,\n },\n loggerFactory,\n managerApi,\n secureChannel,\n deviceSessionRefresherOptions,\n );\n"],
5
+ "mappings": "AACA,OAAS,8BAAAA,MAAkC,qDAC3C,OACE,iBAAAC,MAGK,+CAIA,MAAMC,EAA2B,CACtCC,EAAyC,CAAC,EAC1CC,EACAC,EACAC,EACAC,IAEA,IAAIN,EACF,CACE,gBAAiBD,EAA2B,EAC5C,GAAI,gBACJ,GAAGG,CACL,EACAC,EACAC,EACAC,EACAC,CACF",
6
+ "names": ["connectedDeviceStubBuilder", "DeviceSession", "deviceSessionStubBuilder", "props", "loggerFactory", "managerApi", "secureChannel", "deviceSessionRefresherOptions"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{Subject as n}from"rxjs";var t=(e=>(e.NEW_STATE="NEW_STATE",e.REFRESH_NEEDED="REFRESH_NEEDED",e.COMMAND_SUCCEEDED="COMMAND_SUCCEEDED",e.DEVICE_STATE_UPDATE_BUSY="DEVICE_STATE_UPDATE_BUSY",e.DEVICE_STATE_UPDATE_LOCKED="DEVICE_STATE_UPDATE_LOCKED",e.DEVICE_STATE_UPDATE_CONNECTED="DEVICE_STATE_UPDATE_CONNECTED",e))(t||{});class s{_eventEmitter=new n;listen(){return this._eventEmitter.asObservable()}dispatch(E){this._eventEmitter.next(E)}}export{s as DeviceSessionEventDispatcher,t as SessionEvents};
2
+ //# sourceMappingURL=DeviceSessionEventDispatcher.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DeviceSessionEventDispatcher.ts"],
4
+ "sourcesContent": ["import { type Observable, Subject } from \"rxjs\";\n\nimport { type GetAppAndVersionResponse } from \"@api/index\";\nimport { type CommandResult } from \"@api/types\";\n\nexport enum SessionEvents {\n NEW_STATE = \"NEW_STATE\",\n REFRESH_NEEDED = \"REFRESH_NEEDED\",\n COMMAND_SUCCEEDED = \"COMMAND_SUCCEEDED\",\n DEVICE_STATE_UPDATE_BUSY = \"DEVICE_STATE_UPDATE_BUSY\",\n DEVICE_STATE_UPDATE_LOCKED = \"DEVICE_STATE_UPDATE_LOCKED\",\n DEVICE_STATE_UPDATE_CONNECTED = \"DEVICE_STATE_UPDATE_CONNECTED\",\n}\n\ninterface SessionEventPayloads {\n [SessionEvents.NEW_STATE]: undefined;\n [SessionEvents.REFRESH_NEEDED]: undefined;\n [SessionEvents.DEVICE_STATE_UPDATE_BUSY]: undefined;\n [SessionEvents.DEVICE_STATE_UPDATE_LOCKED]: undefined;\n [SessionEvents.DEVICE_STATE_UPDATE_CONNECTED]: undefined;\n [SessionEvents.COMMAND_SUCCEEDED]: CommandResult<GetAppAndVersionResponse>;\n}\n\nexport type NewEvent = {\n [K in SessionEvents]: SessionEventPayloads[K] extends undefined\n ? { eventName: K; eventData?: undefined }\n : { eventName: K; eventData: SessionEventPayloads[K] };\n}[SessionEvents];\n\nexport class DeviceSessionEventDispatcher {\n private _eventEmitter: Subject<NewEvent> = new Subject();\n\n public listen(): Observable<NewEvent> {\n return this._eventEmitter.asObservable();\n }\n\n public dispatch(event: NewEvent): void {\n this._eventEmitter.next(event);\n }\n}\n"],
5
+ "mappings": "AAAA,OAA0B,WAAAA,MAAe,OAKlC,IAAKC,OACVA,EAAA,UAAY,YACZA,EAAA,eAAiB,iBACjBA,EAAA,kBAAoB,oBACpBA,EAAA,yBAA2B,2BAC3BA,EAAA,2BAA6B,6BAC7BA,EAAA,8BAAgC,gCANtBA,OAAA,IAwBL,MAAMC,CAA6B,CAChC,cAAmC,IAAIF,EAExC,QAA+B,CACpC,OAAO,KAAK,cAAc,aAAa,CACzC,CAEO,SAASG,EAAuB,CACrC,KAAK,cAAc,KAAKA,CAAK,CAC/B,CACF",
6
+ "names": ["Subject", "SessionEvents", "DeviceSessionEventDispatcher", "event"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{describe as u,expect as E,it as d}from"vitest";import{DeviceSessionEventDispatcher as p,SessionEvents as c}from"./DeviceSessionEventDispatcher";u("DeviceSessionEventDispatcher",()=>{let s;beforeEach(()=>{s=new p}),d("should dispatch and receive an event without payload",()=>new Promise((i,a)=>{const e={eventName:c.REFRESH_NEEDED,eventData:void 0},t=s.listen().subscribe(o=>{try{E(o).toEqual(e),i(void 0)}catch(n){a(n)}finally{t.unsubscribe()}});s.dispatch(e)})),d("should dispatch and receive a COMMAND_SUCCEEDED event with payload",()=>new Promise((i,a)=>{const e={status:"success",data:{someField:"dummyValue"}},t={eventName:c.COMMAND_SUCCEEDED,eventData:e},o=s.listen().subscribe(n=>{if(n.eventName===c.COMMAND_SUCCEEDED)try{E(n).toEqual(t),i(void 0)}catch(r){a(r)}finally{o.unsubscribe()}});s.dispatch(t)})),d("should dispatch multiple events",()=>new Promise((i,a)=>{const e=[{eventName:c.DEVICE_STATE_UPDATE_BUSY,eventData:void 0},{eventName:c.DEVICE_STATE_UPDATE_CONNECTED,eventData:void 0}],t=[],o=s.listen().subscribe(n=>{if(t.push(n),t.length===e.length)try{E(t).toEqual(e),i(void 0)}catch(r){a(r)}finally{o.unsubscribe()}});e.forEach(n=>s.dispatch(n))}))});
2
+ //# sourceMappingURL=DeviceSessionEventDispatcher.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/device-session/model/DeviceSessionEventDispatcher.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from \"vitest\";\n\nimport { type GetAppAndVersionResponse } from \"@api/index\";\nimport type { CommandResult } from \"@api/types\";\n\nimport {\n DeviceSessionEventDispatcher,\n type NewEvent,\n SessionEvents,\n} from \"./DeviceSessionEventDispatcher\";\n\ndescribe(\"DeviceSessionEventDispatcher\", () => {\n let dispatcher: DeviceSessionEventDispatcher;\n\n beforeEach(() => {\n dispatcher = new DeviceSessionEventDispatcher();\n });\n\n it(\"should dispatch and receive an event without payload\", () =>\n new Promise((resolve, reject) => {\n // given\n const expectedEvent: NewEvent = {\n eventName: SessionEvents.REFRESH_NEEDED,\n eventData: undefined,\n };\n\n // when\n const subscription = dispatcher.listen().subscribe((event) => {\n // then\n try {\n expect(event).toEqual(expectedEvent);\n resolve(undefined);\n } catch (error) {\n reject(error);\n } finally {\n subscription.unsubscribe();\n }\n });\n\n dispatcher.dispatch(expectedEvent);\n }));\n\n it(\"should dispatch and receive a COMMAND_SUCCEEDED event with payload\", () =>\n new Promise((resolve, reject) => {\n // given\n const dummyCommandResult = {\n status: \"success\",\n data: { someField: \"dummyValue\" },\n } as unknown as CommandResult<GetAppAndVersionResponse>;\n\n const expectedEvent: NewEvent = {\n eventName: SessionEvents.COMMAND_SUCCEEDED,\n eventData: dummyCommandResult,\n };\n\n // when\n const subscription = dispatcher.listen().subscribe((event) => {\n if (event.eventName === SessionEvents.COMMAND_SUCCEEDED) {\n // then\n try {\n expect(event).toEqual(expectedEvent);\n resolve(undefined);\n } catch (error) {\n reject(error);\n } finally {\n subscription.unsubscribe();\n }\n }\n });\n\n dispatcher.dispatch(expectedEvent);\n }));\n\n it(\"should dispatch multiple events\", () =>\n new Promise((resolve, reject) => {\n // given\n const events: NewEvent[] = [\n {\n eventName: SessionEvents.DEVICE_STATE_UPDATE_BUSY,\n eventData: undefined,\n },\n {\n eventName: SessionEvents.DEVICE_STATE_UPDATE_CONNECTED,\n eventData: undefined,\n },\n ];\n const received: NewEvent[] = [];\n\n // when\n const subscription = dispatcher.listen().subscribe((event) => {\n received.push(event);\n\n // then\n if (received.length === events.length) {\n try {\n expect(received).toEqual(events);\n resolve(undefined);\n } catch (error) {\n reject(error);\n } finally {\n subscription.unsubscribe();\n }\n }\n });\n\n events.forEach((event) => dispatcher.dispatch(event));\n }));\n});\n"],
5
+ "mappings": "AAAA,OAAS,YAAAA,EAAU,UAAAC,EAAQ,MAAAC,MAAU,SAKrC,OACE,gCAAAC,EAEA,iBAAAC,MACK,iCAEPJ,EAAS,+BAAgC,IAAM,CAC7C,IAAIK,EAEJ,WAAW,IAAM,CACfA,EAAa,IAAIF,CACnB,CAAC,EAEDD,EAAG,uDAAwD,IACzD,IAAI,QAAQ,CAACI,EAASC,IAAW,CAE/B,MAAMC,EAA0B,CAC9B,UAAWJ,EAAc,eACzB,UAAW,MACb,EAGMK,EAAeJ,EAAW,OAAO,EAAE,UAAWK,GAAU,CAE5D,GAAI,CACFT,EAAOS,CAAK,EAAE,QAAQF,CAAa,EACnCF,EAAQ,MAAS,CACnB,OAASK,EAAO,CACdJ,EAAOI,CAAK,CACd,QAAE,CACAF,EAAa,YAAY,CAC3B,CACF,CAAC,EAEDJ,EAAW,SAASG,CAAa,CACnC,CAAC,CAAC,EAEJN,EAAG,qEAAsE,IACvE,IAAI,QAAQ,CAACI,EAASC,IAAW,CAE/B,MAAMK,EAAqB,CACzB,OAAQ,UACR,KAAM,CAAE,UAAW,YAAa,CAClC,EAEMJ,EAA0B,CAC9B,UAAWJ,EAAc,kBACzB,UAAWQ,CACb,EAGMH,EAAeJ,EAAW,OAAO,EAAE,UAAWK,GAAU,CAC5D,GAAIA,EAAM,YAAcN,EAAc,kBAEpC,GAAI,CACFH,EAAOS,CAAK,EAAE,QAAQF,CAAa,EACnCF,EAAQ,MAAS,CACnB,OAASK,EAAO,CACdJ,EAAOI,CAAK,CACd,QAAE,CACAF,EAAa,YAAY,CAC3B,CAEJ,CAAC,EAEDJ,EAAW,SAASG,CAAa,CACnC,CAAC,CAAC,EAEJN,EAAG,kCAAmC,IACpC,IAAI,QAAQ,CAACI,EAASC,IAAW,CAE/B,MAAMM,EAAqB,CACzB,CACE,UAAWT,EAAc,yBACzB,UAAW,MACb,EACA,CACE,UAAWA,EAAc,8BACzB,UAAW,MACb,CACF,EACMU,EAAuB,CAAC,EAGxBL,EAAeJ,EAAW,OAAO,EAAE,UAAWK,GAAU,CAI5D,GAHAI,EAAS,KAAKJ,CAAK,EAGfI,EAAS,SAAWD,EAAO,OAC7B,GAAI,CACFZ,EAAOa,CAAQ,EAAE,QAAQD,CAAM,EAC/BP,EAAQ,MAAS,CACnB,OAASK,EAAO,CACdJ,EAAOI,CAAK,CACd,QAAE,CACAF,EAAa,YAAY,CAC3B,CAEJ,CAAC,EAEDI,EAAO,QAASH,GAAUL,EAAW,SAASK,CAAK,CAAC,CACtD,CAAC,CAAC,CACN,CAAC",
6
+ "names": ["describe", "expect", "it", "DeviceSessionEventDispatcher", "SessionEvents", "dispatcher", "resolve", "reject", "expectedEvent", "subscription", "event", "error", "dummyCommandResult", "events", "received"]
7
+ }
@@ -1,2 +1,2 @@
1
- var h=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var u=(p,t,e,r)=>{for(var s=r>1?void 0:r?v(t,e):t,i=p.length-1,n;i>=0;i--)(n=p[i])&&(s=(r?n(t,e,s):n(s))||s);return r&&s&&h(t,e,s),s};import{injectable as _}from"inversify";import{delay as b,filter as l,from as S,interval as c,map as m,of as A,race as g,switchMap as d}from"rxjs";import{isSuccessCommandResult as f}from"../../../api/command/model/CommandResult";import{GetAppAndVersionCommand as O}from"../../../api/command/os/GetAppAndVersionCommand";import{GetOsVersionCommand as y}from"../../../api/command/os/GetOsVersionCommand";import{DeviceModelId as D}from"../../../api/device/DeviceModel";import{DeviceStatus as a}from"../../../api/device/DeviceStatus";import{DeviceSessionStateType as C}from"../../../api/device-session/DeviceSessionState";let o=class{_logger;_getAppAndVersionCommand=new O;_getOsVersionCommand=new y;_deviceStatus;_subscription;_refreshInterval;_deviceModelId;_sendApduFn;_updateStateFn;constructor({refreshInterval:t,deviceStatus:e,sendApduFn:r,updateStateFn:s,deviceModelId:i},n){this._deviceStatus=e,this._logger=n,this._sendApduFn=r,this._updateStateFn=s,this._refreshInterval=t,this._deviceModelId=i,this.start()}start(){if(this._subscription&&!this._subscription.closed){this._logger.warn("Refresher already started");return}const t=this._deviceModelId===D.NANO_S?this._getNanoSRefreshObservable(this._refreshInterval*2):this._getDefaultRefreshObservable(c(this._refreshInterval));this._subscription=t.subscribe(e=>{!e||!f(e)||this._updateStateFn(r=>({...r,sessionStateType:C.ReadyWithoutSecureChannel,deviceStatus:this._deviceStatus,currentApp:e.data,installedApps:"installedApps"in r?r.installedApps:[]}))})}_getDefaultRefreshObservable(t=S([0])){return t.pipe(l(()=>![a.BUSY,a.NOT_CONNECTED].includes(this._deviceStatus)),d(async()=>{const e=this._getAppAndVersionCommand.getApdu().getRawApdu();return await this._sendApduFn(e)}),m(e=>e.caseOf({Left:r=>(this._logger.error("Error in sending APDU when polling",{data:{error:r}}),null),Right:r=>{try{return this._getAppAndVersionCommand.parseResponse(r)}catch(s){return this._logger.error("Error in parsing APDU response",{data:{error:s}}),null}}})),l(e=>e!==null))}_getNanoSRefreshObservable(t){const e=this._getDefaultRefreshObservable().pipe(d(async s=>{const i=this._getOsVersionCommand.getApdu().getRawApdu();return await this._sendApduFn(i),s})),r=A(null).pipe(b(t),m(s=>{this._logger.warn("Nanos refresh timeout, setting device status to LOCKED"),this._updateStateFn(i=>({...i,deviceStatus:a.LOCKED}))}));return c(t+100).pipe(d(()=>g(e,r)))}setDeviceStatus(t){t===a.NOT_CONNECTED&&this.stop(),this._deviceStatus=t}stop(){!this._subscription||this._subscription.closed||(this._subscription.unsubscribe(),this._subscription=void 0)}};o=u([_()],o);export{o as DeviceSessionRefresher};
1
+ import{timer as n}from"rxjs";import{DeviceModelId as c}from"../../../api/device/DeviceModel";import{DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL as t,DEVICE_SESSION_REFRESHER_POLLING_INTERVAL as o}from"../../device-session/data/DeviceSessionRefresherConst";import{SessionEvents as h}from"../../device-session/model/DeviceSessionEventDispatcher";class d{constructor(i,s,e,r){this._sessionEventDispatcher=e;this._refresherOptions=s,this._logger=i("device-session-refresher"),this._connectedDeviceID=r.deviceModel.id}_refresherSubscription;_refresherOptions;_logger;_connectedDeviceID;startRefresher(){if(this._refresherOptions.isRefresherDisabled)return;const i=this.getValidPollingInterval(this._refresherOptions,this._logger)*2;this._refresherSubscription=n(0,i).subscribe(()=>{this._sessionEventDispatcher.dispatch({eventName:h.REFRESH_NEEDED})})}stopRefresher(){this._refresherSubscription&&(this._refresherSubscription.unsubscribe(),this._refresherSubscription=void 0,this._logger.info("Refresher stopped."))}restartRefresher(){this.stopRefresher(),this.startRefresher(),this._logger.info("Refresher restarted.")}destroy(){this.stopRefresher()}getValidPollingInterval=(i,s)=>{const{pollingInterval:e}=i;switch(this._connectedDeviceID){case c.NANO_S:{const r=o*2;return e!==void 0&&e<r?(s.warn(`Polling interval of ${e} is too low, setting to minimum as ${r}`),r):e??r}default:return e!==void 0&&e<t?(s.warn(`Polling interval of ${e} is too low, setting to minimum as ${t}`),t):e??o}}}export{d as DeviceSessionRefresher};
2
2
  //# sourceMappingURL=DeviceSessionRefresher.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/device-session/model/DeviceSessionRefresher.ts"],
4
- "sourcesContent": ["import { injectable } from \"inversify\";\nimport { Either } from \"purify-ts\";\nimport {\n delay,\n filter,\n from,\n interval,\n map,\n Observable,\n of,\n race,\n Subscription,\n switchMap,\n} from \"rxjs\";\n\nimport { isSuccessCommandResult } from \"@api/command/model/CommandResult\";\nimport {\n GetAppAndVersionCommand,\n GetAppAndVersionCommandResult,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nimport { GetOsVersionCommand } from \"@api/command/os/GetOsVersionCommand\";\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { DeviceStatus } from \"@api/device/DeviceStatus\";\nimport { ApduResponse } from \"@api/device-session/ApduResponse\";\nimport {\n DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nimport { DmkError } from \"@api/Error\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { SendApduFnType } from \"@api/transport/model/DeviceConnection\";\n\ntype UpdateStateFnType = (\n callback: (state: DeviceSessionState) => DeviceSessionState,\n) => void;\n\n/**\n * The arguments for the DeviceSessionRefresher.\n */\nexport type DeviceSessionRefresherArgs = {\n /**\n * The refresh interval in milliseconds.\n */\n refreshInterval: number;\n\n /**\n * The current device status when the refresher is created.\n */\n deviceStatus: Exclude<DeviceStatus, DeviceStatus.NOT_CONNECTED>;\n\n /**\n * The function used to send APDU commands to the device.\n */\n sendApduFn: (rawApdu: Uint8Array) => Promise<Either<DmkError, ApduResponse>>;\n\n /**\n * Callback that updates the state of the device session with\n * polling response.\n * @param callback - A function that will take the previous state and return the new state.\n * @returns void\n */\n updateStateFn: UpdateStateFnType;\n\n /**\n * Device model to handle NanoS specific refresher\n */\n deviceModelId: DeviceModelId;\n};\n\n/**\n * The session refresher that periodically sends a command to refresh the session.\n */\n@injectable()\nexport class DeviceSessionRefresher {\n private readonly _logger: LoggerPublisherService;\n private readonly _getAppAndVersionCommand = new GetAppAndVersionCommand();\n private readonly _getOsVersionCommand = new GetOsVersionCommand();\n private _deviceStatus: DeviceStatus;\n private _subscription?: Subscription;\n private readonly _refreshInterval: number;\n private readonly _deviceModelId: DeviceModelId;\n private readonly _sendApduFn: SendApduFnType;\n private readonly _updateStateFn: UpdateStateFnType;\n\n constructor(\n {\n refreshInterval,\n deviceStatus,\n sendApduFn,\n updateStateFn,\n deviceModelId,\n }: DeviceSessionRefresherArgs,\n logger: LoggerPublisherService,\n ) {\n this._deviceStatus = deviceStatus;\n this._logger = logger;\n this._sendApduFn = sendApduFn;\n this._updateStateFn = updateStateFn;\n this._refreshInterval = refreshInterval;\n this._deviceModelId = deviceModelId;\n\n this.start();\n }\n\n /**\n * Start the session refresher.\n * The refresher will send commands to refresh the session.\n */\n start() {\n if (this._subscription && !this._subscription.closed) {\n this._logger.warn(\"Refresher already started\");\n return;\n }\n\n // NanoS has a specific refresher that sends GetAppAndVersion and GetOsVersion commands\n const refreshObservable =\n this._deviceModelId === DeviceModelId.NANO_S\n ? this._getNanoSRefreshObservable(this._refreshInterval * 2)\n : this._getDefaultRefreshObservable(interval(this._refreshInterval));\n\n this._subscription = refreshObservable.subscribe((parsedResponse) => {\n if (!parsedResponse || !isSuccessCommandResult(parsedResponse)) {\n return;\n }\n // `batteryStatus` and `firmwareVersion` are not available in the polling response.\n this._updateStateFn((state) => ({\n ...state,\n sessionStateType: DeviceSessionStateType.ReadyWithoutSecureChannel,\n deviceStatus: this._deviceStatus,\n currentApp: parsedResponse.data,\n installedApps: \"installedApps\" in state ? state.installedApps : [],\n }));\n });\n }\n\n /**\n * Creates an observable that refreshes a device state with GetAppAndVersion command result.\n *\n * @param {ObservableInput<number>} parentObservable - The parent observable to base the refresh observable on. Defaults to an array with a single number [0].\n * @return {Observable<GetAppAndVersionCommandResult>} An observable that emits the result of the GetAppAndVersionCommand.\n */\n private _getDefaultRefreshObservable(\n parentObservable: Observable<number> = from([0]),\n ): Observable<GetAppAndVersionCommandResult> {\n return parentObservable.pipe(\n filter(\n () =>\n ![DeviceStatus.BUSY, DeviceStatus.NOT_CONNECTED].includes(\n this._deviceStatus,\n ),\n ),\n switchMap(async () => {\n const rawApdu = this._getAppAndVersionCommand.getApdu().getRawApdu();\n return await this._sendApduFn(rawApdu);\n }),\n map((resp) =>\n resp.caseOf({\n Left: (error) => {\n this._logger.error(\"Error in sending APDU when polling\", {\n data: { error },\n });\n return null;\n },\n Right: (data: ApduResponse) => {\n try {\n return this._getAppAndVersionCommand.parseResponse(data);\n } catch (error) {\n this._logger.error(\"Error in parsing APDU response\", {\n data: { error },\n });\n return null;\n }\n },\n }),\n ),\n filter((parsedResponse) => parsedResponse !== null),\n );\n }\n\n /**\n * Creates an observable that emits events to refresh the NanoS device state.\n *\n * @param {number} refreshInterval - The interval, in milliseconds, at which the NanoS state should be refreshed.\n * @return {Observable<GetAppAndVersionCommandResult | void>} An observable that emits events to refresh the NanoS device state and handle timeout scenarios.\n */\n private _getNanoSRefreshObservable(\n refreshInterval: number,\n ): Observable<GetAppAndVersionCommandResult | void> {\n const nanoSRefreshObservable = this._getDefaultRefreshObservable().pipe(\n switchMap(async (resp) => {\n const rawApdu = this._getOsVersionCommand.getApdu().getRawApdu();\n await this._sendApduFn(rawApdu);\n return resp;\n }),\n );\n const timeoutObservable = of(null).pipe(\n delay(refreshInterval),\n map((_) => {\n this._logger.warn(\n \"Nanos refresh timeout, setting device status to LOCKED\",\n );\n this._updateStateFn((state) => ({\n ...state,\n deviceStatus: DeviceStatus.LOCKED,\n }));\n }),\n );\n return interval(refreshInterval + 100).pipe(\n switchMap(() => race(nanoSRefreshObservable, timeoutObservable)),\n );\n }\n\n /**\n * Maintain a device status to prevent sending APDU when the device is busy.\n *\n * @param {DeviceStatus} deviceStatus - The new device status.\n */\n setDeviceStatus(deviceStatus: DeviceStatus) {\n if (deviceStatus === DeviceStatus.NOT_CONNECTED) {\n this.stop();\n }\n this._deviceStatus = deviceStatus;\n }\n\n /**\n * Stops the session refresher.\n * The refresher will no longer send commands to refresh the session.\n */\n stop() {\n if (!this._subscription || this._subscription.closed) {\n return;\n }\n this._subscription.unsubscribe();\n this._subscription = undefined;\n }\n}\n"],
5
- "mappings": "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",
6
- "names": ["injectable", "delay", "filter", "from", "interval", "map", "of", "race", "switchMap", "isSuccessCommandResult", "GetAppAndVersionCommand", "GetOsVersionCommand", "DeviceModelId", "DeviceStatus", "DeviceSessionStateType", "DeviceSessionRefresher", "GetAppAndVersionCommand", "GetOsVersionCommand", "refreshInterval", "deviceStatus", "sendApduFn", "updateStateFn", "deviceModelId", "logger", "refreshObservable", "DeviceModelId", "interval", "parsedResponse", "isSuccessCommandResult", "state", "DeviceSessionStateType", "parentObservable", "from", "filter", "DeviceStatus", "switchMap", "rawApdu", "map", "resp", "error", "data", "nanoSRefreshObservable", "timeoutObservable", "of", "delay", "_", "race", "__decorateClass", "injectable"]
4
+ "sourcesContent": ["import { type Subscription, timer } from \"rxjs\";\n\nimport { DeviceModelId } from \"@api/device/DeviceModel\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { type LoggerPublisherService } from \"@api/types\";\nimport {\n DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL,\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL,\n} from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport {\n type DeviceSessionEventDispatcher,\n SessionEvents,\n} from \"@internal/device-session/model/DeviceSessionEventDispatcher\";\n\nexport interface DeviceSessionRefresherOptions {\n isRefresherDisabled: boolean;\n pollingInterval?: number;\n}\n\nexport class DeviceSessionRefresher {\n private _refresherSubscription!: Subscription | undefined;\n private _refresherOptions: DeviceSessionRefresherOptions;\n private readonly _logger: LoggerPublisherService;\n private _connectedDeviceID: DeviceModelId;\n\n constructor(\n loggerModuleFactory: (tag: string) => LoggerPublisherService,\n refresherOptions: DeviceSessionRefresherOptions,\n private _sessionEventDispatcher: DeviceSessionEventDispatcher,\n connectedDevice: TransportConnectedDevice,\n ) {\n this._refresherOptions = refresherOptions;\n this._logger = loggerModuleFactory(\"device-session-refresher\");\n this._connectedDeviceID = connectedDevice.deviceModel.id;\n }\n\n public startRefresher(): void {\n if (this._refresherOptions.isRefresherDisabled) return;\n\n const pollingInterval =\n this.getValidPollingInterval(this._refresherOptions, this._logger) * 2;\n\n this._refresherSubscription = timer(0, pollingInterval).subscribe(() => {\n this._sessionEventDispatcher.dispatch({\n eventName: SessionEvents.REFRESH_NEEDED,\n });\n });\n }\n\n public stopRefresher(): void {\n if (this._refresherSubscription) {\n this._refresherSubscription.unsubscribe();\n this._refresherSubscription = undefined;\n this._logger.info(\"Refresher stopped.\");\n }\n }\n\n public restartRefresher(): void {\n this.stopRefresher();\n this.startRefresher();\n this._logger.info(\"Refresher restarted.\");\n }\n\n public destroy(): void {\n this.stopRefresher();\n }\n\n private getValidPollingInterval = (\n refresherOptions: DeviceSessionRefresherOptions,\n logger: LoggerPublisherService,\n ): number => {\n const { pollingInterval } = refresherOptions;\n switch (this._connectedDeviceID) {\n case DeviceModelId.NANO_S: {\n const defaultNanoPollingInterval =\n DEVICE_SESSION_REFRESHER_POLLING_INTERVAL * 2;\n if (\n pollingInterval !== undefined &&\n pollingInterval < defaultNanoPollingInterval\n ) {\n logger.warn(\n `Polling interval of ${pollingInterval} is too low, setting to minimum as ${defaultNanoPollingInterval}`,\n );\n return defaultNanoPollingInterval;\n }\n return pollingInterval ?? defaultNanoPollingInterval;\n }\n default:\n if (\n pollingInterval !== undefined &&\n pollingInterval < DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL\n ) {\n logger.warn(\n `Polling interval of ${pollingInterval} is too low, setting to minimum as ${DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL}`,\n );\n return DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL;\n }\n\n return pollingInterval ?? DEVICE_SESSION_REFRESHER_POLLING_INTERVAL;\n }\n };\n}\n"],
5
+ "mappings": "AAAA,OAA4B,SAAAA,MAAa,OAEzC,OAAS,iBAAAC,MAAqB,0BAG9B,OACE,qDAAAC,EACA,6CAAAC,MACK,4DACP,OAEE,iBAAAC,MACK,8DAOA,MAAMC,CAAuB,CAMlC,YACEC,EACAC,EACQC,EACRC,EACA,CAFQ,6BAAAD,EAGR,KAAK,kBAAoBD,EACzB,KAAK,QAAUD,EAAoB,0BAA0B,EAC7D,KAAK,mBAAqBG,EAAgB,YAAY,EACxD,CAdQ,uBACA,kBACS,QACT,mBAaD,gBAAuB,CAC5B,GAAI,KAAK,kBAAkB,oBAAqB,OAEhD,MAAMC,EACJ,KAAK,wBAAwB,KAAK,kBAAmB,KAAK,OAAO,EAAI,EAEvE,KAAK,uBAAyBV,EAAM,EAAGU,CAAe,EAAE,UAAU,IAAM,CACtE,KAAK,wBAAwB,SAAS,CACpC,UAAWN,EAAc,cAC3B,CAAC,CACH,CAAC,CACH,CAEO,eAAsB,CACvB,KAAK,yBACP,KAAK,uBAAuB,YAAY,EACxC,KAAK,uBAAyB,OAC9B,KAAK,QAAQ,KAAK,oBAAoB,EAE1C,CAEO,kBAAyB,CAC9B,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,QAAQ,KAAK,sBAAsB,CAC1C,CAEO,SAAgB,CACrB,KAAK,cAAc,CACrB,CAEQ,wBAA0B,CAChCG,EACAI,IACW,CACX,KAAM,CAAE,gBAAAD,CAAgB,EAAIH,EAC5B,OAAQ,KAAK,mBAAoB,CAC/B,KAAKN,EAAc,OAAQ,CACzB,MAAMW,EACJT,EAA4C,EAC9C,OACEO,IAAoB,QACpBA,EAAkBE,GAElBD,EAAO,KACL,uBAAuBD,CAAe,sCAAsCE,CAA0B,EACxG,EACOA,GAEFF,GAAmBE,CAC5B,CACA,QACE,OACEF,IAAoB,QACpBA,EAAkBR,GAElBS,EAAO,KACL,uBAAuBD,CAAe,sCAAsCR,CAAiD,EAC/H,EACOA,GAGFQ,GAAmBP,CAC9B,CACF,CACF",
6
+ "names": ["timer", "DeviceModelId", "DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL", "DEVICE_SESSION_REFRESHER_POLLING_INTERVAL", "SessionEvents", "DeviceSessionRefresher", "loggerModuleFactory", "refresherOptions", "_sessionEventDispatcher", "connectedDevice", "pollingInterval", "logger", "defaultNanoPollingInterval"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Left as v,Right as m}from"purify-ts";import{CommandResultFactory as u}from"../../../api/command/model/CommandResult";import{GetAppAndVersionCommand as l}from"../../../api/command/os/GetAppAndVersionCommand";import{GetOsVersionCommand as p}from"../../../api/command/os/GetOsVersionCommand";import{DeviceModelId as n}from"../../../api/device/DeviceModel";import{DeviceStatus as a}from"../../../api/device/DeviceStatus";import{DEVICE_SESSION_REFRESH_INTERVAL as s}from"../../device-session/data/DeviceSessionRefresherConst";import{DefaultLoggerPublisherService as h}from"../../logger-publisher/service/DefaultLoggerPublisherService";import{DeviceSessionRefresher as c}from"./DeviceSessionRefresher";const t=jest.fn().mockResolvedValue(Promise.resolve(m({}))),i=jest.fn().mockImplementation(()=>{});jest.useFakeTimers();describe("DeviceSessionRefresher",()=>{let e,r;beforeEach(()=>{jest.spyOn(l.prototype,"parseResponse").mockReturnValueOnce(u({data:{name:"testAppName"}})),jest.spyOn(p.prototype,"parseResponse").mockReturnValueOnce(u({data:{}})),r=new h([],"DeviceSessionRefresherTest")}),describe("With a modern device",()=>{beforeEach(()=>{const o=Object.values(n).filter(d=>d!==n.NANO_S);e=new c({refreshInterval:s,deviceStatus:a.CONNECTED,sendApduFn:t,updateStateFn:i,deviceModelId:o[Math.floor(Math.random()*o.length)]},r)}),afterEach(()=>{e.stop(),jest.clearAllMocks()}),it("should poll by calling sendApduFn 2 times",()=>{jest.advanceTimersByTime(s*2),expect(t).toHaveBeenCalledTimes(2)}),it("should not poll when device is busy",()=>{e.setDeviceStatus(a.BUSY),jest.advanceTimersByTime(s),expect(t).not.toHaveBeenCalled()}),it("should not poll when device is disconnected",()=>{e.setDeviceStatus(a.NOT_CONNECTED),jest.advanceTimersByTime(s),expect(t).not.toHaveBeenCalled()}),it("should update device session state by calling updateStateFn",async()=>{jest.advanceTimersByTime(s),await expect(t()).resolves.toEqual(m({})),expect(t).toHaveBeenCalled(),expect(i).toHaveBeenCalled()}),it("should not update device session state with failed polling response",async()=>{t.mockResolvedValueOnce(Promise.resolve(v("error")));const o=jest.spyOn(r,"error");jest.advanceTimersByTime(s),await t(),await expect(i).not.toHaveBeenCalled(),expect(o).toHaveBeenCalled()}),it("should stop the refresher when device is disconnected",()=>{const o=jest.spyOn(e,"stop");e.setDeviceStatus(a.NOT_CONNECTED),expect(o).toHaveBeenCalledTimes(1)}),it("should not throw error if stop is called on a stopped refresher",()=>{e.stop(),expect(()=>e.stop()).not.toThrow()}),it("should not throw error if start is called on a started refresher",()=>{e.start(),expect(()=>e.start()).not.toThrow()})}),describe("With a NanoS device",()=>{afterEach(()=>{e.stop(),jest.clearAllMocks()}),it("should call sendApduFn 2 times and update state 1 time for a single interval",async()=>{e=new c({refreshInterval:s,deviceStatus:a.CONNECTED,sendApduFn:t,updateStateFn:i,deviceModelId:n.NANO_S},r),jest.advanceTimersByTime(s*2+100),await Promise.resolve(),expect(t).toHaveBeenNthCalledWith(1,new l().getApdu().getRawApdu()),await Promise.resolve(),expect(t).toHaveBeenLastCalledWith(new p().getApdu().getRawApdu()),await Promise.resolve(),expect(t).toHaveBeenCalledTimes(2),await Promise.resolve(),expect(i).toHaveBeenCalledTimes(1)}),it("should set device locked when get os version times out",async()=>{t.mockImplementation(o=>o.toString()===new p().getApdu().getRawApdu().toString()?new Promise(d=>setTimeout(()=>d(v("timeout")),s*10)):Promise.resolve(m({}))),i.mockImplementation(o=>{e.setDeviceStatus(o().deviceStatus)}),e=new c({refreshInterval:s,deviceStatus:a.CONNECTED,sendApduFn:t,updateStateFn:i,deviceModelId:n.NANO_S},r),jest.spyOn(e,"setDeviceStatus"),jest.advanceTimersByTime(s*5+100),await Promise.resolve(),expect(t).toHaveBeenNthCalledWith(1,new l().getApdu().getRawApdu()),await Promise.resolve(),expect(e.setDeviceStatus).toHaveBeenCalledWith(a.LOCKED)})})});
1
+ import{Subject as u}from"rxjs";import{afterEach as D,beforeEach as S,describe as y,expect as n,it as l,vi as t}from"vitest";import{DeviceModelId as h}from"../../../api/device/DeviceModel";import{DEVICE_SESSION_REFRESHER_MINIMUM_POLLING_INTERVAL as p,DEVICE_SESSION_REFRESHER_POLLING_INTERVAL as E}from"../../device-session/data/DeviceSessionRefresherConst";import{SessionEvents as w}from"../../device-session/model/DeviceSessionEventDispatcher";import{DeviceSessionRefresher as c}from"./DeviceSessionRefresher";y("DeviceSessionRefresher",()=>{let d,s,o;const f={deviceModel:{id:h.FLEX}},m={deviceModel:{id:h.NANO_S}},i=t.fn(()=>o);let e;S(()=>{t.useFakeTimers(),d=new u,s={listen:()=>d.asObservable(),dispatch:t.fn()},o={info:t.fn(),warn:t.fn(),error:t.fn(),debug:t.fn(),subscribers:[]}}),D(()=>{e?.destroy(),t.useRealTimers(),t.restoreAllMocks()}),l("should not start refresher if disabled",()=>{const r={isRefresherDisabled:!0,pollingInterval:1e3};e=new c(i,r,s,f),e.startRefresher(),t.advanceTimersByTime(2e3),n(s.dispatch).not.toHaveBeenCalled()}),l("should warn and use minimum polling interval for default device when provided interval is too low",()=>{const r=p-100,a={isRefresherDisabled:!1,pollingInterval:r};e=new c(i,a,s,f),e.startRefresher();const v=`Polling interval of ${r} is too low, setting to minimum as ${p}`;n(o.warn).toHaveBeenCalledWith(v)}),l("should warn and use minimum polling interval for NANO_S device when provided interval is too low",()=>{const r=E*2,a=r-100,v={isRefresherDisabled:!1,pollingInterval:a};e=new c(i,v,s,m),e.startRefresher();const R=`Polling interval of ${a} is too low, setting to minimum as ${r}`;n(o.warn).toHaveBeenCalledWith(R)}),l("should not warn when provided polling interval is valid for default device",()=>{const a={isRefresherDisabled:!1,pollingInterval:p+100};e=new c(i,a,s,f),e.startRefresher(),n(o.warn).not.toHaveBeenCalled()}),l("should dispatch refresh event on timer ticks",()=>{const r=p+100,a={isRefresherDisabled:!1,pollingInterval:r};e=new c(i,a,s,f),e.startRefresher();const v=r*2;t.advanceTimersByTime(v*3),n(s.dispatch.mock.calls.length).toBe(4),n(s.dispatch.mock.calls[0][0]).toEqual({eventName:w.REFRESH_NEEDED})}),l("should stop refresher",()=>{const r={isRefresherDisabled:!1,pollingInterval:1e3};e=new c(i,r,s,f),e.startRefresher(),s.dispatch.mockClear(),e.stopRefresher(),t.advanceTimersByTime(2e3),n(s.dispatch).not.toHaveBeenCalled(),n(o.info).toHaveBeenCalledWith("Refresher stopped.")}),l("should restart refresher",()=>{const r={isRefresherDisabled:!1,pollingInterval:1e3};e=new c(i,r,s,f),e.startRefresher(),s.dispatch.mockClear(),t.clearAllTimers(),e.restartRefresher(),n(o.info).toHaveBeenCalledWith("Refresher stopped."),n(o.info).toHaveBeenCalledWith("Refresher restarted."),t.advanceTimersByTime(2e3),n(s.dispatch.mock.calls.length).toBeGreaterThan(0)}),l("should destroy refresher",()=>{const r={isRefresherDisabled:!1,pollingInterval:1e3};e=new c(i,r,s,f),e.startRefresher(),e.destroy(),t.advanceTimersByTime(2e3),n(s.dispatch).not.toHaveBeenCalled()})});
2
2
  //# sourceMappingURL=DeviceSessionRefresher.test.js.map