@ledgerhq/device-management-kit 0.0.0-develop-20241017000946 → 0.5.0

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 (1236) hide show
  1. package/lib/cjs/index.js +1 -6126
  2. package/lib/cjs/index.js.map +4 -4
  3. package/lib/cjs/package.json +64 -0
  4. package/lib/cjs/src/api/DeviceManagementKit.js +2 -0
  5. package/lib/cjs/src/api/DeviceManagementKit.js.map +7 -0
  6. package/lib/cjs/src/api/DeviceManagementKit.test.js +2 -0
  7. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +7 -0
  8. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +2 -0
  9. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +7 -0
  10. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js +2 -0
  11. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js.map +7 -0
  12. package/lib/cjs/src/api/DmkConfig.js +2 -0
  13. package/lib/cjs/src/api/DmkConfig.js.map +7 -0
  14. package/lib/cjs/src/api/Error.js +2 -0
  15. package/lib/cjs/src/api/Error.js.map +7 -0
  16. package/lib/cjs/src/api/apdu/model/Apdu.js +2 -0
  17. package/lib/cjs/src/api/apdu/model/Apdu.js.map +7 -0
  18. package/lib/cjs/src/api/apdu/model/Apdu.test.js +2 -0
  19. package/lib/cjs/src/api/apdu/model/Apdu.test.js.map +7 -0
  20. package/lib/cjs/src/api/apdu/utils/ApduBuilder.js +2 -0
  21. package/lib/cjs/src/api/apdu/utils/ApduBuilder.js.map +7 -0
  22. package/lib/cjs/src/api/apdu/utils/ApduBuilder.test.js +2 -0
  23. package/lib/cjs/src/api/apdu/utils/ApduBuilder.test.js.map +7 -0
  24. package/lib/cjs/src/api/apdu/utils/ApduParser.js +2 -0
  25. package/lib/cjs/src/api/apdu/utils/ApduParser.js.map +7 -0
  26. package/lib/cjs/src/api/apdu/utils/ApduParser.test.js +2 -0
  27. package/lib/cjs/src/api/apdu/utils/ApduParser.test.js.map +7 -0
  28. package/lib/cjs/src/api/apdu/utils/AppBuilderError.js +2 -0
  29. package/lib/cjs/src/api/apdu/utils/AppBuilderError.js.map +7 -0
  30. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js +2 -0
  31. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js.map +7 -0
  32. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js +2 -0
  33. package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js.map +7 -0
  34. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js +2 -0
  35. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js.map +7 -0
  36. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js +2 -0
  37. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js.map +7 -0
  38. package/lib/cjs/src/api/command/Command.js +2 -0
  39. package/lib/cjs/src/api/command/Command.js.map +7 -0
  40. package/lib/cjs/src/api/command/Errors.js +2 -0
  41. package/lib/cjs/src/api/command/Errors.js.map +7 -0
  42. package/lib/cjs/src/api/command/di/commandModule.js +2 -0
  43. package/lib/cjs/src/api/command/di/commandModule.js.map +7 -0
  44. package/lib/cjs/src/api/command/di/commandModule.test.js +2 -0
  45. package/lib/cjs/src/api/command/di/commandModule.test.js.map +7 -0
  46. package/lib/cjs/src/api/command/di/commandTypes.js +2 -0
  47. package/lib/cjs/src/api/command/di/commandTypes.js.map +7 -0
  48. package/lib/cjs/src/api/command/model/CommandResult.js +2 -0
  49. package/lib/cjs/src/api/command/model/CommandResult.js.map +7 -0
  50. package/lib/cjs/src/api/command/model/CommandResult.test.js +2 -0
  51. package/lib/cjs/src/api/command/model/CommandResult.test.js.map +7 -0
  52. package/lib/cjs/src/api/command/os/CloseAppCommand.js +2 -0
  53. package/lib/cjs/src/api/command/os/CloseAppCommand.js.map +7 -0
  54. package/lib/cjs/src/api/command/os/CloseAppCommand.test.js +2 -0
  55. package/lib/cjs/src/api/command/os/CloseAppCommand.test.js.map +7 -0
  56. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.js +2 -0
  57. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.js.map +7 -0
  58. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.test.js +2 -0
  59. package/lib/cjs/src/api/command/os/GetAppAndVersionCommand.test.js.map +7 -0
  60. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.js +2 -0
  61. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.js.map +7 -0
  62. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.test.js +2 -0
  63. package/lib/cjs/src/api/command/os/GetBatteryStatusCommand.test.js.map +7 -0
  64. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js +2 -0
  65. package/lib/cjs/src/api/command/os/GetOsVersionCommand.js.map +7 -0
  66. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js +2 -0
  67. package/lib/cjs/src/api/command/os/GetOsVersionCommand.test.js.map +7 -0
  68. package/lib/cjs/src/api/command/os/ListAppsCommand.js +2 -0
  69. package/lib/cjs/src/api/command/os/ListAppsCommand.js.map +7 -0
  70. package/lib/cjs/src/api/command/os/ListAppsCommand.test.js +2 -0
  71. package/lib/cjs/src/api/command/os/ListAppsCommand.test.js.map +7 -0
  72. package/lib/cjs/src/api/command/os/OpenAppCommand.js +2 -0
  73. package/lib/cjs/src/api/command/os/OpenAppCommand.js.map +7 -0
  74. package/lib/cjs/src/api/command/os/OpenAppCommand.test.js +2 -0
  75. package/lib/cjs/src/api/command/os/OpenAppCommand.test.js.map +7 -0
  76. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js +2 -0
  77. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.js.map +7 -0
  78. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js +2 -0
  79. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js.map +7 -0
  80. package/lib/cjs/src/api/command/utils/CommandErrors.js +2 -0
  81. package/lib/cjs/src/api/command/utils/CommandErrors.js.map +7 -0
  82. package/lib/cjs/src/api/command/utils/CommandUtils.js +2 -0
  83. package/lib/cjs/src/api/command/utils/CommandUtils.js.map +7 -0
  84. package/lib/cjs/src/api/command/utils/CommandUtils.test.js +2 -0
  85. package/lib/cjs/src/api/command/utils/CommandUtils.test.js.map +7 -0
  86. package/lib/cjs/src/api/command/utils/GlobalCommandError.js +2 -0
  87. package/lib/cjs/src/api/command/utils/GlobalCommandError.js.map +7 -0
  88. package/lib/cjs/src/api/command/utils/GlobalCommandError.test.js +2 -0
  89. package/lib/cjs/src/api/command/utils/GlobalCommandError.test.js.map +7 -0
  90. package/lib/cjs/src/api/device/DeviceModel.js +2 -0
  91. package/lib/cjs/src/api/device/DeviceModel.js.map +7 -0
  92. package/lib/cjs/src/api/device/DeviceStatus.js +2 -0
  93. package/lib/cjs/src/api/device/DeviceStatus.js.map +7 -0
  94. package/lib/cjs/src/api/device-action/DeviceAction.js +2 -0
  95. package/lib/cjs/src/api/device-action/DeviceAction.js.map +7 -0
  96. package/lib/cjs/src/api/device-action/__test-utils__/data.js +2 -0
  97. package/lib/cjs/src/api/device-action/__test-utils__/data.js.map +7 -0
  98. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +2 -0
  99. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +7 -0
  100. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +2 -0
  101. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +7 -0
  102. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js +2 -0
  103. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +7 -0
  104. package/lib/cjs/src/api/device-action/di/deviceActionModule.js +2 -0
  105. package/lib/cjs/src/api/device-action/di/deviceActionModule.js.map +7 -0
  106. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js +2 -0
  107. package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js.map +7 -0
  108. package/lib/cjs/src/api/device-action/di/deviceActionTypes.js +2 -0
  109. package/lib/cjs/src/api/device-action/di/deviceActionTypes.js.map +7 -0
  110. package/lib/cjs/src/api/device-action/model/DeviceActionState.js +2 -0
  111. package/lib/cjs/src/api/device-action/model/DeviceActionState.js.map +7 -0
  112. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js +2 -0
  113. package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js.map +7 -0
  114. package/lib/cjs/src/api/device-action/os/Const.js +2 -0
  115. package/lib/cjs/src/api/device-action/os/Const.js.map +7 -0
  116. package/lib/cjs/src/api/device-action/os/Errors.js +2 -0
  117. package/lib/cjs/src/api/device-action/os/Errors.js.map +7 -0
  118. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +2 -0
  119. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +7 -0
  120. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +2 -0
  121. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +7 -0
  122. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/types.js +2 -0
  123. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/types.js.map +7 -0
  124. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +2 -0
  125. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +7 -0
  126. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +2 -0
  127. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +7 -0
  128. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js +2 -0
  129. package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js.map +7 -0
  130. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +2 -0
  131. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +7 -0
  132. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +2 -0
  133. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +7 -0
  134. package/lib/cjs/src/api/device-action/os/ListApps/types.js +2 -0
  135. package/lib/cjs/src/api/device-action/os/ListApps/types.js.map +7 -0
  136. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +2 -0
  137. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +7 -0
  138. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +2 -0
  139. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +7 -0
  140. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/types.js +2 -0
  141. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/types.js.map +7 -0
  142. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +2 -0
  143. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +7 -0
  144. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +2 -0
  145. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +7 -0
  146. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js +2 -0
  147. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js.map +7 -0
  148. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +2 -0
  149. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +7 -0
  150. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +2 -0
  151. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +7 -0
  152. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js +2 -0
  153. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +7 -0
  154. package/lib/cjs/src/api/device-action/use-case/ExecuteDeviceActionUseCase.js +2 -0
  155. package/lib/cjs/src/api/device-action/use-case/ExecuteDeviceActionUseCase.js.map +7 -0
  156. package/lib/cjs/src/api/device-action/xstate-utils/StateMachineTypes.js +2 -0
  157. package/lib/cjs/src/api/device-action/xstate-utils/StateMachineTypes.js.map +7 -0
  158. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js +2 -0
  159. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +7 -0
  160. package/lib/cjs/src/api/device-session/ApduResponse.js +2 -0
  161. package/lib/cjs/src/api/device-session/ApduResponse.js.map +7 -0
  162. package/lib/cjs/src/api/device-session/ApduResponse.stub.js +2 -0
  163. package/lib/cjs/src/api/device-session/ApduResponse.stub.js.map +7 -0
  164. package/lib/cjs/src/api/device-session/DeviceSessionState.js +2 -0
  165. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +7 -0
  166. package/lib/cjs/src/api/device-session/types.js +2 -0
  167. package/lib/cjs/src/api/device-session/types.js.map +7 -0
  168. package/lib/cjs/src/api/discovery/ConnectionType.js +2 -0
  169. package/lib/cjs/src/api/discovery/ConnectionType.js.map +7 -0
  170. package/lib/cjs/src/api/index.js +2 -0
  171. package/lib/cjs/src/api/index.js.map +7 -0
  172. package/lib/cjs/src/api/logger-subscriber/__mocks__/ConsoleLogger.js +2 -0
  173. package/lib/cjs/src/api/logger-subscriber/__mocks__/ConsoleLogger.js.map +7 -0
  174. package/lib/cjs/src/api/logger-subscriber/model/LogLevel.js +2 -0
  175. package/lib/cjs/src/api/logger-subscriber/model/LogLevel.js.map +7 -0
  176. package/lib/cjs/src/api/logger-subscriber/model/LogSubscriberOptions.js +2 -0
  177. package/lib/cjs/src/api/logger-subscriber/model/LogSubscriberOptions.js.map +7 -0
  178. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.js +2 -0
  179. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.js.map +7 -0
  180. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js +2 -0
  181. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +7 -0
  182. package/lib/cjs/src/api/logger-subscriber/service/LoggerSubscriberService.js +2 -0
  183. package/lib/cjs/src/api/logger-subscriber/service/LoggerSubscriberService.js.map +7 -0
  184. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.js +2 -0
  185. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.js.map +7 -0
  186. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +2 -0
  187. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +7 -0
  188. package/lib/cjs/src/api/transport/model/ConnectedDevice.js +2 -0
  189. package/lib/cjs/src/api/transport/model/ConnectedDevice.js.map +7 -0
  190. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js +2 -0
  191. package/lib/cjs/src/api/transport/model/DiscoveredDevice.js.map +7 -0
  192. package/lib/cjs/src/api/transport/model/Transport.js +2 -0
  193. package/lib/cjs/src/api/transport/model/Transport.js.map +7 -0
  194. package/lib/cjs/src/api/transport/model/TransportIdentifier.js +2 -0
  195. package/lib/cjs/src/api/transport/model/TransportIdentifier.js.map +7 -0
  196. package/lib/cjs/src/api/types.js +2 -0
  197. package/lib/cjs/src/api/types.js.map +7 -0
  198. package/lib/cjs/src/api/utils/Base64String.js +2 -0
  199. package/lib/cjs/src/api/utils/Base64String.js.map +7 -0
  200. package/lib/cjs/src/api/utils/Base64String.test.js +2 -0
  201. package/lib/cjs/src/api/utils/Base64String.test.js.map +7 -0
  202. package/lib/cjs/src/api/utils/HexaString.js +2 -0
  203. package/lib/cjs/src/api/utils/HexaString.js.map +7 -0
  204. package/lib/cjs/src/api/utils/HexaString.test.js +2 -0
  205. package/lib/cjs/src/api/utils/HexaString.test.js.map +7 -0
  206. package/lib/cjs/src/di.js +2 -0
  207. package/lib/cjs/src/di.js.map +7 -0
  208. package/lib/cjs/src/di.stub.js +2 -0
  209. package/lib/cjs/src/di.stub.js.map +7 -0
  210. package/lib/cjs/src/index.js +2 -0
  211. package/lib/cjs/src/index.js.map +7 -0
  212. package/lib/cjs/src/internal/config/data/ConfigDataSource.js +2 -0
  213. package/lib/cjs/src/internal/config/data/ConfigDataSource.js.map +7 -0
  214. package/lib/cjs/src/internal/config/data/Dto.js +2 -0
  215. package/lib/cjs/src/internal/config/data/Dto.js.map +7 -0
  216. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.js +2 -0
  217. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.js.map +7 -0
  218. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.stub.js +2 -0
  219. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.stub.js.map +7 -0
  220. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js +2 -0
  221. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js.map +7 -0
  222. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.js +2 -0
  223. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.js.map +7 -0
  224. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.stub.js +2 -0
  225. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.stub.js.map +7 -0
  226. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js +2 -0
  227. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js.map +7 -0
  228. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js +2 -0
  229. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +7 -0
  230. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +2 -0
  231. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +7 -0
  232. package/lib/cjs/src/internal/config/di/configModule.js +2 -0
  233. package/lib/cjs/src/internal/config/di/configModule.js.map +7 -0
  234. package/lib/cjs/src/internal/config/di/configModule.test.js +2 -0
  235. package/lib/cjs/src/internal/config/di/configModule.test.js.map +7 -0
  236. package/lib/cjs/src/internal/config/di/configTypes.js +2 -0
  237. package/lib/cjs/src/internal/config/di/configTypes.js.map +7 -0
  238. package/lib/cjs/src/internal/config/model/Config.js +2 -0
  239. package/lib/cjs/src/internal/config/model/Config.js.map +7 -0
  240. package/lib/cjs/src/internal/config/model/Errors.js +2 -0
  241. package/lib/cjs/src/internal/config/model/Errors.js.map +7 -0
  242. package/lib/cjs/src/internal/config/service/ConfigService.js +2 -0
  243. package/lib/cjs/src/internal/config/service/ConfigService.js.map +7 -0
  244. package/lib/cjs/src/internal/config/service/DefaultConfigService.js +2 -0
  245. package/lib/cjs/src/internal/config/service/DefaultConfigService.js.map +7 -0
  246. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js +2 -0
  247. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js.map +7 -0
  248. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.js +2 -0
  249. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.js.map +7 -0
  250. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js +2 -0
  251. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +7 -0
  252. package/lib/cjs/src/internal/device-model/data/DeviceModelDataSource.js +2 -0
  253. package/lib/cjs/src/internal/device-model/data/DeviceModelDataSource.js.map +7 -0
  254. package/lib/cjs/src/internal/device-model/data/StaticDeviceModelDataSource.js +2 -0
  255. package/lib/cjs/src/internal/device-model/data/StaticDeviceModelDataSource.js.map +7 -0
  256. package/lib/cjs/src/internal/device-model/data/StaticDeviceModelDataSource.test.js +2 -0
  257. package/lib/cjs/src/internal/device-model/data/StaticDeviceModelDataSource.test.js.map +7 -0
  258. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +2 -0
  259. package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +7 -0
  260. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +2 -0
  261. package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +7 -0
  262. package/lib/cjs/src/internal/device-model/di/deviceModelTypes.js +2 -0
  263. package/lib/cjs/src/internal/device-model/di/deviceModelTypes.js.map +7 -0
  264. package/lib/cjs/src/internal/device-model/model/DeviceModel.js +2 -0
  265. package/lib/cjs/src/internal/device-model/model/DeviceModel.js.map +7 -0
  266. package/lib/cjs/src/internal/device-model/model/DeviceModel.stub.js +2 -0
  267. package/lib/cjs/src/internal/device-model/model/DeviceModel.stub.js.map +7 -0
  268. package/lib/cjs/src/internal/device-model/model/DeviceModel.test.js +2 -0
  269. package/lib/cjs/src/internal/device-model/model/DeviceModel.test.js.map +7 -0
  270. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js +2 -0
  271. package/lib/cjs/src/internal/device-session/data/ApduResponseConst.js.map +7 -0
  272. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js +2 -0
  273. package/lib/cjs/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +7 -0
  274. package/lib/cjs/src/internal/device-session/data/FramerConst.js +2 -0
  275. package/lib/cjs/src/internal/device-session/data/FramerConst.js.map +7 -0
  276. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +2 -0
  277. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +7 -0
  278. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +2 -0
  279. package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +7 -0
  280. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js +2 -0
  281. package/lib/cjs/src/internal/device-session/di/deviceSessionTypes.js.map +7 -0
  282. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +2 -0
  283. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +7 -0
  284. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js +2 -0
  285. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js.map +7 -0
  286. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js +2 -0
  287. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.js.map +7 -0
  288. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js +2 -0
  289. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +7 -0
  290. package/lib/cjs/src/internal/device-session/model/Errors.js +2 -0
  291. package/lib/cjs/src/internal/device-session/model/Errors.js.map +7 -0
  292. package/lib/cjs/src/internal/device-session/model/Frame.js +2 -0
  293. package/lib/cjs/src/internal/device-session/model/Frame.js.map +7 -0
  294. package/lib/cjs/src/internal/device-session/model/FrameHeader.js +2 -0
  295. package/lib/cjs/src/internal/device-session/model/FrameHeader.js.map +7 -0
  296. package/lib/cjs/src/internal/device-session/service/ApduReceiverService.js +2 -0
  297. package/lib/cjs/src/internal/device-session/service/ApduReceiverService.js.map +7 -0
  298. package/lib/cjs/src/internal/device-session/service/ApduSenderService.js +2 -0
  299. package/lib/cjs/src/internal/device-session/service/ApduSenderService.js.map +7 -0
  300. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js +2 -0
  301. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js.map +7 -0
  302. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.stub.js +2 -0
  303. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.stub.js.map +7 -0
  304. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js +2 -0
  305. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +7 -0
  306. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js +2 -0
  307. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js.map +7 -0
  308. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.stub.js +2 -0
  309. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.stub.js.map +7 -0
  310. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +2 -0
  311. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +7 -0
  312. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.js +2 -0
  313. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.js.map +7 -0
  314. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js +2 -0
  315. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +7 -0
  316. package/lib/cjs/src/internal/device-session/service/DeviceSessionService.js +2 -0
  317. package/lib/cjs/src/internal/device-session/service/DeviceSessionService.js.map +7 -0
  318. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js +2 -0
  319. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +7 -0
  320. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseState.test.js +2 -0
  321. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseState.test.js.map +7 -0
  322. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.js +2 -0
  323. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.js.map +7 -0
  324. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +2 -0
  325. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +7 -0
  326. package/lib/cjs/src/internal/device-session/utils/FramerUtils.js +2 -0
  327. package/lib/cjs/src/internal/device-session/utils/FramerUtils.js.map +7 -0
  328. package/lib/cjs/src/internal/device-session/utils/FramerUtils.test.js +2 -0
  329. package/lib/cjs/src/internal/device-session/utils/FramerUtils.test.js.map +7 -0
  330. package/lib/cjs/src/internal/discovery/di/discoveryModule.js +2 -0
  331. package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +7 -0
  332. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +2 -0
  333. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +7 -0
  334. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js +2 -0
  335. package/lib/cjs/src/internal/discovery/di/discoveryTypes.js.map +7 -0
  336. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js +2 -0
  337. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js.map +7 -0
  338. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js +2 -0
  339. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js.map +7 -0
  340. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.js +2 -0
  341. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.js.map +7 -0
  342. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +2 -0
  343. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +7 -0
  344. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.js +2 -0
  345. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.js.map +7 -0
  346. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +2 -0
  347. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +7 -0
  348. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.js +2 -0
  349. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.js.map +7 -0
  350. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +2 -0
  351. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +7 -0
  352. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +2 -0
  353. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +7 -0
  354. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +2 -0
  355. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +7 -0
  356. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +2 -0
  357. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +7 -0
  358. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +2 -0
  359. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +7 -0
  360. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js +2 -0
  361. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +7 -0
  362. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +2 -0
  363. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +7 -0
  364. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js +2 -0
  365. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +7 -0
  366. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +2 -0
  367. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +7 -0
  368. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +2 -0
  369. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +7 -0
  370. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +2 -0
  371. package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +7 -0
  372. package/lib/cjs/src/internal/logger-publisher/di/loggerTypes.js +2 -0
  373. package/lib/cjs/src/internal/logger-publisher/di/loggerTypes.js.map +7 -0
  374. package/lib/cjs/src/internal/logger-publisher/model/LogPublisherOptions.js +2 -0
  375. package/lib/cjs/src/internal/logger-publisher/model/LogPublisherOptions.js.map +7 -0
  376. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js +2 -0
  377. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js.map +7 -0
  378. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +2 -0
  379. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +7 -0
  380. package/lib/cjs/src/internal/logger-publisher/service/LoggerPublisherService.js +2 -0
  381. package/lib/cjs/src/internal/logger-publisher/service/LoggerPublisherService.js.map +7 -0
  382. package/lib/cjs/src/internal/logger-publisher/service/__mocks__/DefaultLoggerService.js +2 -0
  383. package/lib/cjs/src/internal/logger-publisher/service/__mocks__/DefaultLoggerService.js.map +7 -0
  384. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +2 -0
  385. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +7 -0
  386. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +2 -0
  387. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +7 -0
  388. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +2 -0
  389. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +7 -0
  390. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js +2 -0
  391. package/lib/cjs/src/internal/manager-api/data/ManagerApiDto.js.map +7 -0
  392. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +2 -0
  393. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +7 -0
  394. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +2 -0
  395. package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +7 -0
  396. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +2 -0
  397. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +7 -0
  398. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js +2 -0
  399. package/lib/cjs/src/internal/manager-api/di/managerApiTypes.js.map +7 -0
  400. package/lib/cjs/src/internal/manager-api/model/Const.js +2 -0
  401. package/lib/cjs/src/internal/manager-api/model/Const.js.map +7 -0
  402. package/lib/cjs/src/internal/manager-api/model/Errors.js +2 -0
  403. package/lib/cjs/src/internal/manager-api/model/Errors.js.map +7 -0
  404. package/lib/cjs/src/internal/manager-api/model/ManagerApiType.js +2 -0
  405. package/lib/cjs/src/internal/manager-api/model/ManagerApiType.js.map +7 -0
  406. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +2 -0
  407. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +7 -0
  408. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +2 -0
  409. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +7 -0
  410. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js +2 -0
  411. package/lib/cjs/src/internal/manager-api/service/ManagerApiService.js.map +7 -0
  412. package/lib/cjs/src/internal/send/di/sendModule.js +2 -0
  413. package/lib/cjs/src/internal/send/di/sendModule.js.map +7 -0
  414. package/lib/cjs/src/internal/send/di/sendModule.test.js +2 -0
  415. package/lib/cjs/src/internal/send/di/sendModule.test.js.map +7 -0
  416. package/lib/cjs/src/internal/send/di/sendTypes.js +2 -0
  417. package/lib/cjs/src/internal/send/di/sendTypes.js.map +7 -0
  418. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +2 -0
  419. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +7 -0
  420. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js +2 -0
  421. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js.map +7 -0
  422. package/lib/cjs/src/internal/transport/ble/di/bleDiTypes.js +2 -0
  423. package/lib/cjs/src/internal/transport/ble/di/bleDiTypes.js.map +7 -0
  424. package/lib/cjs/src/internal/transport/ble/di/bleModule.js +2 -0
  425. package/lib/cjs/src/internal/transport/ble/di/bleModule.js.map +7 -0
  426. package/lib/cjs/src/internal/transport/ble/di/bleModule.test.js +2 -0
  427. package/lib/cjs/src/internal/transport/ble/di/bleModule.test.js.map +7 -0
  428. package/lib/cjs/src/internal/transport/ble/model/BleDevice.stub.js +2 -0
  429. package/lib/cjs/src/internal/transport/ble/model/BleDevice.stub.js.map +7 -0
  430. package/lib/cjs/src/internal/transport/ble/model/BleDeviceInfos.js +2 -0
  431. package/lib/cjs/src/internal/transport/ble/model/BleDeviceInfos.js.map +7 -0
  432. package/lib/cjs/src/internal/transport/ble/service/BleDeviceConnectionFactory.js +2 -0
  433. package/lib/cjs/src/internal/transport/ble/service/BleDeviceConnectionFactory.js.map +7 -0
  434. package/lib/cjs/src/internal/transport/ble/service/BleDeviceConnectionFactory.stub.js +2 -0
  435. package/lib/cjs/src/internal/transport/ble/service/BleDeviceConnectionFactory.stub.js.map +7 -0
  436. package/lib/cjs/src/internal/transport/ble/transport/BleDeviceConnection.js +2 -0
  437. package/lib/cjs/src/internal/transport/ble/transport/BleDeviceConnection.js.map +7 -0
  438. package/lib/cjs/src/internal/transport/ble/transport/BleDeviceConnection.test.js +2 -0
  439. package/lib/cjs/src/internal/transport/ble/transport/BleDeviceConnection.test.js.map +7 -0
  440. package/lib/cjs/src/internal/transport/ble/transport/WebBleTransport.js +2 -0
  441. package/lib/cjs/src/internal/transport/ble/transport/WebBleTransport.js.map +7 -0
  442. package/lib/cjs/src/internal/transport/ble/transport/WebBleTransport.test.js +2 -0
  443. package/lib/cjs/src/internal/transport/ble/transport/WebBleTransport.test.js.map +7 -0
  444. package/lib/cjs/src/internal/transport/ble/transport/__mocks__/WebBleTransport.js +2 -0
  445. package/lib/cjs/src/internal/transport/ble/transport/__mocks__/WebBleTransport.js.map +7 -0
  446. package/lib/cjs/src/internal/transport/data/TransportDataSource.js +2 -0
  447. package/lib/cjs/src/internal/transport/data/TransportDataSource.js.map +7 -0
  448. package/lib/cjs/src/internal/transport/di/transportDiTypes.js +2 -0
  449. package/lib/cjs/src/internal/transport/di/transportDiTypes.js.map +7 -0
  450. package/lib/cjs/src/internal/transport/di/transportModule.js +2 -0
  451. package/lib/cjs/src/internal/transport/di/transportModule.js.map +7 -0
  452. package/lib/cjs/src/internal/transport/mockserver/MockserverTransport.js +2 -0
  453. package/lib/cjs/src/internal/transport/mockserver/MockserverTransport.js.map +7 -0
  454. package/lib/cjs/src/internal/transport/model/DeviceConnection.js +2 -0
  455. package/lib/cjs/src/internal/transport/model/DeviceConnection.js.map +7 -0
  456. package/lib/cjs/src/internal/transport/model/Errors.js +2 -0
  457. package/lib/cjs/src/internal/transport/model/Errors.js.map +7 -0
  458. package/lib/cjs/src/internal/transport/model/InternalConnectedDevice.js +2 -0
  459. package/lib/cjs/src/internal/transport/model/InternalConnectedDevice.js.map +7 -0
  460. package/lib/cjs/src/internal/transport/model/InternalConnectedDevice.stub.js +2 -0
  461. package/lib/cjs/src/internal/transport/model/InternalConnectedDevice.stub.js.map +7 -0
  462. package/lib/cjs/src/internal/transport/model/InternalConnectedDevice.test.js +2 -0
  463. package/lib/cjs/src/internal/transport/model/InternalConnectedDevice.test.js.map +7 -0
  464. package/lib/cjs/src/internal/transport/model/InternalDiscoveredDevice.js +2 -0
  465. package/lib/cjs/src/internal/transport/model/InternalDiscoveredDevice.js.map +7 -0
  466. package/lib/cjs/src/internal/transport/usb/data/UsbHidConfig.js +2 -0
  467. package/lib/cjs/src/internal/transport/usb/data/UsbHidConfig.js.map +7 -0
  468. package/lib/cjs/src/internal/transport/usb/di/usbDiTypes.js +2 -0
  469. package/lib/cjs/src/internal/transport/usb/di/usbDiTypes.js.map +7 -0
  470. package/lib/cjs/src/internal/transport/usb/di/usbModule.js +2 -0
  471. package/lib/cjs/src/internal/transport/usb/di/usbModule.js.map +7 -0
  472. package/lib/cjs/src/internal/transport/usb/di/usbModule.test.js +2 -0
  473. package/lib/cjs/src/internal/transport/usb/di/usbModule.test.js.map +7 -0
  474. package/lib/cjs/src/internal/transport/usb/model/HIDDevice.stub.js +2 -0
  475. package/lib/cjs/src/internal/transport/usb/model/HIDDevice.stub.js.map +7 -0
  476. package/lib/cjs/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.js +2 -0
  477. package/lib/cjs/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.js.map +7 -0
  478. package/lib/cjs/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.stub.js +2 -0
  479. package/lib/cjs/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.stub.js.map +7 -0
  480. package/lib/cjs/src/internal/transport/usb/transport/UsbHidDeviceConnection.js +2 -0
  481. package/lib/cjs/src/internal/transport/usb/transport/UsbHidDeviceConnection.js.map +7 -0
  482. package/lib/cjs/src/internal/transport/usb/transport/UsbHidDeviceConnection.test.js +2 -0
  483. package/lib/cjs/src/internal/transport/usb/transport/UsbHidDeviceConnection.test.js.map +7 -0
  484. package/lib/cjs/src/internal/transport/usb/transport/WebUsbHidTransport.js +2 -0
  485. package/lib/cjs/src/internal/transport/usb/transport/WebUsbHidTransport.js.map +7 -0
  486. package/lib/cjs/src/internal/transport/usb/transport/WebUsbHidTransport.test.js +2 -0
  487. package/lib/cjs/src/internal/transport/usb/transport/WebUsbHidTransport.test.js.map +7 -0
  488. package/lib/cjs/src/internal/transport/usb/transport/__mocks__/WebUsbHidTransport.js +2 -0
  489. package/lib/cjs/src/internal/transport/usb/transport/__mocks__/WebUsbHidTransport.js.map +7 -0
  490. package/lib/esm/index.js +1 -26507
  491. package/lib/esm/index.js.map +4 -4
  492. package/lib/esm/package.json +64 -0
  493. package/lib/esm/src/api/DeviceManagementKit.js +2 -0
  494. package/lib/esm/src/api/DeviceManagementKit.js.map +7 -0
  495. package/lib/esm/src/api/DeviceManagementKit.test.js +2 -0
  496. package/lib/esm/src/api/DeviceManagementKit.test.js.map +7 -0
  497. package/lib/esm/src/api/DeviceManagementKitBuilder.js +2 -0
  498. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +7 -0
  499. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js +2 -0
  500. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js.map +7 -0
  501. package/lib/esm/src/api/DmkConfig.js +1 -0
  502. package/lib/esm/src/api/DmkConfig.js.map +7 -0
  503. package/lib/esm/src/api/Error.js +2 -0
  504. package/lib/esm/src/api/Error.js.map +7 -0
  505. package/lib/esm/src/api/apdu/model/Apdu.js +2 -0
  506. package/lib/esm/src/api/apdu/model/Apdu.js.map +7 -0
  507. package/lib/esm/src/api/apdu/model/Apdu.test.js +2 -0
  508. package/lib/esm/src/api/apdu/model/Apdu.test.js.map +7 -0
  509. package/lib/esm/src/api/apdu/utils/ApduBuilder.js +2 -0
  510. package/lib/esm/src/api/apdu/utils/ApduBuilder.js.map +7 -0
  511. package/lib/esm/src/api/apdu/utils/ApduBuilder.test.js +2 -0
  512. package/lib/esm/src/api/apdu/utils/ApduBuilder.test.js.map +7 -0
  513. package/lib/esm/src/api/apdu/utils/ApduParser.js +2 -0
  514. package/lib/esm/src/api/apdu/utils/ApduParser.js.map +7 -0
  515. package/lib/esm/src/api/apdu/utils/ApduParser.test.js +2 -0
  516. package/lib/esm/src/api/apdu/utils/ApduParser.test.js.map +7 -0
  517. package/lib/esm/src/api/apdu/utils/AppBuilderError.js +2 -0
  518. package/lib/esm/src/api/apdu/utils/AppBuilderError.js.map +7 -0
  519. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js +2 -0
  520. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js.map +7 -0
  521. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js +2 -0
  522. package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js.map +7 -0
  523. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js +2 -0
  524. package/lib/esm/src/api/apdu/utils/ByteArrayParser.js.map +7 -0
  525. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js +2 -0
  526. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js.map +7 -0
  527. package/lib/esm/src/api/command/Command.js +1 -0
  528. package/lib/esm/src/api/command/Command.js.map +7 -0
  529. package/lib/esm/src/api/command/Errors.js +2 -0
  530. package/lib/esm/src/api/command/Errors.js.map +7 -0
  531. package/lib/esm/src/api/command/di/commandModule.js +2 -0
  532. package/lib/esm/src/api/command/di/commandModule.js.map +7 -0
  533. package/lib/esm/src/api/command/di/commandModule.test.js +2 -0
  534. package/lib/esm/src/api/command/di/commandModule.test.js.map +7 -0
  535. package/lib/esm/src/api/command/di/commandTypes.js +2 -0
  536. package/lib/esm/src/api/command/di/commandTypes.js.map +7 -0
  537. package/lib/esm/src/api/command/model/CommandResult.js +2 -0
  538. package/lib/esm/src/api/command/model/CommandResult.js.map +7 -0
  539. package/lib/esm/src/api/command/model/CommandResult.test.js +2 -0
  540. package/lib/esm/src/api/command/model/CommandResult.test.js.map +7 -0
  541. package/lib/esm/src/api/command/os/CloseAppCommand.js +2 -0
  542. package/lib/esm/src/api/command/os/CloseAppCommand.js.map +7 -0
  543. package/lib/esm/src/api/command/os/CloseAppCommand.test.js +2 -0
  544. package/lib/esm/src/api/command/os/CloseAppCommand.test.js.map +7 -0
  545. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.js +2 -0
  546. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.js.map +7 -0
  547. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.test.js +2 -0
  548. package/lib/esm/src/api/command/os/GetAppAndVersionCommand.test.js.map +7 -0
  549. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.js +2 -0
  550. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.js.map +7 -0
  551. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.test.js +2 -0
  552. package/lib/esm/src/api/command/os/GetBatteryStatusCommand.test.js.map +7 -0
  553. package/lib/esm/src/api/command/os/GetOsVersionCommand.js +2 -0
  554. package/lib/esm/src/api/command/os/GetOsVersionCommand.js.map +7 -0
  555. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js +2 -0
  556. package/lib/esm/src/api/command/os/GetOsVersionCommand.test.js.map +7 -0
  557. package/lib/esm/src/api/command/os/ListAppsCommand.js +2 -0
  558. package/lib/esm/src/api/command/os/ListAppsCommand.js.map +7 -0
  559. package/lib/esm/src/api/command/os/ListAppsCommand.test.js +2 -0
  560. package/lib/esm/src/api/command/os/ListAppsCommand.test.js.map +7 -0
  561. package/lib/esm/src/api/command/os/OpenAppCommand.js +2 -0
  562. package/lib/esm/src/api/command/os/OpenAppCommand.js.map +7 -0
  563. package/lib/esm/src/api/command/os/OpenAppCommand.test.js +2 -0
  564. package/lib/esm/src/api/command/os/OpenAppCommand.test.js.map +7 -0
  565. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js +2 -0
  566. package/lib/esm/src/api/command/use-case/SendCommandUseCase.js.map +7 -0
  567. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js +2 -0
  568. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js.map +7 -0
  569. package/lib/esm/src/api/command/utils/CommandErrors.js +2 -0
  570. package/lib/esm/src/api/command/utils/CommandErrors.js.map +7 -0
  571. package/lib/esm/src/api/command/utils/CommandUtils.js +2 -0
  572. package/lib/esm/src/api/command/utils/CommandUtils.js.map +7 -0
  573. package/lib/esm/src/api/command/utils/CommandUtils.test.js +2 -0
  574. package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +7 -0
  575. package/lib/esm/src/api/command/utils/GlobalCommandError.js +2 -0
  576. package/lib/esm/src/api/command/utils/GlobalCommandError.js.map +7 -0
  577. package/lib/esm/src/api/command/utils/GlobalCommandError.test.js +2 -0
  578. package/lib/esm/src/api/command/utils/GlobalCommandError.test.js.map +7 -0
  579. package/lib/esm/src/api/device/DeviceModel.js +2 -0
  580. package/lib/esm/src/api/device/DeviceModel.js.map +7 -0
  581. package/lib/esm/src/api/device/DeviceStatus.js +2 -0
  582. package/lib/esm/src/api/device/DeviceStatus.js.map +7 -0
  583. package/lib/esm/src/api/device-action/DeviceAction.js +1 -0
  584. package/lib/esm/src/api/device-action/DeviceAction.js.map +7 -0
  585. package/lib/esm/src/api/device-action/__test-utils__/data.js +2 -0
  586. package/lib/esm/src/api/device-action/__test-utils__/data.js.map +7 -0
  587. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +2 -0
  588. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +7 -0
  589. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +2 -0
  590. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +7 -0
  591. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js +2 -0
  592. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +7 -0
  593. package/lib/esm/src/api/device-action/di/deviceActionModule.js +2 -0
  594. package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +7 -0
  595. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +2 -0
  596. package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +7 -0
  597. package/lib/esm/src/api/device-action/di/deviceActionTypes.js +2 -0
  598. package/lib/esm/src/api/device-action/di/deviceActionTypes.js.map +7 -0
  599. package/lib/esm/src/api/device-action/model/DeviceActionState.js +2 -0
  600. package/lib/esm/src/api/device-action/model/DeviceActionState.js.map +7 -0
  601. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +2 -0
  602. package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +7 -0
  603. package/lib/esm/src/api/device-action/os/Const.js +2 -0
  604. package/lib/esm/src/api/device-action/os/Const.js.map +7 -0
  605. package/lib/esm/src/api/device-action/os/Errors.js +2 -0
  606. package/lib/esm/src/api/device-action/os/Errors.js.map +7 -0
  607. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +2 -0
  608. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +7 -0
  609. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +2 -0
  610. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +7 -0
  611. package/lib/esm/src/api/device-action/os/GetDeviceStatus/types.js +1 -0
  612. package/lib/esm/src/api/device-action/os/GetDeviceStatus/types.js.map +7 -0
  613. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +2 -0
  614. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +7 -0
  615. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +2 -0
  616. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +7 -0
  617. package/lib/esm/src/api/device-action/os/GoToDashboard/types.js +1 -0
  618. package/lib/esm/src/api/device-action/os/GoToDashboard/types.js.map +7 -0
  619. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js +2 -0
  620. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.js.map +7 -0
  621. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +2 -0
  622. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +7 -0
  623. package/lib/esm/src/api/device-action/os/ListApps/types.js +1 -0
  624. package/lib/esm/src/api/device-action/os/ListApps/types.js.map +7 -0
  625. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +2 -0
  626. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +7 -0
  627. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +2 -0
  628. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +7 -0
  629. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/types.js +1 -0
  630. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/types.js.map +7 -0
  631. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +2 -0
  632. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +7 -0
  633. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +2 -0
  634. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +7 -0
  635. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/types.js +1 -0
  636. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/types.js.map +7 -0
  637. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +2 -0
  638. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +7 -0
  639. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +2 -0
  640. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +7 -0
  641. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js +1 -0
  642. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +7 -0
  643. package/lib/esm/src/api/device-action/use-case/ExecuteDeviceActionUseCase.js +2 -0
  644. package/lib/esm/src/api/device-action/use-case/ExecuteDeviceActionUseCase.js.map +7 -0
  645. package/lib/esm/src/api/device-action/xstate-utils/StateMachineTypes.js +1 -0
  646. package/lib/esm/src/api/device-action/xstate-utils/StateMachineTypes.js.map +7 -0
  647. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +2 -0
  648. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +7 -0
  649. package/lib/esm/src/api/device-session/ApduResponse.js +2 -0
  650. package/lib/esm/src/api/device-session/ApduResponse.js.map +7 -0
  651. package/lib/esm/src/api/device-session/ApduResponse.stub.js +2 -0
  652. package/lib/esm/src/api/device-session/ApduResponse.stub.js.map +7 -0
  653. package/lib/esm/src/api/device-session/DeviceSessionState.js +2 -0
  654. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +7 -0
  655. package/lib/esm/src/api/device-session/types.js +1 -0
  656. package/lib/esm/src/api/device-session/types.js.map +7 -0
  657. package/lib/esm/src/api/discovery/ConnectionType.js +1 -0
  658. package/lib/esm/src/api/discovery/ConnectionType.js.map +7 -0
  659. package/lib/esm/src/api/index.js +2 -0
  660. package/lib/esm/src/api/index.js.map +7 -0
  661. package/lib/esm/src/api/logger-subscriber/__mocks__/ConsoleLogger.js +2 -0
  662. package/lib/esm/src/api/logger-subscriber/__mocks__/ConsoleLogger.js.map +7 -0
  663. package/lib/esm/src/api/logger-subscriber/model/LogLevel.js +2 -0
  664. package/lib/esm/src/api/logger-subscriber/model/LogLevel.js.map +7 -0
  665. package/lib/esm/src/api/logger-subscriber/model/LogSubscriberOptions.js +1 -0
  666. package/lib/esm/src/api/logger-subscriber/model/LogSubscriberOptions.js.map +7 -0
  667. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.js +2 -0
  668. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.js.map +7 -0
  669. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js +2 -0
  670. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +7 -0
  671. package/lib/esm/src/api/logger-subscriber/service/LoggerSubscriberService.js +1 -0
  672. package/lib/esm/src/api/logger-subscriber/service/LoggerSubscriberService.js.map +7 -0
  673. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.js +2 -0
  674. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.js.map +7 -0
  675. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +2 -0
  676. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +7 -0
  677. package/lib/esm/src/api/transport/model/ConnectedDevice.js +2 -0
  678. package/lib/esm/src/api/transport/model/ConnectedDevice.js.map +7 -0
  679. package/lib/esm/src/api/transport/model/DiscoveredDevice.js +1 -0
  680. package/lib/esm/src/api/transport/model/DiscoveredDevice.js.map +7 -0
  681. package/lib/esm/src/api/transport/model/Transport.js +1 -0
  682. package/lib/esm/src/api/transport/model/Transport.js.map +7 -0
  683. package/lib/esm/src/api/transport/model/TransportIdentifier.js +2 -0
  684. package/lib/esm/src/api/transport/model/TransportIdentifier.js.map +7 -0
  685. package/lib/esm/src/api/types.js +1 -0
  686. package/lib/esm/src/api/types.js.map +7 -0
  687. package/lib/esm/src/api/utils/Base64String.js +2 -0
  688. package/lib/esm/src/api/utils/Base64String.js.map +7 -0
  689. package/lib/esm/src/api/utils/Base64String.test.js +2 -0
  690. package/lib/esm/src/api/utils/Base64String.test.js.map +7 -0
  691. package/lib/esm/src/api/utils/HexaString.js +2 -0
  692. package/lib/esm/src/api/utils/HexaString.js.map +7 -0
  693. package/lib/esm/src/api/utils/HexaString.test.js +2 -0
  694. package/lib/esm/src/api/utils/HexaString.test.js.map +7 -0
  695. package/lib/esm/src/di.js +2 -0
  696. package/lib/esm/src/di.js.map +7 -0
  697. package/lib/esm/src/di.stub.js +2 -0
  698. package/lib/esm/src/di.stub.js.map +7 -0
  699. package/lib/esm/src/index.js +2 -0
  700. package/lib/esm/src/index.js.map +7 -0
  701. package/lib/esm/src/internal/config/data/ConfigDataSource.js +1 -0
  702. package/lib/esm/src/internal/config/data/ConfigDataSource.js.map +7 -0
  703. package/lib/esm/src/internal/config/data/Dto.js +1 -0
  704. package/lib/esm/src/internal/config/data/Dto.js.map +7 -0
  705. package/lib/esm/src/internal/config/data/LocalConfigDataSource.js +2 -0
  706. package/lib/esm/src/internal/config/data/LocalConfigDataSource.js.map +7 -0
  707. package/lib/esm/src/internal/config/data/LocalConfigDataSource.stub.js +2 -0
  708. package/lib/esm/src/internal/config/data/LocalConfigDataSource.stub.js.map +7 -0
  709. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js +2 -0
  710. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js.map +7 -0
  711. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.js +2 -0
  712. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.js.map +7 -0
  713. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.stub.js +2 -0
  714. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.stub.js.map +7 -0
  715. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js +2 -0
  716. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js.map +7 -0
  717. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js +2 -0
  718. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +7 -0
  719. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +2 -0
  720. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +7 -0
  721. package/lib/esm/src/internal/config/di/configModule.js +2 -0
  722. package/lib/esm/src/internal/config/di/configModule.js.map +7 -0
  723. package/lib/esm/src/internal/config/di/configModule.test.js +2 -0
  724. package/lib/esm/src/internal/config/di/configModule.test.js.map +7 -0
  725. package/lib/esm/src/internal/config/di/configTypes.js +2 -0
  726. package/lib/esm/src/internal/config/di/configTypes.js.map +7 -0
  727. package/lib/esm/src/internal/config/model/Config.js +2 -0
  728. package/lib/esm/src/internal/config/model/Config.js.map +7 -0
  729. package/lib/esm/src/internal/config/model/Errors.js +2 -0
  730. package/lib/esm/src/internal/config/model/Errors.js.map +7 -0
  731. package/lib/esm/src/internal/config/service/ConfigService.js +1 -0
  732. package/lib/esm/src/internal/config/service/ConfigService.js.map +7 -0
  733. package/lib/esm/src/internal/config/service/DefaultConfigService.js +2 -0
  734. package/lib/esm/src/internal/config/service/DefaultConfigService.js.map +7 -0
  735. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js +2 -0
  736. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js.map +7 -0
  737. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.js +2 -0
  738. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.js.map +7 -0
  739. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js +2 -0
  740. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +7 -0
  741. package/lib/esm/src/internal/device-model/data/DeviceModelDataSource.js +1 -0
  742. package/lib/esm/src/internal/device-model/data/DeviceModelDataSource.js.map +7 -0
  743. package/lib/esm/src/internal/device-model/data/StaticDeviceModelDataSource.js +2 -0
  744. package/lib/esm/src/internal/device-model/data/StaticDeviceModelDataSource.js.map +7 -0
  745. package/lib/esm/src/internal/device-model/data/StaticDeviceModelDataSource.test.js +2 -0
  746. package/lib/esm/src/internal/device-model/data/StaticDeviceModelDataSource.test.js.map +7 -0
  747. package/lib/esm/src/internal/device-model/di/deviceModelModule.js +2 -0
  748. package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +7 -0
  749. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +2 -0
  750. package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +7 -0
  751. package/lib/esm/src/internal/device-model/di/deviceModelTypes.js +2 -0
  752. package/lib/esm/src/internal/device-model/di/deviceModelTypes.js.map +7 -0
  753. package/lib/esm/src/internal/device-model/model/DeviceModel.js +2 -0
  754. package/lib/esm/src/internal/device-model/model/DeviceModel.js.map +7 -0
  755. package/lib/esm/src/internal/device-model/model/DeviceModel.stub.js +2 -0
  756. package/lib/esm/src/internal/device-model/model/DeviceModel.stub.js.map +7 -0
  757. package/lib/esm/src/internal/device-model/model/DeviceModel.test.js +2 -0
  758. package/lib/esm/src/internal/device-model/model/DeviceModel.test.js.map +7 -0
  759. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js +2 -0
  760. package/lib/esm/src/internal/device-session/data/ApduResponseConst.js.map +7 -0
  761. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js +2 -0
  762. package/lib/esm/src/internal/device-session/data/DeviceSessionRefresherConst.js.map +7 -0
  763. package/lib/esm/src/internal/device-session/data/FramerConst.js +2 -0
  764. package/lib/esm/src/internal/device-session/data/FramerConst.js.map +7 -0
  765. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +2 -0
  766. package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +7 -0
  767. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +2 -0
  768. package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +7 -0
  769. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js +2 -0
  770. package/lib/esm/src/internal/device-session/di/deviceSessionTypes.js.map +7 -0
  771. package/lib/esm/src/internal/device-session/model/DeviceSession.js +2 -0
  772. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +7 -0
  773. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js +2 -0
  774. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js.map +7 -0
  775. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js +2 -0
  776. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.js.map +7 -0
  777. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js +2 -0
  778. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +7 -0
  779. package/lib/esm/src/internal/device-session/model/Errors.js +2 -0
  780. package/lib/esm/src/internal/device-session/model/Errors.js.map +7 -0
  781. package/lib/esm/src/internal/device-session/model/Frame.js +2 -0
  782. package/lib/esm/src/internal/device-session/model/Frame.js.map +7 -0
  783. package/lib/esm/src/internal/device-session/model/FrameHeader.js +2 -0
  784. package/lib/esm/src/internal/device-session/model/FrameHeader.js.map +7 -0
  785. package/lib/esm/src/internal/device-session/service/ApduReceiverService.js +1 -0
  786. package/lib/esm/src/internal/device-session/service/ApduReceiverService.js.map +7 -0
  787. package/lib/esm/src/internal/device-session/service/ApduSenderService.js +1 -0
  788. package/lib/esm/src/internal/device-session/service/ApduSenderService.js.map +7 -0
  789. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js +2 -0
  790. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js.map +7 -0
  791. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.stub.js +2 -0
  792. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.stub.js.map +7 -0
  793. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js +2 -0
  794. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +7 -0
  795. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js +2 -0
  796. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js.map +7 -0
  797. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.stub.js +2 -0
  798. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.stub.js.map +7 -0
  799. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +2 -0
  800. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +7 -0
  801. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.js +2 -0
  802. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.js.map +7 -0
  803. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js +2 -0
  804. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +7 -0
  805. package/lib/esm/src/internal/device-session/service/DeviceSessionService.js +1 -0
  806. package/lib/esm/src/internal/device-session/service/DeviceSessionService.js.map +7 -0
  807. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js +2 -0
  808. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.js.map +7 -0
  809. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseState.test.js +2 -0
  810. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseState.test.js.map +7 -0
  811. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.js +2 -0
  812. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.js.map +7 -0
  813. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +2 -0
  814. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +7 -0
  815. package/lib/esm/src/internal/device-session/utils/FramerUtils.js +2 -0
  816. package/lib/esm/src/internal/device-session/utils/FramerUtils.js.map +7 -0
  817. package/lib/esm/src/internal/device-session/utils/FramerUtils.test.js +2 -0
  818. package/lib/esm/src/internal/device-session/utils/FramerUtils.test.js.map +7 -0
  819. package/lib/esm/src/internal/discovery/di/discoveryModule.js +2 -0
  820. package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +7 -0
  821. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +2 -0
  822. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +7 -0
  823. package/lib/esm/src/internal/discovery/di/discoveryTypes.js +2 -0
  824. package/lib/esm/src/internal/discovery/di/discoveryTypes.js.map +7 -0
  825. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js +2 -0
  826. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js.map +7 -0
  827. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js +2 -0
  828. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js.map +7 -0
  829. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.js +2 -0
  830. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.js.map +7 -0
  831. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +2 -0
  832. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +7 -0
  833. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.js +2 -0
  834. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.js.map +7 -0
  835. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +2 -0
  836. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +7 -0
  837. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.js +2 -0
  838. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.js.map +7 -0
  839. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +2 -0
  840. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +7 -0
  841. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js +2 -0
  842. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.js.map +7 -0
  843. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +2 -0
  844. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +7 -0
  845. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js +2 -0
  846. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.js.map +7 -0
  847. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +2 -0
  848. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +7 -0
  849. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js +2 -0
  850. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.js.map +7 -0
  851. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +2 -0
  852. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +7 -0
  853. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js +2 -0
  854. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.js.map +7 -0
  855. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +2 -0
  856. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +7 -0
  857. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +2 -0
  858. package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +7 -0
  859. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +2 -0
  860. package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +7 -0
  861. package/lib/esm/src/internal/logger-publisher/di/loggerTypes.js +2 -0
  862. package/lib/esm/src/internal/logger-publisher/di/loggerTypes.js.map +7 -0
  863. package/lib/esm/src/internal/logger-publisher/model/LogPublisherOptions.js +1 -0
  864. package/lib/esm/src/internal/logger-publisher/model/LogPublisherOptions.js.map +7 -0
  865. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js +2 -0
  866. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js.map +7 -0
  867. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +2 -0
  868. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +7 -0
  869. package/lib/esm/src/internal/logger-publisher/service/LoggerPublisherService.js +1 -0
  870. package/lib/esm/src/internal/logger-publisher/service/LoggerPublisherService.js.map +7 -0
  871. package/lib/esm/src/internal/logger-publisher/service/__mocks__/DefaultLoggerService.js +2 -0
  872. package/lib/esm/src/internal/logger-publisher/service/__mocks__/DefaultLoggerService.js.map +7 -0
  873. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +2 -0
  874. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +7 -0
  875. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +2 -0
  876. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +7 -0
  877. package/lib/esm/src/internal/manager-api/data/ManagerApiDataSource.js +1 -0
  878. package/lib/esm/src/internal/manager-api/data/ManagerApiDataSource.js.map +7 -0
  879. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js +2 -0
  880. package/lib/esm/src/internal/manager-api/data/ManagerApiDto.js.map +7 -0
  881. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +2 -0
  882. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +7 -0
  883. package/lib/esm/src/internal/manager-api/di/managerApiModule.js +2 -0
  884. package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +7 -0
  885. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +2 -0
  886. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +7 -0
  887. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js +2 -0
  888. package/lib/esm/src/internal/manager-api/di/managerApiTypes.js.map +7 -0
  889. package/lib/esm/src/internal/manager-api/model/Const.js +2 -0
  890. package/lib/esm/src/internal/manager-api/model/Const.js.map +7 -0
  891. package/lib/esm/src/internal/manager-api/model/Errors.js +2 -0
  892. package/lib/esm/src/internal/manager-api/model/Errors.js.map +7 -0
  893. package/lib/esm/src/internal/manager-api/model/ManagerApiType.js +2 -0
  894. package/lib/esm/src/internal/manager-api/model/ManagerApiType.js.map +7 -0
  895. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +2 -0
  896. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +7 -0
  897. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +2 -0
  898. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +7 -0
  899. package/lib/esm/src/internal/manager-api/service/ManagerApiService.js +1 -0
  900. package/lib/esm/src/internal/manager-api/service/ManagerApiService.js.map +7 -0
  901. package/lib/esm/src/internal/send/di/sendModule.js +2 -0
  902. package/lib/esm/src/internal/send/di/sendModule.js.map +7 -0
  903. package/lib/esm/src/internal/send/di/sendModule.test.js +2 -0
  904. package/lib/esm/src/internal/send/di/sendModule.test.js.map +7 -0
  905. package/lib/esm/src/internal/send/di/sendTypes.js +2 -0
  906. package/lib/esm/src/internal/send/di/sendTypes.js.map +7 -0
  907. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +2 -0
  908. package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +7 -0
  909. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js +2 -0
  910. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js.map +7 -0
  911. package/lib/esm/src/internal/transport/ble/di/bleDiTypes.js +2 -0
  912. package/lib/esm/src/internal/transport/ble/di/bleDiTypes.js.map +7 -0
  913. package/lib/esm/src/internal/transport/ble/di/bleModule.js +2 -0
  914. package/lib/esm/src/internal/transport/ble/di/bleModule.js.map +7 -0
  915. package/lib/esm/src/internal/transport/ble/di/bleModule.test.js +2 -0
  916. package/lib/esm/src/internal/transport/ble/di/bleModule.test.js.map +7 -0
  917. package/lib/esm/src/internal/transport/ble/model/BleDevice.stub.js +2 -0
  918. package/lib/esm/src/internal/transport/ble/model/BleDevice.stub.js.map +7 -0
  919. package/lib/esm/src/internal/transport/ble/model/BleDeviceInfos.js +2 -0
  920. package/lib/esm/src/internal/transport/ble/model/BleDeviceInfos.js.map +7 -0
  921. package/lib/esm/src/internal/transport/ble/service/BleDeviceConnectionFactory.js +2 -0
  922. package/lib/esm/src/internal/transport/ble/service/BleDeviceConnectionFactory.js.map +7 -0
  923. package/lib/esm/src/internal/transport/ble/service/BleDeviceConnectionFactory.stub.js +2 -0
  924. package/lib/esm/src/internal/transport/ble/service/BleDeviceConnectionFactory.stub.js.map +7 -0
  925. package/lib/esm/src/internal/transport/ble/transport/BleDeviceConnection.js +2 -0
  926. package/lib/esm/src/internal/transport/ble/transport/BleDeviceConnection.js.map +7 -0
  927. package/lib/esm/src/internal/transport/ble/transport/BleDeviceConnection.test.js +2 -0
  928. package/lib/esm/src/internal/transport/ble/transport/BleDeviceConnection.test.js.map +7 -0
  929. package/lib/esm/src/internal/transport/ble/transport/WebBleTransport.js +2 -0
  930. package/lib/esm/src/internal/transport/ble/transport/WebBleTransport.js.map +7 -0
  931. package/lib/esm/src/internal/transport/ble/transport/WebBleTransport.test.js +2 -0
  932. package/lib/esm/src/internal/transport/ble/transport/WebBleTransport.test.js.map +7 -0
  933. package/lib/esm/src/internal/transport/ble/transport/__mocks__/WebBleTransport.js +2 -0
  934. package/lib/esm/src/internal/transport/ble/transport/__mocks__/WebBleTransport.js.map +7 -0
  935. package/lib/esm/src/internal/transport/data/TransportDataSource.js +2 -0
  936. package/lib/esm/src/internal/transport/data/TransportDataSource.js.map +7 -0
  937. package/lib/esm/src/internal/transport/di/transportDiTypes.js +2 -0
  938. package/lib/esm/src/internal/transport/di/transportDiTypes.js.map +7 -0
  939. package/lib/esm/src/internal/transport/di/transportModule.js +2 -0
  940. package/lib/esm/src/internal/transport/di/transportModule.js.map +7 -0
  941. package/lib/esm/src/internal/transport/mockserver/MockserverTransport.js +2 -0
  942. package/lib/esm/src/internal/transport/mockserver/MockserverTransport.js.map +7 -0
  943. package/lib/esm/src/internal/transport/model/DeviceConnection.js +1 -0
  944. package/lib/esm/src/internal/transport/model/DeviceConnection.js.map +7 -0
  945. package/lib/esm/src/internal/transport/model/Errors.js +2 -0
  946. package/lib/esm/src/internal/transport/model/Errors.js.map +7 -0
  947. package/lib/esm/src/internal/transport/model/InternalConnectedDevice.js +2 -0
  948. package/lib/esm/src/internal/transport/model/InternalConnectedDevice.js.map +7 -0
  949. package/lib/esm/src/internal/transport/model/InternalConnectedDevice.stub.js +2 -0
  950. package/lib/esm/src/internal/transport/model/InternalConnectedDevice.stub.js.map +7 -0
  951. package/lib/esm/src/internal/transport/model/InternalConnectedDevice.test.js +2 -0
  952. package/lib/esm/src/internal/transport/model/InternalConnectedDevice.test.js.map +7 -0
  953. package/lib/esm/src/internal/transport/model/InternalDiscoveredDevice.js +1 -0
  954. package/lib/esm/src/internal/transport/model/InternalDiscoveredDevice.js.map +7 -0
  955. package/lib/esm/src/internal/transport/usb/data/UsbHidConfig.js +2 -0
  956. package/lib/esm/src/internal/transport/usb/data/UsbHidConfig.js.map +7 -0
  957. package/lib/esm/src/internal/transport/usb/di/usbDiTypes.js +2 -0
  958. package/lib/esm/src/internal/transport/usb/di/usbDiTypes.js.map +7 -0
  959. package/lib/esm/src/internal/transport/usb/di/usbModule.js +2 -0
  960. package/lib/esm/src/internal/transport/usb/di/usbModule.js.map +7 -0
  961. package/lib/esm/src/internal/transport/usb/di/usbModule.test.js +2 -0
  962. package/lib/esm/src/internal/transport/usb/di/usbModule.test.js.map +7 -0
  963. package/lib/esm/src/internal/transport/usb/model/HIDDevice.stub.js +2 -0
  964. package/lib/esm/src/internal/transport/usb/model/HIDDevice.stub.js.map +7 -0
  965. package/lib/esm/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.js +2 -0
  966. package/lib/esm/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.js.map +7 -0
  967. package/lib/esm/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.stub.js +2 -0
  968. package/lib/esm/src/internal/transport/usb/service/UsbHidDeviceConnectionFactory.stub.js.map +7 -0
  969. package/lib/esm/src/internal/transport/usb/transport/UsbHidDeviceConnection.js +2 -0
  970. package/lib/esm/src/internal/transport/usb/transport/UsbHidDeviceConnection.js.map +7 -0
  971. package/lib/esm/src/internal/transport/usb/transport/UsbHidDeviceConnection.test.js +2 -0
  972. package/lib/esm/src/internal/transport/usb/transport/UsbHidDeviceConnection.test.js.map +7 -0
  973. package/lib/esm/src/internal/transport/usb/transport/WebUsbHidTransport.js +2 -0
  974. package/lib/esm/src/internal/transport/usb/transport/WebUsbHidTransport.js.map +7 -0
  975. package/lib/esm/src/internal/transport/usb/transport/WebUsbHidTransport.test.js +2 -0
  976. package/lib/esm/src/internal/transport/usb/transport/WebUsbHidTransport.test.js.map +7 -0
  977. package/lib/esm/src/internal/transport/usb/transport/__mocks__/WebUsbHidTransport.js +2 -0
  978. package/lib/esm/src/internal/transport/usb/transport/__mocks__/WebUsbHidTransport.js.map +7 -0
  979. package/lib/types/src/api/{DeviceSdk.d.ts → DeviceManagementKit.d.ts} +38 -23
  980. package/lib/types/src/api/DeviceManagementKit.d.ts.map +1 -0
  981. package/lib/types/src/api/DeviceManagementKit.test.d.ts +2 -0
  982. package/lib/types/src/api/DeviceManagementKit.test.d.ts.map +1 -0
  983. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts +35 -0
  984. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -0
  985. package/lib/types/src/api/DeviceManagementKitBuilder.test.d.ts +2 -0
  986. package/lib/types/src/api/DeviceManagementKitBuilder.test.d.ts.map +1 -0
  987. package/lib/types/src/api/DmkConfig.d.ts +5 -0
  988. package/lib/types/src/api/DmkConfig.d.ts.map +1 -0
  989. package/lib/types/src/api/Error.d.ts +2 -2
  990. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts +1 -1
  991. package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
  992. package/lib/types/src/api/apdu/utils/ApduParser.d.ts +2 -2
  993. package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
  994. package/lib/types/src/api/apdu/utils/AppBuilderError.d.ts +5 -5
  995. package/lib/types/src/api/apdu/utils/AppBuilderError.d.ts.map +1 -1
  996. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts +1 -1
  997. package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
  998. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts +1 -1
  999. package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts.map +1 -1
  1000. package/lib/types/src/api/command/Command.d.ts +4 -4
  1001. package/lib/types/src/api/command/Command.d.ts.map +1 -1
  1002. package/lib/types/src/api/command/Errors.d.ts +6 -6
  1003. package/lib/types/src/api/command/Errors.d.ts.map +1 -1
  1004. package/lib/types/src/api/command/model/CommandResult.d.ts +3 -3
  1005. package/lib/types/src/api/command/model/CommandResult.d.ts.map +1 -1
  1006. package/lib/types/src/api/command/os/CloseAppCommand.d.ts +4 -4
  1007. package/lib/types/src/api/command/os/CloseAppCommand.d.ts.map +1 -1
  1008. package/lib/types/src/api/command/os/GetAppAndVersionCommand.d.ts +4 -4
  1009. package/lib/types/src/api/command/os/GetAppAndVersionCommand.d.ts.map +1 -1
  1010. package/lib/types/src/api/command/os/GetBatteryStatusCommand.d.ts +4 -4
  1011. package/lib/types/src/api/command/os/GetBatteryStatusCommand.d.ts.map +1 -1
  1012. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts +4 -4
  1013. package/lib/types/src/api/command/os/GetOsVersionCommand.d.ts.map +1 -1
  1014. package/lib/types/src/api/command/os/ListAppsCommand.d.ts +5 -5
  1015. package/lib/types/src/api/command/os/ListAppsCommand.d.ts.map +1 -1
  1016. package/lib/types/src/api/command/os/OpenAppCommand.d.ts +5 -5
  1017. package/lib/types/src/api/command/os/OpenAppCommand.d.ts.map +1 -1
  1018. package/lib/types/src/api/command/utils/CommandErrors.d.ts +1 -1
  1019. package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
  1020. package/lib/types/src/api/command/utils/CommandUtils.d.ts +1 -1
  1021. package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
  1022. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts +4 -4
  1023. package/lib/types/src/api/command/utils/GlobalCommandError.d.ts.map +1 -1
  1024. package/lib/types/src/api/device-action/DeviceAction.d.ts +8 -8
  1025. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  1026. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts +1 -1
  1027. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  1028. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +4 -4
  1029. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  1030. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts +4 -4
  1031. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
  1032. package/lib/types/src/api/device-action/os/Errors.d.ts +4 -4
  1033. package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
  1034. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts +5 -5
  1035. package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
  1036. package/lib/types/src/api/device-action/os/GetDeviceStatus/types.d.ts +6 -6
  1037. package/lib/types/src/api/device-action/os/GetDeviceStatus/types.d.ts.map +1 -1
  1038. package/lib/types/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.d.ts +5 -5
  1039. package/lib/types/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.d.ts.map +1 -1
  1040. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +5 -5
  1041. package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
  1042. package/lib/types/src/api/device-action/os/ListApps/ListAppsDeviceAction.d.ts +4 -4
  1043. package/lib/types/src/api/device-action/os/ListApps/ListAppsDeviceAction.d.ts.map +1 -1
  1044. package/lib/types/src/api/device-action/os/ListApps/types.d.ts +6 -6
  1045. package/lib/types/src/api/device-action/os/ListApps/types.d.ts.map +1 -1
  1046. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts +9 -9
  1047. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts.map +1 -1
  1048. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/types.d.ts +8 -8
  1049. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/types.d.ts.map +1 -1
  1050. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts +7 -9
  1051. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
  1052. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts +7 -6
  1053. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts.map +1 -1
  1054. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts +6 -6
  1055. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  1056. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +3 -3
  1057. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  1058. package/lib/types/src/api/device-action/use-case/ExecuteDeviceActionUseCase.d.ts +3 -3
  1059. package/lib/types/src/api/device-action/xstate-utils/StateMachineTypes.d.ts +1 -1
  1060. package/lib/types/src/api/device-action/xstate-utils/StateMachineTypes.d.ts.map +1 -1
  1061. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts +6 -6
  1062. package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts.map +1 -1
  1063. package/lib/types/src/api/device-session/ApduResponse.stub.d.ts +1 -1
  1064. package/lib/types/src/api/device-session/ApduResponse.stub.d.ts.map +1 -1
  1065. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +4 -4
  1066. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  1067. package/lib/types/src/api/index.d.ts +3 -3
  1068. package/lib/types/src/api/index.d.ts.map +1 -1
  1069. package/lib/types/src/api/logger-subscriber/service/ConsoleLogger.d.ts +2 -2
  1070. package/lib/types/src/api/logger-subscriber/service/ConsoleLogger.d.ts.map +1 -1
  1071. package/lib/types/src/api/logger-subscriber/service/LoggerSubscriberService.d.ts +9 -4
  1072. package/lib/types/src/api/logger-subscriber/service/LoggerSubscriberService.d.ts.map +1 -1
  1073. package/lib/types/src/api/logger-subscriber/service/WebLogsExporterLogger.d.ts +2 -2
  1074. package/lib/types/src/api/logger-subscriber/service/WebLogsExporterLogger.d.ts.map +1 -1
  1075. package/lib/types/src/api/transport/model/ConnectedDevice.d.ts +7 -4
  1076. package/lib/types/src/api/transport/model/ConnectedDevice.d.ts.map +1 -1
  1077. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts +2 -2
  1078. package/lib/types/src/api/transport/model/DiscoveredDevice.d.ts.map +1 -1
  1079. package/lib/types/src/api/transport/model/Transport.d.ts +10 -9
  1080. package/lib/types/src/api/transport/model/Transport.d.ts.map +1 -1
  1081. package/lib/types/src/api/transport/model/TransportIdentifier.d.ts +1 -0
  1082. package/lib/types/src/api/transport/model/TransportIdentifier.d.ts.map +1 -1
  1083. package/lib/types/src/api/types.d.ts +1 -1
  1084. package/lib/types/src/api/types.d.ts.map +1 -1
  1085. package/lib/types/src/di.d.ts +5 -5
  1086. package/lib/types/src/di.d.ts.map +1 -1
  1087. package/lib/types/src/internal/config/data/ConfigDataSource.d.ts +3 -3
  1088. package/lib/types/src/internal/config/data/ConfigDataSource.d.ts.map +1 -1
  1089. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts +1 -1
  1090. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts.map +1 -1
  1091. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts +1 -1
  1092. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts.map +1 -1
  1093. package/lib/types/src/internal/config/di/configTypes.d.ts +1 -1
  1094. package/lib/types/src/internal/config/service/ConfigService.d.ts +2 -2
  1095. package/lib/types/src/internal/config/service/ConfigService.d.ts.map +1 -1
  1096. package/lib/types/src/internal/config/service/DefaultConfigService.d.ts +1 -1
  1097. package/lib/types/src/internal/config/use-case/GetDmkVersionUseCase.d.ts +12 -0
  1098. package/lib/types/src/internal/config/use-case/{GetSdkVersionUseCase.d.ts.map → GetDmkVersionUseCase.d.ts.map} +1 -1
  1099. package/lib/types/src/internal/config/use-case/GetDmkVersionUseCase.test.d.ts +2 -0
  1100. package/lib/types/src/internal/config/use-case/GetDmkVersionUseCase.test.d.ts.map +1 -0
  1101. package/lib/types/src/internal/device-model/data/DeviceModelDataSource.d.ts +5 -2
  1102. package/lib/types/src/internal/device-model/data/DeviceModelDataSource.d.ts.map +1 -1
  1103. package/lib/types/src/internal/device-model/data/StaticDeviceModelDataSource.d.ts +3 -0
  1104. package/lib/types/src/internal/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
  1105. package/lib/types/src/internal/device-model/model/DeviceModel.stub.d.ts +1 -1
  1106. package/lib/types/src/internal/device-model/model/DeviceModel.stub.d.ts.map +1 -1
  1107. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts +2 -0
  1108. package/lib/types/src/internal/device-session/data/DeviceSessionRefresherConst.d.ts.map +1 -0
  1109. package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
  1110. package/lib/types/src/internal/device-session/di/deviceSessionTypes.d.ts +0 -1
  1111. package/lib/types/src/internal/device-session/di/deviceSessionTypes.d.ts.map +1 -1
  1112. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +11 -11
  1113. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  1114. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts +2 -2
  1115. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  1116. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts +28 -4
  1117. package/lib/types/src/internal/device-session/model/DeviceSessionRefresher.d.ts.map +1 -1
  1118. package/lib/types/src/internal/device-session/model/Errors.d.ts +6 -6
  1119. package/lib/types/src/internal/device-session/model/Errors.d.ts.map +1 -1
  1120. package/lib/types/src/internal/device-session/model/Frame.d.ts +1 -1
  1121. package/lib/types/src/internal/device-session/model/Frame.d.ts.map +1 -1
  1122. package/lib/types/src/internal/device-session/model/FrameHeader.d.ts +1 -1
  1123. package/lib/types/src/internal/device-session/model/FrameHeader.d.ts.map +1 -1
  1124. package/lib/types/src/internal/device-session/service/ApduReceiverService.d.ts +4 -4
  1125. package/lib/types/src/internal/device-session/service/ApduReceiverService.d.ts.map +1 -1
  1126. package/lib/types/src/internal/device-session/service/ApduSenderService.d.ts +1 -1
  1127. package/lib/types/src/internal/device-session/service/ApduSenderService.d.ts.map +1 -1
  1128. package/lib/types/src/internal/device-session/service/DefaultApduReceiverService.stub.d.ts +3 -3
  1129. package/lib/types/src/internal/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
  1130. package/lib/types/src/internal/device-session/service/DefaultApduSenderService.stub.d.ts +3 -3
  1131. package/lib/types/src/internal/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
  1132. package/lib/types/src/internal/device-session/service/DefaultDeviceSessionService.d.ts +4 -1
  1133. package/lib/types/src/internal/device-session/service/DefaultDeviceSessionService.d.ts.map +1 -1
  1134. package/lib/types/src/internal/device-session/service/DeviceSessionService.d.ts +7 -5
  1135. package/lib/types/src/internal/device-session/service/DeviceSessionService.d.ts.map +1 -1
  1136. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseState.test.d.ts +2 -0
  1137. package/lib/types/src/internal/device-session/use-case/CloseSessionsUseState.test.d.ts.map +1 -0
  1138. package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
  1139. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts +3 -0
  1140. package/lib/types/src/internal/discovery/di/discoveryTypes.d.ts.map +1 -1
  1141. package/lib/types/src/internal/discovery/use-case/DisconnectUseCase.d.ts +1 -1
  1142. package/lib/types/src/internal/discovery/use-case/GetConnectedDeviceUseCase.d.ts.map +1 -1
  1143. package/lib/types/src/internal/{device-session/use-case/ListDeviceSessionsUseCase.d.ts → discovery/use-case/ListConnectedDevicesUseCase.d.ts} +5 -5
  1144. package/lib/types/src/internal/discovery/use-case/ListConnectedDevicesUseCase.d.ts.map +1 -0
  1145. package/lib/types/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.d.ts +2 -0
  1146. package/lib/types/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.d.ts.map +1 -0
  1147. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts +14 -0
  1148. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.d.ts.map +1 -0
  1149. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.d.ts +2 -0
  1150. package/lib/types/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.d.ts.map +1 -0
  1151. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts +13 -0
  1152. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.d.ts.map +1 -0
  1153. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts +2 -0
  1154. package/lib/types/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.d.ts.map +1 -0
  1155. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts +1 -1
  1156. package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
  1157. package/lib/types/src/internal/logger-publisher/service/LoggerPublisherService.d.ts +2 -2
  1158. package/lib/types/src/internal/logger-publisher/service/LoggerPublisherService.d.ts.map +1 -1
  1159. package/lib/types/src/internal/logger-publisher/service/__mocks__/DefaultLoggerService.d.ts +1 -1
  1160. package/lib/types/src/internal/logger-publisher/service/__mocks__/DefaultLoggerService.d.ts.map +1 -1
  1161. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +2 -2
  1162. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +3 -3
  1163. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  1164. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +1 -1
  1165. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  1166. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts +2 -2
  1167. package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
  1168. package/lib/types/src/internal/manager-api/di/managerApiTypes.d.ts +1 -1
  1169. package/lib/types/src/internal/manager-api/model/Errors.d.ts +2 -2
  1170. package/lib/types/src/internal/manager-api/model/Errors.d.ts.map +1 -1
  1171. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts +4 -4
  1172. package/lib/types/src/internal/manager-api/service/ManagerApiService.d.ts.map +1 -1
  1173. package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +1 -1
  1174. package/lib/types/src/internal/transport/ble/di/bleDiTypes.d.ts +4 -0
  1175. package/lib/types/src/internal/transport/ble/di/bleDiTypes.d.ts.map +1 -0
  1176. package/lib/types/src/internal/transport/ble/di/bleModule.d.ts +3 -0
  1177. package/lib/types/src/internal/transport/ble/di/bleModule.d.ts.map +1 -0
  1178. package/lib/types/src/internal/transport/ble/di/bleModule.test.d.ts +2 -0
  1179. package/lib/types/src/internal/transport/ble/di/bleModule.test.d.ts.map +1 -0
  1180. package/lib/types/src/internal/transport/ble/model/BleDevice.stub.d.ts +3 -0
  1181. package/lib/types/src/internal/transport/ble/model/BleDevice.stub.d.ts.map +1 -0
  1182. package/lib/types/src/internal/transport/ble/model/BleDeviceInfos.d.ts +10 -0
  1183. package/lib/types/src/internal/transport/ble/model/BleDeviceInfos.d.ts.map +1 -0
  1184. package/lib/types/src/internal/transport/ble/service/BleDeviceConnectionFactory.d.ts +13 -0
  1185. package/lib/types/src/internal/transport/ble/service/BleDeviceConnectionFactory.d.ts.map +1 -0
  1186. package/lib/types/src/internal/transport/ble/service/BleDeviceConnectionFactory.stub.d.ts +3 -0
  1187. package/lib/types/src/internal/transport/ble/service/BleDeviceConnectionFactory.stub.d.ts.map +1 -0
  1188. package/lib/types/src/internal/transport/ble/transport/BleDeviceConnection.d.ts +104 -0
  1189. package/lib/types/src/internal/transport/ble/transport/BleDeviceConnection.d.ts.map +1 -0
  1190. package/lib/types/src/internal/transport/ble/transport/BleDeviceConnection.test.d.ts +2 -0
  1191. package/lib/types/src/internal/transport/ble/transport/BleDeviceConnection.test.d.ts.map +1 -0
  1192. package/lib/types/src/internal/transport/ble/transport/WebBleTransport.d.ts +97 -0
  1193. package/lib/types/src/internal/transport/ble/transport/WebBleTransport.d.ts.map +1 -0
  1194. package/lib/types/src/internal/transport/ble/transport/WebBleTransport.test.d.ts +2 -0
  1195. package/lib/types/src/internal/transport/ble/transport/WebBleTransport.test.d.ts.map +1 -0
  1196. package/lib/types/src/internal/transport/ble/transport/__mocks__/WebBleTransport.d.ts +14 -0
  1197. package/lib/types/src/internal/transport/ble/transport/__mocks__/WebBleTransport.d.ts.map +1 -0
  1198. package/lib/types/src/internal/transport/data/TransportDataSource.d.ts +2 -2
  1199. package/lib/types/src/internal/transport/data/TransportDataSource.d.ts.map +1 -1
  1200. package/lib/types/src/internal/transport/di/transportDiTypes.d.ts +1 -1
  1201. package/lib/types/src/internal/transport/di/transportModule.d.ts +4 -4
  1202. package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
  1203. package/lib/types/src/internal/transport/mockserver/MockserverTransport.d.ts +6 -5
  1204. package/lib/types/src/internal/transport/mockserver/MockserverTransport.d.ts.map +1 -1
  1205. package/lib/types/src/internal/transport/model/DeviceConnection.d.ts +5 -5
  1206. package/lib/types/src/internal/transport/model/DeviceConnection.d.ts.map +1 -1
  1207. package/lib/types/src/internal/transport/model/Errors.d.ts +34 -14
  1208. package/lib/types/src/internal/transport/model/Errors.d.ts.map +1 -1
  1209. package/lib/types/src/internal/transport/model/InternalConnectedDevice.d.ts +5 -5
  1210. package/lib/types/src/internal/transport/model/InternalConnectedDevice.d.ts.map +1 -1
  1211. package/lib/types/src/internal/transport/model/InternalConnectedDevice.stub.d.ts +1 -1
  1212. package/lib/types/src/internal/transport/model/InternalConnectedDevice.stub.d.ts.map +1 -1
  1213. package/lib/types/src/internal/transport/model/InternalDiscoveredDevice.d.ts +3 -3
  1214. package/lib/types/src/internal/transport/model/InternalDiscoveredDevice.d.ts.map +1 -1
  1215. package/lib/types/src/internal/transport/usb/transport/UsbHidDeviceConnection.d.ts +2 -2
  1216. package/lib/types/src/internal/transport/usb/transport/WebUsbHidTransport.d.ts +27 -33
  1217. package/lib/types/src/internal/transport/usb/transport/WebUsbHidTransport.d.ts.map +1 -1
  1218. package/lib/types/src/internal/transport/usb/transport/__mocks__/WebUsbHidTransport.d.ts +2 -1
  1219. package/lib/types/src/internal/transport/usb/transport/__mocks__/WebUsbHidTransport.d.ts.map +1 -1
  1220. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  1221. package/package.json +17 -13
  1222. package/lib/types/src/api/DeviceSdk.d.ts.map +0 -1
  1223. package/lib/types/src/api/DeviceSdk.test.d.ts +0 -2
  1224. package/lib/types/src/api/DeviceSdk.test.d.ts.map +0 -1
  1225. package/lib/types/src/api/DeviceSdkBuilder.d.ts +0 -35
  1226. package/lib/types/src/api/DeviceSdkBuilder.d.ts.map +0 -1
  1227. package/lib/types/src/api/DeviceSdkBuilder.test.d.ts +0 -2
  1228. package/lib/types/src/api/DeviceSdkBuilder.test.d.ts.map +0 -1
  1229. package/lib/types/src/api/SdkConfig.d.ts +0 -5
  1230. package/lib/types/src/api/SdkConfig.d.ts.map +0 -1
  1231. package/lib/types/src/internal/config/use-case/GetSdkVersionUseCase.d.ts +0 -12
  1232. package/lib/types/src/internal/config/use-case/GetSdkVersionUseCase.test.d.ts +0 -2
  1233. package/lib/types/src/internal/config/use-case/GetSdkVersionUseCase.test.d.ts.map +0 -1
  1234. package/lib/types/src/internal/device-session/use-case/ListDeviceSessionsUseCase.d.ts.map +0 -1
  1235. package/lib/types/src/internal/device-session/use-case/ListDeviceSessionsUseCase.test.d.ts +0 -2
  1236. package/lib/types/src/internal/device-session/use-case/ListDeviceSessionsUseCase.test.d.ts.map +0 -1
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../src/internal/transport/usb/transport/UsbHidDeviceConnection.test.ts"],
4
+ "sourcesContent": ["import { Left, Right } from \"purify-ts\";\n\nimport { type DeviceId } from \"@api/types\";\nimport { type ApduReceiverService } from \"@internal/device-session/service/ApduReceiverService\";\nimport { type ApduSenderService } from \"@internal/device-session/service/ApduSenderService\";\nimport { defaultApduReceiverServiceStubBuilder } from \"@internal/device-session/service/DefaultApduReceiverService.stub\";\nimport { defaultApduSenderServiceStubBuilder } from \"@internal/device-session/service/DefaultApduSenderService.stub\";\nimport { DefaultLoggerPublisherService } from \"@internal/logger-publisher/service/DefaultLoggerPublisherService\";\nimport { ReconnectionFailedError } from \"@internal/transport/model/Errors\";\nimport { RECONNECT_DEVICE_TIMEOUT } from \"@internal/transport/usb/data/UsbHidConfig\";\nimport { hidDeviceStubBuilder } from \"@internal/transport/usb/model/HIDDevice.stub\";\nimport { UsbHidDeviceConnection } from \"@internal/transport/usb/transport/UsbHidDeviceConnection\";\n\njest.useFakeTimers();\n\nconst RESPONSE_LOCKED_DEVICE = new Uint8Array([\n 0xaa, 0xaa, 0x05, 0x00, 0x00, 0x00, 0x02, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n]);\n\nconst RESPONSE_SUCCESS = new Uint8Array([\n 0xaa, 0xaa, 0x05, 0x00, 0x00, 0x00, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n]);\n\n/**\n * Flushes all pending promises\n */\nconst flushPromises = () =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n new Promise(jest.requireActual(\"timers\").setImmediate);\n\njest.useFakeTimers();\n\ndescribe(\"UsbHidDeviceConnection\", () => {\n let device: HIDDevice;\n let apduSender: ApduSenderService;\n let apduReceiver: ApduReceiverService;\n const onConnectionTerminated = () => {};\n const deviceId: DeviceId = \"test-device-id\";\n const logger = (tag: string) => new DefaultLoggerPublisherService([], tag);\n\n beforeEach(() => {\n device = hidDeviceStubBuilder({ opened: true });\n apduSender = defaultApduSenderServiceStubBuilder(undefined, logger);\n apduReceiver = defaultApduReceiverServiceStubBuilder(undefined, logger);\n });\n\n it(\"should get device\", () => {\n // given\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n // when\n const cDevice = connection.device;\n // then\n expect(cDevice).toStrictEqual(device);\n });\n\n it(\"should send APDU through hid report\", () => {\n // given\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n // when\n connection.sendApdu(new Uint8Array(0));\n // then\n expect(device.sendReport).toHaveBeenCalled();\n });\n\n it(\"should receive APDU through hid report\", async () => {\n // given\n device.sendReport = jest.fn(() =>\n Promise.resolve(\n device.oninputreport!({\n type: \"inputreport\",\n data: new DataView(Uint8Array.from(RESPONSE_SUCCESS).buffer),\n } as HIDInputReportEvent),\n ),\n );\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n // when\n const response = await connection.sendApdu(Uint8Array.from([]));\n // then\n expect(response).toEqual(\n Right({\n statusCode: new Uint8Array([0x90, 0x00]),\n data: new Uint8Array([]),\n }),\n );\n });\n\n describe(\"anticipating loss of connection after sending an APDU\", () => {\n test(\"sendApdu(whatever, true) should wait for reconnection before resolving if the response is a success\", async () => {\n // given\n device.sendReport = jest.fn(() =>\n Promise.resolve(\n device.oninputreport!({\n type: \"inputreport\",\n data: new DataView(Uint8Array.from(RESPONSE_SUCCESS).buffer),\n } as HIDInputReportEvent),\n ),\n );\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n\n let hasResolved = false;\n const responsePromise = connection\n .sendApdu(Uint8Array.from([]), true)\n .then((response) => {\n hasResolved = true;\n return response;\n });\n\n connection.lostConnection();\n\n // before reconnecting\n await flushPromises();\n expect(hasResolved).toBe(false);\n\n // when reconnecting\n connection.reconnectHidDevice(device);\n await flushPromises();\n expect(hasResolved).toBe(true);\n\n const response = await responsePromise;\n\n expect(response).toEqual(\n Right({\n statusCode: new Uint8Array([0x90, 0x00]),\n data: new Uint8Array([]),\n }),\n );\n });\n\n test(\"sendApdu(whatever, true) should not wait for reconnection if the response is not a success\", async () => {\n // given\n device.sendReport = jest.fn(() =>\n Promise.resolve(\n device.oninputreport!({\n type: \"inputreport\",\n data: new DataView(Uint8Array.from(RESPONSE_LOCKED_DEVICE).buffer),\n } as HIDInputReportEvent),\n ),\n );\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n\n // when\n const response = await connection.sendApdu(Uint8Array.from([]), true);\n\n // then\n expect(response).toEqual(\n Right({\n statusCode: new Uint8Array([0x55, 0x15]),\n data: new Uint8Array([]),\n }),\n );\n });\n\n test(\"sendApdu(whatever, true) should return an error if the device gets disconnected while waiting for reconnection\", async () => {\n // given\n device.sendReport = jest.fn(() =>\n Promise.resolve(\n device.oninputreport!({\n type: \"inputreport\",\n data: new DataView(Uint8Array.from(RESPONSE_SUCCESS).buffer),\n } as HIDInputReportEvent),\n ),\n );\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n\n const responsePromise = connection.sendApdu(Uint8Array.from([]), true);\n\n // when disconnecting\n connection.lostConnection();\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT);\n await flushPromises();\n\n // then\n const response = await responsePromise;\n expect(response).toEqual(Left(new ReconnectionFailedError()));\n });\n });\n\n describe(\"connection lost before sending an APDU\", () => {\n test(\"sendApdu(whatever, false) should return an error if the device connection has been lost and times out\", async () => {\n // given\n device.sendReport = jest.fn(() =>\n Promise.resolve(\n device.oninputreport!({\n type: \"inputreport\",\n data: new DataView(Uint8Array.from(RESPONSE_SUCCESS).buffer),\n } as HIDInputReportEvent),\n ),\n );\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n\n // when losing connection\n connection.lostConnection();\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT);\n await flushPromises();\n\n // then\n const response = await connection.sendApdu(Uint8Array.from([]), false);\n await flushPromises();\n expect(response).toEqual(Left(new ReconnectionFailedError()));\n });\n\n test(\"sendApdu(whatever, false) should wait for reconnection to resolve\", async () => {\n // given\n device.sendReport = jest.fn(() =>\n Promise.resolve(\n device.oninputreport!({\n type: \"inputreport\",\n data: new DataView(Uint8Array.from(RESPONSE_SUCCESS).buffer),\n } as HIDInputReportEvent),\n ),\n );\n const connection = new UsbHidDeviceConnection(\n { device, apduSender, apduReceiver, onConnectionTerminated, deviceId },\n logger,\n );\n\n // when losing connection\n connection.lostConnection();\n\n let hasResolved = false;\n const responsePromise = connection\n .sendApdu(Uint8Array.from([]), false)\n .then((response) => {\n hasResolved = true;\n return response;\n });\n\n // before reconnecting\n await flushPromises();\n expect(hasResolved).toBe(false);\n\n // when reconnecting\n connection.reconnectHidDevice(device);\n await flushPromises();\n expect(hasResolved).toBe(true);\n\n const response = await responsePromise;\n\n expect(response).toEqual(\n Right({\n statusCode: new Uint8Array([0x90, 0x00]),\n data: new Uint8Array([]),\n }),\n );\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,MAAa,YAK5B,OAAS,yCAAAC,MAA6C,mEACtD,OAAS,uCAAAC,MAA2C,iEACpD,OAAS,iCAAAC,MAAqC,mEAC9C,OAAS,2BAAAC,MAA+B,mCACxC,OAAS,4BAAAC,MAAgC,4CACzC,OAAS,wBAAAC,MAA4B,+CACrC,OAAS,0BAAAC,MAA8B,2DAEvC,KAAK,cAAc,EAEnB,MAAMC,EAAyB,IAAI,WAAW,CAC5C,IAAM,IAAM,EAAM,EAAM,EAAM,EAAM,EAAM,GAAM,GAAM,EAAM,EAAM,EAAM,EACxE,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EACxE,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EACxE,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EACxE,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,CAClD,CAAC,EAEKC,EAAmB,IAAI,WAAW,CACtC,IAAM,IAAM,EAAM,EAAM,EAAM,EAAM,EAAM,IAAM,EAAM,EAAM,EAAM,EAAM,EACxE,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EACxE,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EAAM,EACxE,EAAM,E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,MAAMK,EAAc,EAGpB,MAAMS,EAAW,MAAMC,EAAW,SAAS,WAAW,KAAK,CAAC,CAAC,EAAG,EAAK,EACrE,MAAMV,EAAc,EACpB,OAAOS,CAAQ,EAAE,QAAQpB,EAAK,IAAIK,CAAyB,CAAC,CAC9D,CAAC,EAED,KAAK,oEAAqE,SAAY,CAEpFO,EAAO,WAAa,KAAK,GAAG,IAC1B,QAAQ,QACNA,EAAO,cAAe,CACpB,KAAM,cACN,KAAM,IAAI,SAAS,WAAW,KAAKF,CAAgB,EAAE,MAAM,CAC7D,CAAwB,CAC1B,CACF,EACA,MAAMW,EAAa,IAAIb,EACrB,CAAE,OAAAI,EAAQ,WAAAC,EAAY,aAAAC,EAAc,uBAAAC,EAAwB,SAAAC,CAAS,EACrEC,CACF,EAGAI,EAAW,eAAe,EAE1B,IAAIC,EAAc,GAClB,MAAMC,EAAkBF,EACrB,SAAS,WAAW,KAAK,CAAC,CAAC,EAAG,EAAK,EACnC,KAAMD,IACLE,EAAc,GACPF,EACR,EAGH,MAAMT,EAAc,EACpB,OAAOW,CAAW,EAAE,KAAK,EAAK,EAG9BD,EAAW,mBAAmBT,CAAM,EACpC,MAAMD,EAAc,EACpB,OAAOW,CAAW,EAAE,KAAK,EAAI,EAE7B,MAAMF,EAAW,MAAMG,EAEvB,OAAOH,CAAQ,EAAE,QACfnB,EAAM,CACJ,WAAY,IAAI,WAAW,CAAC,IAAM,CAAI,CAAC,EACvC,KAAM,IAAI,WAAW,CAAC,CAAC,CACzB,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["Left", "Right", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "DefaultLoggerPublisherService", "ReconnectionFailedError", "RECONNECT_DEVICE_TIMEOUT", "hidDeviceStubBuilder", "UsbHidDeviceConnection", "RESPONSE_LOCKED_DEVICE", "RESPONSE_SUCCESS", "flushPromises", "device", "apduSender", "apduReceiver", "onConnectionTerminated", "deviceId", "logger", "tag", "cDevice", "response", "connection", "hasResolved", "responsePromise"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var y=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var u=(s,e,i,t)=>{for(var n=t>1?void 0:t?_(e,i):e,r=s.length-1,c;r>=0;r--)(c=s[r])&&(n=(t?c(e,i,n):c(n))||n);return t&&n&&y(e,i,n),n},a=(s,e)=>(i,t)=>e(i,t,s);import*as d from"@sentry/minimal";import{inject as g,injectable as C}from"inversify";import{EitherAsync as m,Left as D,Maybe as f,Right as p}from"purify-ts";import{BehaviorSubject as H,from as b,map as w,switchMap as S}from"rxjs";import{v4 as P}from"uuid";import{BuiltinTransports as A}from"../../../../api/transport/model/TransportIdentifier";import{deviceModelTypes as T}from"../../../device-model/di/deviceModelTypes";import{loggerTypes as M}from"../../../logger-publisher/di/loggerTypes";import{DeviceNotRecognizedError as U,NoAccessibleDeviceError as h,OpeningConnectionError as L,UnknownDeviceError as E,UsbHidTransportNotSupportedError as B}from"../../../transport/model/Errors";import{InternalConnectedDevice as R}from"../../../transport/model/InternalConnectedDevice";import{LEDGER_VENDOR_ID as I}from"../../../transport/usb/data/UsbHidConfig";import{usbDiTypes as x}from"../../../transport/usb/di/usbDiTypes";let l=class{constructor(e,i,t){this.deviceModelDataSource=e;this._logger=i("WebUsbHidTransport"),this._usbHidDeviceConnectionFactory=t,this.startListeningToConnectionEvents()}_internalDiscoveredDevices=new H([]);_deviceConnectionsByHidDevice=new Map;_deviceConnectionsPendingReconnection=new Set;_connectionListenersAbortController=new AbortController;_logger;_usbHidDeviceConnectionFactory;connectionType="USB";identifier=A.USB;get hidApi(){return this.isSupported()?p(navigator.hid):D(new B("WebHID not supported"))}isSupported(){try{const e=!!navigator?.hid;return this._logger.debug(`isSupported: ${e}`),e}catch(e){return this._logger.error("isSupported: error",{data:{error:e}}),!1}}getIdentifier(){return this.identifier}async getDevices(){return m.liftEither(this.hidApi).map(async e=>{try{return(await e.getDevices()).filter(t=>t.vendorId===I)}catch(i){const t=new h(i);throw this._logger.error("getDevices: error getting devices",{data:{error:i}}),d.captureException(t),t}}).run()}mapHIDDeviceToInternalDiscoveredDevice(e){const i=this._internalDiscoveredDevices.getValue().find(r=>r.hidDevice===e);if(i)return i;const t=this._deviceConnectionsByHidDevice.get(e);return this.getDeviceModel(e).caseOf({Just:r=>{const c=t?.deviceId??P(),o={id:c,deviceModel:r,hidDevice:e,transport:this.identifier};return this._logger.debug(`Discovered device ${c} ${o.deviceModel.productName}`),o},Nothing:()=>{throw this._logger.warn(`Device not recognized: hidDevice.productId: 0x${e.productId.toString(16)}`),new U(`Device not recognized: hidDevice.productId: 0x${e.productId.toString(16)}`)}})}listenToKnownDevices(){return this.updateInternalDiscoveredDevices(),this._internalDiscoveredDevices.pipe(w(e=>e.map(({hidDevice:i,...t})=>t)))}async updateInternalDiscoveredDevices(){(await this.getDevices()).caseOf({Left:i=>{this._logger.error("Error while getting accessible device",{data:{error:i}}),d.captureException(i)},Right:i=>{this._internalDiscoveredDevices.next(i.map(t=>this.mapHIDDeviceToInternalDiscoveredDevice(t)))}})}async promptDeviceAccess(){return m.liftEither(this.hidApi).map(async e=>{let i=[];try{i=await e.requestDevice({filters:[{vendorId:I}]}),await this.updateInternalDiscoveredDevices()}catch(n){const r=new h(n);throw this._logger.error("promptDeviceAccess: error requesting device",{data:{error:n}}),d.captureException(r),r}if(this._logger.debug(`promptDeviceAccess: hidDevices len ${i.length}`),i.length===0)throw this._logger.warn("No device was selected"),new h("No selected device");const t=[];for(const n of i)t.push(n),this._logger.debug("promptDeviceAccess: selected device",{data:{hidDevice:n}});return t}).run()}startDiscovering(){return this._logger.debug("startDiscovering"),b(this.promptDeviceAccess()).pipe(S(e=>e.caseOf({Left:i=>{throw this._logger.error("Error while getting accessible device",{data:{error:i}}),d.captureException(i),i},Right:i=>{this._logger.info(`Got access to ${i.length} HID devices`);const t=i.map(n=>this.mapHIDDeviceToInternalDiscoveredDevice(n));return b(t)}})))}stopDiscovering(){}startListeningToConnectionEvents(){this._logger.debug("startListeningToConnectionEvents"),this.hidApi.map(e=>{e.addEventListener("connect",i=>this.handleDeviceConnectionEvent(i),{signal:this._connectionListenersAbortController.signal}),e.addEventListener("disconnect",i=>{this.handleDeviceDisconnectionEvent(i)},{signal:this._connectionListenersAbortController.signal})})}stopListeningToConnectionEvents(){this._logger.debug("stopListeningToConnectionEvents"),this._connectionListenersAbortController.abort()}async connect({deviceId:e,onDisconnect:i}){this._logger.debug("connect",{data:{deviceId:e}});const t=this._internalDiscoveredDevices.getValue().find(o=>o.id===e);if(!t)return this._logger.error(`Unknown device ${e}`),D(new E(`Unknown device ${e}`));try{if(this._deviceConnectionsByHidDevice.get(t.hidDevice))throw new Error("Device already opened");await t.hidDevice.open()}catch(o){if(o instanceof DOMException&&o.name==="InvalidStateError")this._logger.debug(`Device ${e} is already opened`);else{const v=new L(o);return this._logger.debug(`Error while opening device: ${e}`,{data:{error:o}}),d.captureException(v),D(v)}}const{deviceModel:n}=t,r=this._usbHidDeviceConnectionFactory.create(t.hidDevice,{onConnectionTerminated:()=>{i(e),this._deviceConnectionsPendingReconnection.delete(r),this._deviceConnectionsByHidDevice.delete(t.hidDevice),r.device.close()},deviceId:e});this._deviceConnectionsByHidDevice.set(t.hidDevice,r);const c=new R({sendApdu:(o,v)=>r.sendApdu(o,v),deviceModel:n,id:e,type:this.connectionType,transport:this.identifier});return p(c)}getDeviceModel(e){const{productId:i}=e,t=this.deviceModelDataSource.getAllDeviceModels().find(n=>n.usbProductId===i>>8||n.bootloaderUsbProductId===i);return t?f.of(t):f.zero()}getHidUsbProductId(e){return this.getDeviceModel(e).caseOf({Just:i=>i.usbProductId,Nothing:()=>e.productId>>8})}async disconnect(e){this._logger.debug("disconnect",{data:{connectedDevice:e}});const i=Array.from(this._deviceConnectionsByHidDevice.values()).find(t=>t.deviceId===e.connectedDevice.id);return i?(i.disconnect(),Promise.resolve(p(void 0))):(this._logger.error("No matching device connection found",{data:{connectedDevice:e}}),Promise.resolve(D(new E(`Unknown device ${e.connectedDevice.id}`))))}isHIDConnectionEvent(e){return"device"in e&&typeof e.device=="object"&&e.device!==null&&"productId"in e.device&&typeof e.device.productId=="number"}async handleDeviceDisconnectionEvent(e){if(!this.isHIDConnectionEvent(e)){this._logger.error("Invalid event",{data:{event:e}});return}this._logger.info("[handleDeviceDisconnectionEvent] Device disconnected",{data:{event:e}}),this.updateInternalDiscoveredDevices();try{await e.device.close()}catch(t){this._logger.error("Error while closing device ",{data:{event:e,error:t}})}const i=this._deviceConnectionsByHidDevice.get(e.device);i&&(i.lostConnection(),this._deviceConnectionsPendingReconnection.add(i),this._deviceConnectionsByHidDevice.delete(e.device))}handleDeviceReconnection(e,i){this._deviceConnectionsPendingReconnection.delete(e),this._deviceConnectionsByHidDevice.set(i,e);try{e.reconnectHidDevice(i)}catch(t){this._logger.error("Error while reconnecting to device",{data:{event,error:t}}),e.disconnect()}}handleDeviceConnectionEvent(e){if(!this.isHIDConnectionEvent(e)){this._logger.error("Invalid event",{data:{event:e}});return}this._logger.info("[handleDeviceConnectionEvent] Device connected",{data:{event:e}});const i=Array.from(this._deviceConnectionsPendingReconnection).find(t=>this.getHidUsbProductId(t.device)===this.getHidUsbProductId(e.device));i&&this.handleDeviceReconnection(i,e.device),this.updateInternalDiscoveredDevices()}destroy(){this.stopListeningToConnectionEvents(),this._deviceConnectionsByHidDevice.forEach(e=>{e.disconnect()}),this._deviceConnectionsPendingReconnection.clear()}};l=u([C(),a(0,g(T.DeviceModelDataSource)),a(1,g(M.LoggerPublisherServiceFactory)),a(2,g(x.UsbHidDeviceConnectionFactory))],l);export{l as WebUsbHidTransport};
2
+ //# sourceMappingURL=WebUsbHidTransport.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../src/internal/transport/usb/transport/WebUsbHidTransport.ts"],
4
+ "sourcesContent": ["import * as Sentry from \"@sentry/minimal\";\nimport { inject, injectable } from \"inversify\";\nimport { Either, EitherAsync, Left, Maybe, Right } from \"purify-ts\";\nimport { BehaviorSubject, from, map, Observable, switchMap } from \"rxjs\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { DeviceId } from \"@api/device/DeviceModel\";\nimport { ConnectionType } from \"@api/discovery/ConnectionType\";\nimport { DmkError } from \"@api/Error\";\nimport { Transport } from \"@api/transport/model/Transport\";\nimport {\n BuiltinTransports,\n TransportIdentifier,\n} from \"@api/transport/model/TransportIdentifier\";\nimport type { DeviceModelDataSource } from \"@internal/device-model/data/DeviceModelDataSource\";\nimport { deviceModelTypes } from \"@internal/device-model/di/deviceModelTypes\";\nimport { InternalDeviceModel } from \"@internal/device-model/model/DeviceModel\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\nimport type { LoggerPublisherService } from \"@internal/logger-publisher/service/LoggerPublisherService\";\nimport { DisconnectHandler } from \"@internal/transport/model/DeviceConnection\";\nimport {\n ConnectError,\n DeviceNotRecognizedError,\n NoAccessibleDeviceError,\n OpeningConnectionError,\n type PromptDeviceAccessError,\n UnknownDeviceError,\n UsbHidTransportNotSupportedError,\n} from \"@internal/transport/model/Errors\";\nimport { InternalConnectedDevice } from \"@internal/transport/model/InternalConnectedDevice\";\nimport { InternalDiscoveredDevice } from \"@internal/transport/model/InternalDiscoveredDevice\";\nimport { LEDGER_VENDOR_ID } from \"@internal/transport/usb/data/UsbHidConfig\";\nimport { usbDiTypes } from \"@internal/transport/usb/di/usbDiTypes\";\nimport { UsbHidDeviceConnectionFactory } from \"@internal/transport/usb/service/UsbHidDeviceConnectionFactory\";\nimport { UsbHidDeviceConnection } from \"@internal/transport/usb/transport/UsbHidDeviceConnection\";\n\ntype WebUsbHidInternalDiscoveredDevice = InternalDiscoveredDevice & {\n hidDevice: HIDDevice;\n};\n\n@injectable()\nexport class WebUsbHidTransport implements Transport {\n /** List of HID devices that have been discovered */\n private _internalDiscoveredDevices: BehaviorSubject<\n Array<WebUsbHidInternalDiscoveredDevice>\n > = new BehaviorSubject<Array<WebUsbHidInternalDiscoveredDevice>>([]);\n\n /** Map of *connected* HIDDevice to their UsbHidDeviceConnection */\n private _deviceConnectionsByHidDevice: Map<\n HIDDevice,\n UsbHidDeviceConnection\n > = new Map();\n\n /**\n * Set of UsbHidDeviceConnection for which the HIDDevice has been\n * disconnected, so they are waiting for a reconnection\n */\n private _deviceConnectionsPendingReconnection: Set<UsbHidDeviceConnection> =\n new Set();\n\n /** AbortController to stop listening to HID connection events */\n private _connectionListenersAbortController: AbortController =\n new AbortController();\n private _logger: LoggerPublisherService;\n private _usbHidDeviceConnectionFactory: UsbHidDeviceConnectionFactory;\n private readonly connectionType: ConnectionType = \"USB\";\n private readonly identifier: TransportIdentifier = BuiltinTransports.USB;\n\n constructor(\n @inject(deviceModelTypes.DeviceModelDataSource)\n private deviceModelDataSource: DeviceModelDataSource,\n @inject(loggerTypes.LoggerPublisherServiceFactory)\n loggerServiceFactory: (tag: string) => LoggerPublisherService,\n @inject(usbDiTypes.UsbHidDeviceConnectionFactory)\n usbHidDeviceConnectionFactory: UsbHidDeviceConnectionFactory,\n ) {\n this._logger = loggerServiceFactory(\"WebUsbHidTransport\");\n this._usbHidDeviceConnectionFactory = usbHidDeviceConnectionFactory;\n\n this.startListeningToConnectionEvents();\n }\n\n /**\n * Get the WebHID API if supported or error\n * @returns `Either<UsbHidTransportNotSupportedError, HID>`\n */\n private get hidApi(): Either<UsbHidTransportNotSupportedError, HID> {\n if (this.isSupported()) {\n return Right(navigator.hid);\n }\n\n return Left(new UsbHidTransportNotSupportedError(\"WebHID not supported\"));\n }\n\n isSupported() {\n try {\n const result = !!navigator?.hid;\n this._logger.debug(`isSupported: ${result}`);\n return result;\n } catch (error) {\n this._logger.error(`isSupported: error`, { data: { error } });\n return false;\n }\n }\n\n getIdentifier(): TransportIdentifier {\n return this.identifier;\n }\n\n /**\n * Wrapper around `navigator.hid.getDevices()`.\n * It will return the list of plugged in HID devices to which the user has\n * previously granted access through `navigator.hid.requestDevice()`.\n */\n private async getDevices(): Promise<Either<DmkError, HIDDevice[]>> {\n return EitherAsync.liftEither(this.hidApi)\n .map(async (hidApi) => {\n try {\n const allDevices = await hidApi.getDevices();\n return allDevices.filter(\n (hidDevice) => hidDevice.vendorId === LEDGER_VENDOR_ID,\n );\n } catch (error) {\n const deviceError = new NoAccessibleDeviceError(error);\n this._logger.error(`getDevices: error getting devices`, {\n data: { error },\n });\n Sentry.captureException(deviceError);\n throw deviceError;\n }\n })\n .run();\n }\n\n /**\n * Map a HIDDevice to an InternalDiscoveredDevice, either by creating a new one or returning an existing one\n */\n private mapHIDDeviceToInternalDiscoveredDevice(\n hidDevice: HIDDevice,\n ): WebUsbHidInternalDiscoveredDevice {\n const existingDiscoveredDevice = this._internalDiscoveredDevices\n .getValue()\n .find((internalDevice) => internalDevice.hidDevice === hidDevice);\n\n if (existingDiscoveredDevice) {\n return existingDiscoveredDevice;\n }\n\n const existingDeviceConnection =\n this._deviceConnectionsByHidDevice.get(hidDevice);\n\n const maybeDeviceModel = this.getDeviceModel(hidDevice);\n return maybeDeviceModel.caseOf({\n Just: (deviceModel) => {\n const id = existingDeviceConnection?.deviceId ?? uuid();\n\n const discoveredDevice = {\n id,\n deviceModel,\n hidDevice,\n transport: this.identifier,\n };\n\n this._logger.debug(\n `Discovered device ${id} ${discoveredDevice.deviceModel.productName}`,\n );\n\n return discoveredDevice;\n },\n Nothing: () => {\n // [ASK] Or we just ignore the not recognized device ? And log them\n this._logger.warn(\n `Device not recognized: hidDevice.productId: 0x${hidDevice.productId.toString(16)}`,\n );\n throw new DeviceNotRecognizedError(\n `Device not recognized: hidDevice.productId: 0x${hidDevice.productId.toString(16)}`,\n );\n },\n });\n }\n\n /**\n * Listen to known devices (devices to which the user has granted access)\n */\n public listenToKnownDevices(): Observable<InternalDiscoveredDevice[]> {\n this.updateInternalDiscoveredDevices();\n return this._internalDiscoveredDevices.pipe(\n map((devices) => devices.map(({ hidDevice, ...device }) => device)),\n );\n }\n\n private async updateInternalDiscoveredDevices(): Promise<void> {\n const eitherDevices = await this.getDevices();\n eitherDevices.caseOf({\n Left: (error) => {\n this._logger.error(\"Error while getting accessible device\", {\n data: { error },\n });\n Sentry.captureException(error);\n },\n Right: (hidDevices) => {\n this._internalDiscoveredDevices.next(\n hidDevices.map((hidDevice) =>\n this.mapHIDDeviceToInternalDiscoveredDevice(hidDevice),\n ),\n );\n },\n });\n }\n\n /**\n * Wrapper around navigator.hid.requestDevice()\n * In a browser, it will show a native dialog to select a HID device.\n */\n private async promptDeviceAccess(): Promise<\n Either<PromptDeviceAccessError, HIDDevice[]>\n > {\n return EitherAsync.liftEither(this.hidApi)\n .map(async (hidApi) => {\n // `requestDevice` returns an array. but normally the user can select only one device at a time.\n let hidDevices: HIDDevice[] = [];\n\n try {\n hidDevices = await hidApi.requestDevice({\n filters: [{ vendorId: LEDGER_VENDOR_ID }],\n });\n await this.updateInternalDiscoveredDevices();\n } catch (error) {\n const deviceError = new NoAccessibleDeviceError(error);\n this._logger.error(`promptDeviceAccess: error requesting device`, {\n data: { error },\n });\n Sentry.captureException(deviceError);\n throw deviceError;\n }\n\n this._logger.debug(\n `promptDeviceAccess: hidDevices len ${hidDevices.length}`,\n );\n\n // Granted access to 0 device (by clicking on cancel for ex) results in an error\n if (hidDevices.length === 0) {\n this._logger.warn(\"No device was selected\");\n throw new NoAccessibleDeviceError(\"No selected device\");\n }\n\n const discoveredHidDevices: HIDDevice[] = [];\n\n for (const hidDevice of hidDevices) {\n discoveredHidDevices.push(hidDevice);\n\n this._logger.debug(`promptDeviceAccess: selected device`, {\n data: { hidDevice },\n });\n }\n\n return discoveredHidDevices;\n })\n .run();\n }\n\n startDiscovering(): Observable<InternalDiscoveredDevice> {\n this._logger.debug(\"startDiscovering\");\n\n return from(this.promptDeviceAccess()).pipe(\n switchMap((either) => {\n return either.caseOf({\n Left: (error) => {\n this._logger.error(\"Error while getting accessible device\", {\n data: { error },\n });\n Sentry.captureException(error);\n throw error;\n },\n Right: (hidDevices) => {\n this._logger.info(`Got access to ${hidDevices.length} HID devices`);\n\n const discoveredDevices = hidDevices.map((hidDevice) => {\n return this.mapHIDDeviceToInternalDiscoveredDevice(hidDevice);\n });\n return from(discoveredDevices);\n },\n });\n }),\n );\n }\n\n stopDiscovering(): void {\n /**\n * This does nothing because the startDiscovering method is just a\n * promise wrapped into an observable. So there is no need to stop it.\n */\n }\n\n private startListeningToConnectionEvents(): void {\n this._logger.debug(\"startListeningToConnectionEvents\");\n\n this.hidApi.map((hidApi) => {\n hidApi.addEventListener(\n \"connect\",\n (event) => this.handleDeviceConnectionEvent(event),\n { signal: this._connectionListenersAbortController.signal },\n );\n\n hidApi.addEventListener(\n \"disconnect\",\n (event) => {\n this.handleDeviceDisconnectionEvent(event);\n },\n { signal: this._connectionListenersAbortController.signal },\n );\n });\n }\n\n private stopListeningToConnectionEvents(): void {\n this._logger.debug(\"stopListeningToConnectionEvents\");\n this._connectionListenersAbortController.abort();\n }\n\n /**\n * Connect to a HID USB device and update the internal state of the associated device\n */\n async connect({\n deviceId,\n onDisconnect,\n }: {\n deviceId: DeviceId;\n onDisconnect: DisconnectHandler;\n }): Promise<Either<ConnectError, InternalConnectedDevice>> {\n this._logger.debug(\"connect\", { data: { deviceId } });\n\n const matchingInternalDevice = this._internalDiscoveredDevices\n .getValue()\n .find((internalDevice) => internalDevice.id === deviceId);\n\n if (!matchingInternalDevice) {\n this._logger.error(`Unknown device ${deviceId}`);\n return Left(new UnknownDeviceError(`Unknown device ${deviceId}`));\n }\n\n try {\n if (\n this._deviceConnectionsByHidDevice.get(matchingInternalDevice.hidDevice)\n ) {\n throw new Error(\"Device already opened\");\n }\n await matchingInternalDevice.hidDevice.open();\n } catch (error) {\n if (error instanceof DOMException && error.name === \"InvalidStateError\") {\n this._logger.debug(`Device ${deviceId} is already opened`);\n } else {\n const connectionError = new OpeningConnectionError(error);\n this._logger.debug(`Error while opening device: ${deviceId}`, {\n data: { error },\n });\n Sentry.captureException(connectionError);\n return Left(connectionError);\n }\n }\n\n const { deviceModel } = matchingInternalDevice;\n\n const deviceConnection = this._usbHidDeviceConnectionFactory.create(\n matchingInternalDevice.hidDevice,\n {\n onConnectionTerminated: () => {\n onDisconnect(deviceId);\n this._deviceConnectionsPendingReconnection.delete(deviceConnection);\n this._deviceConnectionsByHidDevice.delete(\n matchingInternalDevice.hidDevice,\n );\n deviceConnection.device.close();\n },\n deviceId,\n },\n );\n\n this._deviceConnectionsByHidDevice.set(\n matchingInternalDevice.hidDevice,\n deviceConnection,\n );\n const connectedDevice = new InternalConnectedDevice({\n sendApdu: (apdu, triggersDisconnection) =>\n deviceConnection.sendApdu(apdu, triggersDisconnection),\n deviceModel,\n id: deviceId,\n type: this.connectionType,\n transport: this.identifier,\n });\n return Right(connectedDevice);\n }\n\n private getDeviceModel(hidDevice: HIDDevice): Maybe<InternalDeviceModel> {\n const { productId } = hidDevice;\n const matchingModel = this.deviceModelDataSource.getAllDeviceModels().find(\n (deviceModel) =>\n // outside of bootloader mode, the value that we need to identify a device model is the first byte of the actual hidDevice.productId\n deviceModel.usbProductId === productId >> 8 ||\n deviceModel.bootloaderUsbProductId === productId,\n );\n return matchingModel ? Maybe.of(matchingModel) : Maybe.zero();\n }\n\n private getHidUsbProductId(hidDevice: HIDDevice): number {\n return this.getDeviceModel(hidDevice).caseOf({\n Just: (deviceModel) => deviceModel.usbProductId,\n Nothing: () => hidDevice.productId >> 8,\n });\n }\n\n /**\n * Disconnect from a HID USB device\n */\n async disconnect(params: {\n connectedDevice: InternalConnectedDevice;\n }): Promise<Either<DmkError, void>> {\n this._logger.debug(\"disconnect\", { data: { connectedDevice: params } });\n\n const matchingDeviceConnection = Array.from(\n this._deviceConnectionsByHidDevice.values(),\n ).find(\n (deviceConnection) =>\n deviceConnection.deviceId === params.connectedDevice.id,\n );\n\n if (!matchingDeviceConnection) {\n this._logger.error(\"No matching device connection found\", {\n data: { connectedDevice: params },\n });\n return Promise.resolve(\n Left(\n new UnknownDeviceError(`Unknown device ${params.connectedDevice.id}`),\n ),\n );\n }\n\n matchingDeviceConnection.disconnect();\n return Promise.resolve(Right(undefined));\n }\n\n /**\n * Type guard to check if the event is a HID connection event\n * @param event\n * @private\n */\n private isHIDConnectionEvent(event: Event): event is HIDConnectionEvent {\n return (\n \"device\" in event &&\n typeof event.device === \"object\" &&\n event.device !== null &&\n \"productId\" in event.device &&\n typeof event.device.productId === \"number\"\n );\n }\n\n /**\n * Handle the disconnection event of a HID device\n * @param event\n */\n private async handleDeviceDisconnectionEvent(event: Event) {\n if (!this.isHIDConnectionEvent(event)) {\n this._logger.error(\"Invalid event\", { data: { event } });\n return;\n }\n\n this._logger.info(\"[handleDeviceDisconnectionEvent] Device disconnected\", {\n data: { event },\n });\n\n this.updateInternalDiscoveredDevices();\n\n try {\n await event.device.close();\n } catch (error) {\n this._logger.error(\"Error while closing device \", {\n data: { event, error },\n });\n }\n\n const matchingDeviceConnection = this._deviceConnectionsByHidDevice.get(\n event.device,\n );\n\n if (matchingDeviceConnection) {\n matchingDeviceConnection.lostConnection();\n this._deviceConnectionsPendingReconnection.add(matchingDeviceConnection);\n this._deviceConnectionsByHidDevice.delete(event.device);\n }\n }\n\n private handleDeviceReconnection(\n deviceConnection: UsbHidDeviceConnection,\n hidDevice: HIDDevice,\n ) {\n this._deviceConnectionsPendingReconnection.delete(deviceConnection);\n this._deviceConnectionsByHidDevice.set(hidDevice, deviceConnection);\n\n try {\n deviceConnection.reconnectHidDevice(hidDevice);\n } catch (error) {\n this._logger.error(\"Error while reconnecting to device\", {\n data: { event, error },\n });\n deviceConnection.disconnect();\n }\n }\n\n /**\n * Handle the connection event of a HID device\n * @param event\n */\n private handleDeviceConnectionEvent(event: Event) {\n if (!this.isHIDConnectionEvent(event)) {\n this._logger.error(\"Invalid event\", { data: { event } });\n return;\n }\n\n this._logger.info(\"[handleDeviceConnectionEvent] Device connected\", {\n data: { event },\n });\n\n const matchingDeviceConnection = Array.from(\n this._deviceConnectionsPendingReconnection,\n ).find(\n (deviceConnection) =>\n this.getHidUsbProductId(deviceConnection.device) ===\n this.getHidUsbProductId(event.device),\n );\n\n if (matchingDeviceConnection) {\n this.handleDeviceReconnection(matchingDeviceConnection, event.device);\n }\n\n /**\n * Note: we do this after handling the reconnection to allow the newly\n * discovered device to keep the same DeviceId as the previous one in case\n * of a reconnection.\n */\n this.updateInternalDiscoveredDevices();\n }\n\n public destroy() {\n this.stopListeningToConnectionEvents();\n this._deviceConnectionsByHidDevice.forEach((connection) => {\n connection.disconnect();\n });\n this._deviceConnectionsPendingReconnection.clear();\n }\n}\n"],
5
+ "mappings": "iOAAA,UAAYA,MAAY,kBACxB,OAAS,UAAAC,EAAQ,cAAAC,MAAkB,YACnC,OAAiB,eAAAC,EAAa,QAAAC,EAAM,SAAAC,EAAO,SAAAC,MAAa,YACxD,OAAS,mBAAAC,EAAiB,QAAAC,EAAM,OAAAC,EAAiB,aAAAC,MAAiB,OAClE,OAAS,MAAMC,MAAY,OAM3B,OACE,qBAAAC,MAEK,2CAEP,OAAS,oBAAAC,MAAwB,6CAEjC,OAAS,eAAAC,MAAmB,4CAG5B,OAEE,4BAAAC,EACA,2BAAAC,EACA,0BAAAC,EAEA,sBAAAC,EACA,oCAAAC,MACK,mCACP,OAAS,2BAAAC,MAA+B,oDAExC,OAAS,oBAAAC,MAAwB,4CACjC,OAAS,cAAAC,MAAkB,wCASpB,IAAMC,EAAN,KAA8C,CA2BnD,YAEUC,EAERC,EAEAC,EACA,CALQ,2BAAAF,EAMR,KAAK,QAAUC,EAAqB,oBAAoB,EACxD,KAAK,+BAAiCC,EAEtC,KAAK,iCAAiC,CACxC,CArCQ,2BAEJ,IAAIC,EAA0D,CAAC,CAAC,EAG5D,8BAGJ,IAAI,IAMA,sCACN,IAAI,IAGE,oCACN,IAAI,gBACE,QACA,+BACS,eAAiC,MACjC,WAAkCC,EAAkB,IAoBrE,IAAY,QAAwD,CAClE,OAAI,KAAK,YAAY,EACZC,EAAM,UAAU,GAAG,EAGrBC,EAAK,IAAIC,EAAiC,sBAAsB,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xC,KAAK,sCAAsC,IAAIA,CAAwB,EACvE,KAAK,8BAA8B,OAAOhB,EAAM,MAAM,EAE1D,CAEQ,yBACNO,EACA7B,EACA,CACA,KAAK,sCAAsC,OAAO6B,CAAgB,EAClE,KAAK,8BAA8B,IAAI7B,EAAW6B,CAAgB,EAElE,GAAI,CACFA,EAAiB,mBAAmB7B,CAAS,CAC/C,OAASH,EAAO,CACd,KAAK,QAAQ,MAAM,qCAAsC,CACvD,KAAM,CAAE,MAAO,MAAAA,CAAM,CACvB,CAAC,EACDgC,EAAiB,WAAW,CAC9B,CACF,CAMQ,4BAA4BP,EAAc,CAChD,GAAI,CAAC,KAAK,qBAAqBA,CAAK,EAAG,CACrC,KAAK,QAAQ,MAAM,gBAAiB,CAAE,KAAM,CAAE,MAAAA,CAAM,CAAE,CAAC,EACvD,MACF,CAEA,KAAK,QAAQ,KAAK,iDAAkD,CAClE,KAAM,CAAE,MAAAA,CAAM,CAChB,CAAC,EAED,MAAMgB,EAA2B,MAAM,KACrC,KAAK,qCACP,EAAE,KACCT,GACC,KAAK,mBAAmBA,EAAiB,MAAM,IAC/C,KAAK,mBAAmBP,EAAM,MAAM,CACxC,EAEIgB,GACF,KAAK,yBAAyBA,EAA0BhB,EAAM,MAAM,EAQtE,KAAK,gCAAgC,CACvC,CAEO,SAAU,CACf,KAAK,gCAAgC,EACrC,KAAK,8BAA8B,QAASiB,GAAe,CACzDA,EAAW,WAAW,CACxB,CAAC,EACD,KAAK,sCAAsC,MAAM,CACnD,CACF,EA3fapD,EAANqD,EAAA,CADNC,EAAW,EA6BPC,EAAA,EAAAC,EAAOC,EAAiB,qBAAqB,GAE7CF,EAAA,EAAAC,EAAOE,EAAY,6BAA6B,GAEhDH,EAAA,EAAAC,EAAOG,EAAW,6BAA6B,IAhCvC3D",
6
+ "names": ["Sentry", "inject", "injectable", "EitherAsync", "Left", "Maybe", "Right", "BehaviorSubject", "from", "map", "switchMap", "uuid", "BuiltinTransports", "deviceModelTypes", "loggerTypes", "DeviceNotRecognizedError", "NoAccessibleDeviceError", "OpeningConnectionError", "UnknownDeviceError", "UsbHidTransportNotSupportedError", "InternalConnectedDevice", "LEDGER_VENDOR_ID", "usbDiTypes", "WebUsbHidTransport", "deviceModelDataSource", "loggerServiceFactory", "usbHidDeviceConnectionFactory", "BehaviorSubject", "BuiltinTransports", "Right", "Left", "UsbHidTransportNotSupportedError", "result", "error", "EitherAsync", "hidApi", "hidDevice", "LEDGER_VENDOR_ID", "deviceError", "NoAccessibleDeviceError", "Sentry", "existingDiscoveredDevice", "internalDevice", "existingDeviceConnection", "deviceModel", "id", "uuid", "discoveredDevice", "DeviceNotRecognizedError", "map", "devices", "device", "hidDevices", "discoveredHidDevices", "from", "switchMap", "either", "discoveredDevices", "event", "deviceId", "onDisconnect", "matchingInternalDevice", "UnknownDeviceError", "connectionError", "OpeningConnectionError", "deviceConnection", "connectedDevice", "InternalConnectedDevice", "apdu", "triggersDisconnection", "productId", "matchingModel", "Maybe", "params", "matchingDeviceConnection", "connection", "__decorateClass", "injectable", "__decorateParam", "inject", "deviceModelTypes", "loggerTypes", "usbDiTypes"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{Left as b,Right as k}from"purify-ts";import{Subject as C}from"rxjs";import{DeviceModelId as u}from"../../../../api/device/DeviceModel";import{StaticDeviceModelDataSource as y}from"../../../device-model/data/StaticDeviceModelDataSource";import{DefaultLoggerPublisherService as B}from"../../../logger-publisher/service/DefaultLoggerPublisherService";import{DeviceNotRecognizedError as H,NoAccessibleDeviceError as g,OpeningConnectionError as T,UnknownDeviceError as w,UsbHidTransportNotSupportedError as N}from"../../../transport/model/Errors";import{connectedDeviceStubBuilder as R}from"../../../transport/model/InternalConnectedDevice.stub";import{RECONNECT_DEVICE_TIMEOUT as p}from"../../../transport/usb/data/UsbHidConfig";import{hidDeviceStubBuilder as l}from"../../../transport/usb/model/HIDDevice.stub";import{usbHidDeviceConnectionFactoryStubBuilder as O}from"../../../transport/usb/service/UsbHidDeviceConnectionFactory.stub";import{WebUsbHidTransport as S}from"./WebUsbHidTransport";jest.mock("@internal/logger-publisher/service/LoggerPublisherService");const f=new y,M=new B([],"web-usb-hid"),d=l(),m=()=>new Promise(jest.requireActual("timers").setImmediate);describe("WebUsbHidTransport",()=>{let i;function x(){i=new S(f,()=>M,O())}beforeEach(()=>{x(),jest.useFakeTimers()}),afterEach(()=>{jest.restoreAllMocks()});const a=(s,r)=>{i.startDiscovering().subscribe({next:s,error:r})};describe("When WebHID API is not supported",()=>{it("should not support the transport",()=>{expect(i.isSupported()).toBe(!1)}),it("should emit a startDiscovering error",s=>{a(()=>{s("Should not emit any value")},r=>{expect(r).toBeInstanceOf(N),s()})})}),describe("When WebHID API is supported",()=>{const s=jest.fn(),r=jest.fn(),I=new C,E=new C;function D(t){I.next({device:t})}function h(t){E.next({device:t})}beforeEach(()=>{global.navigator={hid:{getDevices:s,requestDevice:r,addEventListener:(t,e)=>{t==="disconnect"?E.subscribe(e):t==="connect"&&I.subscribe(e)}}},x()}),afterEach(()=>{jest.restoreAllMocks(),global.navigator=void 0}),it("should support the transport",()=>{expect(i.isSupported()).toBe(!0)}),describe("startDiscovering",()=>{f.getAllDeviceModels().flatMap(e=>[{testTitle:`should emit device if user grants access through hid.requestDevice (${e.productName})`,hidDevice:l({productId:e.usbProductId<<8,productName:e.productName}),expectedDeviceModel:e},{testTitle:`should emit device if user grants access through hid.requestDevice (${e.productName}, bootloader)`,hidDevice:l({productId:e.bootloaderUsbProductId,productName:e.productName}),expectedDeviceModel:e}]).forEach(e=>{it(e.testTitle,c=>{r.mockResolvedValueOnce([e.hidDevice]),a(o=>{try{expect(o).toEqual(expect.objectContaining({deviceModel:e.expectedDeviceModel})),c()}catch(n){c(n)}},o=>{c(o)})})}),it("should emit devices if new grant accesses",e=>{r.mockResolvedValueOnce([d,{...d,productId:20497,productName:"Ledger Nano S Plus"}]);let c=0;a(o=>{try{switch(c){case 0:expect(o).toEqual(expect.objectContaining({deviceModel:expect.objectContaining({id:u.NANO_X,productName:"Ledger Nano X",usbProductId:64})}));break;case 1:expect(o).toEqual(expect.objectContaining({deviceModel:expect.objectContaining({id:u.NANO_SP,productName:"Ledger Nano S Plus",usbProductId:80})})),e();break}c++}catch(n){e(n)}},o=>{e(o)})}),it("should throw DeviceNotRecognizedError if the device is not recognized",e=>{r.mockResolvedValueOnce([{...d,productId:16962}]),a(()=>{e("should not return a device")},c=>{expect(c).toBeInstanceOf(H),e()})}),it("should emit an error if the request device is in error",e=>{const c="request device error";r.mockImplementationOnce(()=>{throw new Error(c)}),a(()=>{e("should not return a device")},o=>{expect(o).toBeInstanceOf(g),expect(o).toStrictEqual(new g(new Error(c))),e()})}),it("should emit an error if the user did not grant us access to a device (clicking on cancel on the browser popup for ex)",e=>{r.mockResolvedValueOnce([]),a(c=>{e(`Should not emit any value, but emitted ${JSON.stringify(c)}`)},c=>{try{expect(c).toBeInstanceOf(g),e()}catch(o){e(o)}})}),it("should emit the same discoveredDevice object if its discovered twice in a row",async()=>{r.mockResolvedValue([d]),s.mockResolvedValue([d]);const e=await new Promise((o,n)=>{a(o,v=>n(v))}),c=await new Promise((o,n)=>{a(o,v=>n(v))});expect(c).toBe(e)})}),describe("destroy",()=>{it("should stop monitoring connections if the discovery process is halted",()=>{const t=jest.spyOn(AbortController.prototype,"abort");i.destroy(),expect(t).toHaveBeenCalled()})}),describe("connect",()=>{it("should throw UnknownDeviceError if no internal device",async()=>{const t={deviceId:"fake",onDisconnect:jest.fn()},e=await i.connect(t);expect(e).toStrictEqual(b(new w("Unknown device fake")))}),it("should throw OpeningConnectionError if the device is already opened",async()=>{const t={deviceId:"fake",onDisconnect:jest.fn()},e=await i.connect(t);expect(e).toStrictEqual(b(new w("Unknown device fake")))}),it("should throw OpeningConnectionError if the device cannot be opened",t=>{const e="cannot be opened",c={...d,open:()=>{throw new Error(e)}};r.mockResolvedValueOnce([c]),s.mockResolvedValue([c]),a(o=>{i.connect({deviceId:o.id,onDisconnect:jest.fn()}).then(n=>{expect(n).toStrictEqual(b(new T(new Error(e)))),t()}).catch(n=>{t(n)})},o=>{t(o)})}),it("should return the opened device",t=>{const e={...d,opened:!1,open:()=>(e.opened=!0,Promise.resolve())};r.mockResolvedValue([e]),s.mockResolvedValue([e]),a(c=>{i.connect({deviceId:c.id,onDisconnect:jest.fn()}).then(o=>{o.ifRight(n=>{expect(n).toEqual(expect.objectContaining({id:c.id})),t()}).ifLeft(()=>{t(o)})}).catch(o=>{t(o)})},c=>{t(c)})}),it("should return a device if available",t=>{r.mockResolvedValueOnce([d]),s.mockResolvedValue([d]),a(e=>{i.connect({deviceId:e.id,onDisconnect:jest.fn()}).then(c=>{c.ifRight(o=>{expect(o).toEqual(expect.objectContaining({id:e.id})),t()}).ifLeft(()=>{t(c)})}).catch(c=>{t(c)})},e=>{t(e)})})}),describe("disconnect",()=>{it("should throw an error if the device is not connected",async()=>{const t=R(),e=await i.disconnect({connectedDevice:t});expect(e).toStrictEqual(b(new w(`Unknown device ${t.id}`)))}),it("should disconnect if the device is connected",t=>{r.mockResolvedValueOnce([d]),a(e=>{i.connect({deviceId:e.id,onDisconnect:jest.fn()}).then(c=>{c.ifRight(o=>{i.disconnect({connectedDevice:o}).then(n=>{expect(n).toStrictEqual(k(void 0)),t()}).catch(n=>{t(n)})}).ifLeft(()=>{t(c)})}).catch(c=>{t(c)})},e=>{t(e)})}),it("should call disconnect handler if a connected device is unplugged",t=>{const e=jest.fn();r.mockResolvedValueOnce([d]),i.startDiscovering().subscribe({next:c=>{i.connect({deviceId:c.id,onDisconnect:e}).then(async()=>{h(d),expect(d.close).toHaveBeenCalled(),await Promise.resolve(),expect(e).not.toHaveBeenCalled(),jest.advanceTimersByTime(p/2),expect(e).not.toHaveBeenCalled(),jest.advanceTimersByTime(p/2),expect(e).toHaveBeenCalled(),t()}).catch(o=>{t(o)})}})})}),describe("reconnect",()=>{it("should stop disconnection if reconnection happen",t=>{const e=jest.fn(),c=l(),o=l();r.mockResolvedValueOnce([c]),s.mockResolvedValue([c,o]),a(async n=>{try{await i.connect({deviceId:n.id,onDisconnect:e}),h(c),expect(c.close).toHaveBeenCalled(),await Promise.resolve(),jest.advanceTimersByTime(p/3),D(o),expect(o.open).toHaveBeenCalled(),await Promise.resolve(),jest.advanceTimersByTime(p),expect(e).not.toHaveBeenCalled(),t()}catch(v){t(v)}})}),it("should be able to reconnect twice in a row if the device is unplugged and replugged twice",t=>{const e=jest.fn(),c=l(),o=l(),n=l();r.mockResolvedValueOnce([c]),s.mockResolvedValue([c,o,n]),a(async v=>{await i.connect({deviceId:v.id,onDisconnect:e});try{h(c),expect(c.close).toHaveBeenCalled(),await Promise.resolve(),jest.advanceTimersByTime(p/3),D(o),expect(o.open).toHaveBeenCalled(),await Promise.resolve(),jest.advanceTimersByTime(p),expect(e).not.toHaveBeenCalled(),h(o),expect(o.close).toHaveBeenCalled(),await Promise.resolve(),jest.advanceTimersByTime(p/3),D(n),expect(n.open).toHaveBeenCalled(),await Promise.resolve(),jest.advanceTimersByTime(p),expect(e).not.toHaveBeenCalled(),t()}catch(j){t(j)}})})}),describe("Connection event typeguard",()=>{it("should validate type of an HIDConnectionEvent",()=>{const t={device:d},e=i.isHIDConnectionEvent(t);expect(e).toBe(!0)}),it("should not validate type of another event",()=>{const t=new Event("disconnect",{}),e=i.isHIDConnectionEvent(t);expect(e).toBe(!1)})}),describe("listenToKnownDevices",()=>{it("should emit the devices already connected before listening",async()=>{const t=l();s.mockResolvedValue([t]);const e=jest.fn(),c=jest.fn();let o=[];i.listenToKnownDevices().subscribe({next:n=>{o=n},complete:e,error:c}),await m(),expect(o).toEqual([expect.objectContaining({deviceModel:expect.objectContaining({id:u.NANO_X})})]),expect(e).not.toHaveBeenCalled(),expect(c).not.toHaveBeenCalled()}),it("should emit the new list of devices after connection and disconnection events",async()=>{x();const t=l({productId:f.getDeviceModel({id:u.NANO_X}).usbProductId<<8}),e=l({productId:f.getDeviceModel({id:u.STAX}).usbProductId<<8});s.mockResolvedValue([t]);const c=jest.fn(),o=jest.fn();let n=[];i.listenToKnownDevices().subscribe({next:v=>{n=v},complete:c,error:o}),await m(),expect(n).toEqual([expect.objectContaining({deviceModel:expect.objectContaining({id:u.NANO_X})})]),s.mockResolvedValue([t,e]),D(e),await m(),expect(n).toEqual([expect.objectContaining({deviceModel:expect.objectContaining({id:u.NANO_X})}),expect.objectContaining({deviceModel:expect.objectContaining({id:u.STAX})})]),s.mockResolvedValue([e]),h(t),await m(),expect(n).toEqual([expect.objectContaining({deviceModel:expect.objectContaining({id:u.STAX})})]),expect(c).not.toHaveBeenCalled(),expect(o).not.toHaveBeenCalled()}),it("should preserve DeviceId in case the device has been disconnected and reconnected before the timeout",async()=>{const t=l();s.mockResolvedValue([t]);const e=jest.fn(),c=jest.fn();let o=[];i.listenToKnownDevices().subscribe({next:v=>{o=v},complete:e,error:c}),await m();const n=o[0]?.id;expect(n).toBeTruthy(),expect(o[0]?.deviceModel?.id).toBe(u.NANO_X),await i.connect({deviceId:o[0].id,onDisconnect:jest.fn()}),await m(),s.mockResolvedValue([]),h(t),await m(),expect(o).toEqual([]),s.mockResolvedValue([t]),D(t),await m(),expect(o).toEqual([expect.objectContaining({deviceModel:expect.objectContaining({id:u.NANO_X})})]),expect(o[0]?.id).toBeTruthy(),expect(o[0]?.id).toBe(n)})})})});
2
+ //# sourceMappingURL=WebUsbHidTransport.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../src/internal/transport/usb/transport/WebUsbHidTransport.test.ts"],
4
+ "sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { Subject } from \"rxjs\";\n\nimport { type DeviceModel, DeviceModelId } from \"@api/device/DeviceModel\";\nimport { StaticDeviceModelDataSource } from \"@internal/device-model/data/StaticDeviceModelDataSource\";\nimport { type InternalDeviceModel } from \"@internal/device-model/model/DeviceModel\";\nimport { DefaultLoggerPublisherService } from \"@internal/logger-publisher/service/DefaultLoggerPublisherService\";\nimport {\n DeviceNotRecognizedError,\n NoAccessibleDeviceError,\n OpeningConnectionError,\n UnknownDeviceError,\n UsbHidTransportNotSupportedError,\n} from \"@internal/transport/model/Errors\";\nimport { connectedDeviceStubBuilder } from \"@internal/transport/model/InternalConnectedDevice.stub\";\nimport { type InternalDiscoveredDevice } from \"@internal/transport/model/InternalDiscoveredDevice\";\nimport { RECONNECT_DEVICE_TIMEOUT } from \"@internal/transport/usb/data/UsbHidConfig\";\nimport { hidDeviceStubBuilder } from \"@internal/transport/usb/model/HIDDevice.stub\";\nimport { usbHidDeviceConnectionFactoryStubBuilder } from \"@internal/transport/usb/service/UsbHidDeviceConnectionFactory.stub\";\n\nimport { WebUsbHidTransport } from \"./WebUsbHidTransport\";\n\njest.mock(\"@internal/logger-publisher/service/LoggerPublisherService\");\n\n// Our StaticDeviceModelDataSource can directly be used in our unit tests\nconst usbDeviceModelDataSource = new StaticDeviceModelDataSource();\nconst logger = new DefaultLoggerPublisherService([], \"web-usb-hid\");\n\nconst stubDevice: HIDDevice = hidDeviceStubBuilder();\n\n/**\n * Flushes all pending promises\n */\nconst flushPromises = () =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n new Promise(jest.requireActual(\"timers\").setImmediate);\n\ndescribe(\"WebUsbHidTransport\", () => {\n let transport: WebUsbHidTransport;\n\n function initializeTransport() {\n transport = new WebUsbHidTransport(\n usbDeviceModelDataSource,\n () => logger,\n usbHidDeviceConnectionFactoryStubBuilder(),\n );\n }\n\n beforeEach(() => {\n initializeTransport();\n jest.useFakeTimers();\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n const discoverDevice = (\n onSuccess: (discoveredDevice: InternalDiscoveredDevice) => void,\n onError?: (error: unknown) => void,\n ) => {\n transport.startDiscovering().subscribe({\n next: onSuccess,\n error: onError,\n });\n };\n\n describe(\"When WebHID API is not supported\", () => {\n it(\"should not support the transport\", () => {\n expect(transport.isSupported()).toBe(false);\n });\n\n it(\"should emit a startDiscovering error\", (done) => {\n discoverDevice(\n () => {\n done(\"Should not emit any value\");\n },\n (error) => {\n expect(error).toBeInstanceOf(UsbHidTransportNotSupportedError);\n done();\n },\n );\n });\n });\n\n describe(\"When WebHID API is supported\", () => {\n const mockedGetDevices = jest.fn();\n const mockedRequestDevice = jest.fn();\n\n const connectionEventsSubject = new Subject<HIDConnectionEvent>();\n const disconnectionEventsSubject = new Subject<HIDConnectionEvent>();\n\n function emitHIDConnectionEvent(device: HIDDevice) {\n connectionEventsSubject.next({\n device,\n } as HIDConnectionEvent);\n }\n\n function emitHIDDisconnectionEvent(device: HIDDevice) {\n disconnectionEventsSubject.next({\n device,\n } as HIDConnectionEvent);\n }\n\n beforeEach(() => {\n global.navigator = {\n hid: {\n getDevices: mockedGetDevices,\n requestDevice: mockedRequestDevice,\n addEventListener: (\n eventName: string,\n callback: (event: HIDConnectionEvent) => void,\n ) => {\n if (eventName === \"disconnect\") {\n disconnectionEventsSubject.subscribe(callback);\n } else if (eventName === \"connect\") {\n connectionEventsSubject.subscribe(callback);\n }\n },\n },\n } as unknown as Navigator;\n initializeTransport();\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n global.navigator = undefined as unknown as Navigator;\n });\n\n it(\"should support the transport\", () => {\n expect(transport.isSupported()).toBe(true);\n });\n\n describe(\"startDiscovering\", () => {\n const testCases = usbDeviceModelDataSource\n .getAllDeviceModels()\n .flatMap((deviceModel) => {\n return [\n {\n testTitle: `should emit device if user grants access through hid.requestDevice (${deviceModel.productName})`,\n hidDevice: hidDeviceStubBuilder({\n productId: deviceModel.usbProductId << 8,\n productName: deviceModel.productName,\n }),\n expectedDeviceModel: deviceModel,\n },\n {\n testTitle: `should emit device if user grants access through hid.requestDevice (${deviceModel.productName}, bootloader)`,\n hidDevice: hidDeviceStubBuilder({\n productId: deviceModel.bootloaderUsbProductId,\n productName: deviceModel.productName,\n }),\n expectedDeviceModel: deviceModel,\n },\n ];\n });\n testCases.forEach((testCase) => {\n it(testCase.testTitle, (done) => {\n mockedRequestDevice.mockResolvedValueOnce([testCase.hidDevice]);\n\n discoverDevice(\n (discoveredDevice) => {\n try {\n expect(discoveredDevice).toEqual(\n expect.objectContaining({\n deviceModel: testCase.expectedDeviceModel,\n }),\n );\n\n done();\n } catch (expectError) {\n done(expectError);\n }\n },\n (error) => {\n done(error);\n },\n );\n });\n });\n\n // It does not seem possible for a user to select several devices on the browser popup.\n // But if it was possible, we should emit them\n it(\"should emit devices if new grant accesses\", (done) => {\n mockedRequestDevice.mockResolvedValueOnce([\n stubDevice,\n {\n ...stubDevice,\n productId: 0x5011,\n productName: \"Ledger Nano S Plus\",\n },\n ]);\n\n let count = 0;\n discoverDevice(\n (discoveredDevice) => {\n try {\n switch (count) {\n case 0:\n expect(discoveredDevice).toEqual(\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.NANO_X,\n productName: \"Ledger Nano X\",\n usbProductId: 0x40,\n }) as DeviceModel,\n }),\n );\n break;\n case 1:\n expect(discoveredDevice).toEqual(\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.NANO_SP,\n productName: \"Ledger Nano S Plus\",\n usbProductId: 0x50,\n }) as DeviceModel,\n }),\n );\n\n done();\n break;\n }\n\n count++;\n } catch (expectError) {\n done(expectError);\n }\n },\n (error) => {\n done(error);\n },\n );\n });\n\n it(\"should throw DeviceNotRecognizedError if the device is not recognized\", (done) => {\n mockedRequestDevice.mockResolvedValueOnce([\n {\n ...stubDevice,\n productId: 0x4242,\n },\n ]);\n\n discoverDevice(\n () => {\n done(\"should not return a device\");\n },\n (error) => {\n expect(error).toBeInstanceOf(DeviceNotRecognizedError);\n done();\n },\n );\n });\n\n it(\"should emit an error if the request device is in error\", (done) => {\n const message = \"request device error\";\n mockedRequestDevice.mockImplementationOnce(() => {\n throw new Error(message);\n });\n\n discoverDevice(\n () => {\n done(\"should not return a device\");\n },\n (error) => {\n expect(error).toBeInstanceOf(NoAccessibleDeviceError);\n expect(error).toStrictEqual(\n new NoAccessibleDeviceError(new Error(message)),\n );\n done();\n },\n );\n });\n\n // [ASK] Is this the behavior we want when the user does not select any device ?\n it(\"should emit an error if the user did not grant us access to a device (clicking on cancel on the browser popup for ex)\", (done) => {\n // When the user does not select any device, the `requestDevice` will return an empty array\n mockedRequestDevice.mockResolvedValueOnce([]);\n\n discoverDevice(\n (discoveredDevice) => {\n done(\n `Should not emit any value, but emitted ${JSON.stringify(\n discoveredDevice,\n )}`,\n );\n },\n (error) => {\n try {\n expect(error).toBeInstanceOf(NoAccessibleDeviceError);\n done();\n } catch (expectError) {\n done(expectError);\n }\n },\n );\n });\n\n it(\"should emit the same discoveredDevice object if its discovered twice in a row\", async () => {\n mockedRequestDevice.mockResolvedValue([stubDevice]);\n mockedGetDevices.mockResolvedValue([stubDevice]);\n\n const firstDiscoveredDevice = await new Promise((resolve, reject) => {\n discoverDevice(resolve, (err) => reject(err));\n });\n const secondDiscoveredDevice = await new Promise((resolve, reject) => {\n discoverDevice(resolve, (err) => reject(err));\n });\n expect(secondDiscoveredDevice).toBe(firstDiscoveredDevice);\n });\n });\n\n describe(\"destroy\", () => {\n it(\"should stop monitoring connections if the discovery process is halted\", () => {\n const abortSpy = jest.spyOn(AbortController.prototype, \"abort\");\n\n transport.destroy();\n\n expect(abortSpy).toHaveBeenCalled();\n });\n });\n\n describe(\"connect\", () => {\n it(\"should throw UnknownDeviceError if no internal device\", async () => {\n const connectParams = {\n deviceId: \"fake\",\n onDisconnect: jest.fn(),\n };\n\n const connect = await transport.connect(connectParams);\n\n expect(connect).toStrictEqual(\n Left(new UnknownDeviceError(\"Unknown device fake\")),\n );\n });\n\n it(\"should throw OpeningConnectionError if the device is already opened\", async () => {\n const device = {\n deviceId: \"fake\",\n onDisconnect: jest.fn(),\n };\n\n const connect = await transport.connect(device);\n\n expect(connect).toStrictEqual(\n Left(new UnknownDeviceError(\"Unknown device fake\")),\n );\n });\n\n it(\"should throw OpeningConnectionError if the device cannot be opened\", (done) => {\n const message = \"cannot be opened\";\n const mockedDevice = {\n ...stubDevice,\n open: () => {\n throw new Error(message);\n },\n };\n mockedRequestDevice.mockResolvedValueOnce([mockedDevice]);\n mockedGetDevices.mockResolvedValue([mockedDevice]);\n\n discoverDevice(\n (discoveredDevice) => {\n transport\n .connect({\n deviceId: discoveredDevice.id,\n onDisconnect: jest.fn(),\n })\n .then((value) => {\n expect(value).toStrictEqual(\n Left(new OpeningConnectionError(new Error(message))),\n );\n done();\n })\n .catch((error) => {\n done(error);\n });\n },\n (error) => {\n done(error);\n },\n );\n });\n\n it(\"should return the opened device\", (done) => {\n const mockedDevice = {\n ...stubDevice,\n opened: false,\n open: () => {\n mockedDevice.opened = true;\n return Promise.resolve();\n },\n };\n\n mockedRequestDevice.mockResolvedValue([mockedDevice]);\n mockedGetDevices.mockResolvedValue([mockedDevice]);\n\n discoverDevice(\n (discoveredDevice) => {\n transport\n .connect({\n deviceId: discoveredDevice.id,\n onDisconnect: jest.fn(),\n })\n .then((connectedDevice) => {\n connectedDevice\n .ifRight((device) => {\n expect(device).toEqual(\n expect.objectContaining({ id: discoveredDevice.id }),\n );\n done();\n })\n .ifLeft(() => {\n done(connectedDevice);\n });\n })\n .catch((error) => {\n done(error);\n });\n },\n (error) => {\n done(error);\n },\n );\n });\n\n it(\"should return a device if available\", (done) => {\n mockedRequestDevice.mockResolvedValueOnce([stubDevice]);\n mockedGetDevices.mockResolvedValue([stubDevice]);\n\n discoverDevice(\n (discoveredDevice) => {\n transport\n .connect({\n deviceId: discoveredDevice.id,\n onDisconnect: jest.fn(),\n })\n .then((connectedDevice) => {\n connectedDevice\n .ifRight((device) => {\n expect(device).toEqual(\n expect.objectContaining({ id: discoveredDevice.id }),\n );\n done();\n })\n .ifLeft(() => {\n done(connectedDevice);\n });\n })\n .catch((error) => {\n done(error);\n });\n },\n (error) => {\n done(error);\n },\n );\n });\n });\n\n describe(\"disconnect\", () => {\n it(\"should throw an error if the device is not connected\", async () => {\n // given\n const connectedDevice = connectedDeviceStubBuilder();\n\n // when\n const disconnect = await transport.disconnect({\n connectedDevice,\n });\n\n expect(disconnect).toStrictEqual(\n Left(new UnknownDeviceError(`Unknown device ${connectedDevice.id}`)),\n );\n });\n\n it(\"should disconnect if the device is connected\", (done) => {\n mockedRequestDevice.mockResolvedValueOnce([stubDevice]);\n\n discoverDevice(\n (discoveredDevice) => {\n transport\n .connect({\n deviceId: discoveredDevice.id,\n onDisconnect: jest.fn(),\n })\n .then((connectedDevice) => {\n connectedDevice\n .ifRight((device) => {\n transport\n .disconnect({ connectedDevice: device })\n .then((value) => {\n expect(value).toStrictEqual(Right(void 0));\n done();\n })\n .catch((error) => {\n done(error);\n });\n })\n .ifLeft(() => {\n done(connectedDevice);\n });\n })\n .catch((error) => {\n done(error);\n });\n },\n (error) => {\n done(error);\n },\n );\n });\n\n it(\"should call disconnect handler if a connected device is unplugged\", (done) => {\n // given\n const onDisconnect = jest.fn();\n mockedRequestDevice.mockResolvedValueOnce([stubDevice]);\n\n // when\n transport.startDiscovering().subscribe({\n next: (discoveredDevice) => {\n transport\n .connect({\n deviceId: discoveredDevice.id,\n onDisconnect,\n })\n .then(async () => {\n emitHIDDisconnectionEvent(stubDevice);\n\n expect(stubDevice.close).toHaveBeenCalled();\n await Promise.resolve(); // wait for the next tick so the stubDevice.close promise is resolved\n expect(onDisconnect).not.toHaveBeenCalled();\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT / 2);\n expect(onDisconnect).not.toHaveBeenCalled();\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT / 2);\n expect(onDisconnect).toHaveBeenCalled();\n done();\n })\n .catch((error) => {\n done(error);\n });\n },\n });\n });\n });\n\n describe(\"reconnect\", () => {\n it(\"should stop disconnection if reconnection happen\", (done) => {\n // given\n const onDisconnect = jest.fn();\n\n const hidDevice1 = hidDeviceStubBuilder();\n const hidDevice2 = hidDeviceStubBuilder();\n\n mockedRequestDevice.mockResolvedValueOnce([hidDevice1]);\n mockedGetDevices.mockResolvedValue([hidDevice1, hidDevice2]);\n\n discoverDevice(async (discoveredDevice) => {\n try {\n await transport.connect({\n deviceId: discoveredDevice.id,\n onDisconnect,\n });\n\n /* Disconnection */\n emitHIDDisconnectionEvent(hidDevice1);\n expect(hidDevice1.close).toHaveBeenCalled();\n await Promise.resolve(); // wait for the next tick so the hidDevice1.close promise is resolved\n\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT / 3);\n\n /* Reconnection */\n emitHIDConnectionEvent(hidDevice2);\n\n expect(hidDevice2.open).toHaveBeenCalled();\n await Promise.resolve(); // wait for the next tick so the hidDevice2.open promise is resolved\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT);\n expect(onDisconnect).not.toHaveBeenCalled();\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it(\"should be able to reconnect twice in a row if the device is unplugged and replugged twice\", (done) => {\n // given\n const onDisconnect = jest.fn();\n\n const hidDevice1 = hidDeviceStubBuilder();\n const hidDevice2 = hidDeviceStubBuilder();\n const hidDevice3 = hidDeviceStubBuilder();\n\n mockedRequestDevice.mockResolvedValueOnce([hidDevice1]);\n mockedGetDevices.mockResolvedValue([\n hidDevice1,\n hidDevice2,\n hidDevice3,\n ]);\n\n // when\n discoverDevice(async (discoveredDevice) => {\n await transport.connect({\n deviceId: discoveredDevice.id,\n onDisconnect,\n });\n try {\n /* First disconnection */\n emitHIDDisconnectionEvent(hidDevice1);\n expect(hidDevice1.close).toHaveBeenCalled();\n await Promise.resolve(); // wait for the next tick so the hidDevice1.close promise is resolved\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT / 3);\n\n /* First reconnection */\n emitHIDConnectionEvent(hidDevice2);\n\n expect(hidDevice2.open).toHaveBeenCalled();\n await Promise.resolve(); // wait for the next tick so the hidDevice2.open promise is resolved\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT);\n expect(onDisconnect).not.toHaveBeenCalled();\n\n /* Second disconnection */\n emitHIDDisconnectionEvent(hidDevice2);\n expect(hidDevice2.close).toHaveBeenCalled();\n await Promise.resolve(); // wait for the next tick so the hidDevice2.close promise is resolved\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT / 3);\n\n /* Second reconnection */\n emitHIDConnectionEvent(hidDevice3);\n\n expect(hidDevice3.open).toHaveBeenCalled();\n await Promise.resolve(); // wait for the next tick so the hidDevice3.open promise is resolved\n jest.advanceTimersByTime(RECONNECT_DEVICE_TIMEOUT);\n expect(onDisconnect).not.toHaveBeenCalled();\n\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n });\n describe(\"Connection event typeguard\", () => {\n it(\"should validate type of an HIDConnectionEvent\", () => {\n // given\n const event = {\n device: stubDevice,\n } as HIDConnectionEvent;\n // when\n // @ts-expect-error trying to access private member\n const result = transport.isHIDConnectionEvent(event);\n // then\n expect(result).toBe(true);\n });\n it(\"should not validate type of another event\", () => {\n // given\n const event = new Event(\"disconnect\", {});\n // when\n // @ts-expect-error trying to access private member\n const result = transport.isHIDConnectionEvent(event);\n // then\n expect(result).toBe(false);\n });\n });\n\n describe(\"listenToKnownDevices\", () => {\n it(\"should emit the devices already connected before listening\", async () => {\n // given\n const hidDevice = hidDeviceStubBuilder();\n mockedGetDevices.mockResolvedValue([hidDevice]);\n\n const onComplete = jest.fn();\n const onError = jest.fn();\n\n let observedDevices: InternalDiscoveredDevice[] = [];\n // when\n transport.listenToKnownDevices().subscribe({\n next: (knownDevices) => {\n observedDevices = knownDevices;\n },\n complete: onComplete,\n error: onError,\n });\n\n await flushPromises();\n\n expect(observedDevices).toEqual([\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.NANO_X,\n }) as InternalDeviceModel,\n }),\n ]);\n expect(onComplete).not.toHaveBeenCalled();\n expect(onError).not.toHaveBeenCalled();\n });\n\n it(\"should emit the new list of devices after connection and disconnection events\", async () => {\n initializeTransport();\n // given\n const hidDevice1 = hidDeviceStubBuilder({\n productId:\n usbDeviceModelDataSource.getDeviceModel({\n id: DeviceModelId.NANO_X,\n }).usbProductId << 8,\n });\n const hidDevice2 = hidDeviceStubBuilder({\n productId:\n usbDeviceModelDataSource.getDeviceModel({ id: DeviceModelId.STAX })\n .usbProductId << 8,\n });\n mockedGetDevices.mockResolvedValue([hidDevice1]);\n\n const onComplete = jest.fn();\n const onError = jest.fn();\n\n let observedDevices: InternalDiscoveredDevice[] = [];\n // when\n transport.listenToKnownDevices().subscribe({\n next: (knownDevices) => {\n observedDevices = knownDevices;\n },\n complete: onComplete,\n error: onError,\n });\n\n await flushPromises();\n\n expect(observedDevices).toEqual([\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.NANO_X,\n }) as InternalDeviceModel,\n }),\n ]);\n\n // When a new device is connected\n mockedGetDevices.mockResolvedValue([hidDevice1, hidDevice2]);\n emitHIDConnectionEvent(hidDevice2);\n await flushPromises();\n\n expect(observedDevices).toEqual([\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.NANO_X,\n }) as InternalDeviceModel,\n }),\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.STAX,\n }) as InternalDeviceModel,\n }),\n ]);\n\n // When a device is disconnected\n mockedGetDevices.mockResolvedValue([hidDevice2]);\n emitHIDDisconnectionEvent(hidDevice1);\n await flushPromises();\n\n expect(observedDevices).toEqual([\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.STAX,\n }) as InternalDeviceModel,\n }),\n ]);\n\n expect(onComplete).not.toHaveBeenCalled();\n expect(onError).not.toHaveBeenCalled();\n });\n\n it(\"should preserve DeviceId in case the device has been disconnected and reconnected before the timeout\", async () => {\n // given\n const hidDevice = hidDeviceStubBuilder();\n\n mockedGetDevices.mockResolvedValue([hidDevice]);\n\n const onComplete = jest.fn();\n const onError = jest.fn();\n let observedDevices: InternalDiscoveredDevice[] = [];\n // when\n transport.listenToKnownDevices().subscribe({\n next: (knownDevices) => {\n observedDevices = knownDevices;\n },\n complete: onComplete,\n error: onError,\n });\n\n await flushPromises();\n\n const firstObservedDeviceId = observedDevices[0]?.id;\n expect(firstObservedDeviceId).toBeTruthy();\n expect(observedDevices[0]?.deviceModel?.id).toBe(DeviceModelId.NANO_X);\n\n // Start a connection with the device\n await transport.connect({\n deviceId: observedDevices[0]!.id,\n onDisconnect: jest.fn(),\n });\n await flushPromises();\n\n // When the device is disconnected\n mockedGetDevices.mockResolvedValue([]);\n emitHIDDisconnectionEvent(hidDevice);\n await flushPromises();\n\n expect(observedDevices).toEqual([]);\n\n // When the device is reconnected\n mockedGetDevices.mockResolvedValue([hidDevice]);\n emitHIDConnectionEvent(hidDevice);\n await flushPromises();\n\n expect(observedDevices).toEqual([\n expect.objectContaining({\n deviceModel: expect.objectContaining({\n id: DeviceModelId.NANO_X,\n }) as InternalDeviceModel,\n }),\n ]);\n\n expect(observedDevices[0]?.id).toBeTruthy();\n expect(observedDevices[0]?.id).toBe(firstObservedDeviceId);\n });\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,MAAa,YAC5B,OAAS,WAAAC,MAAe,OAExB,OAA2B,iBAAAC,MAAqB,0BAChD,OAAS,+BAAAC,MAAmC,0DAE5C,OAAS,iCAAAC,MAAqC,mEAC9C,OACE,4BAAAC,EACA,2BAAAC,EACA,0BAAAC,EACA,sBAAAC,EACA,oCAAAC,MACK,mCACP,OAAS,8BAAAC,MAAkC,yDAE3C,OAAS,4BAAAC,MAAgC,4CACzC,OAAS,wBAAAC,MAA4B,+CACrC,OAAS,4CAAAC,MAAgD,qEAEzD,OAAS,sBAAAC,MAA0B,uBAEnC,KAAK,KAAK,2DAA2D,EAGrE,MAAMC,EAA2B,IAAIZ,EAC/Ba,EAAS,IAAIZ,EAA8B,CAAC,EAAG,aAAa,EAE5Da,EAAwBL,EAAqB,EAK7CM,EAAgB,IAEpB,IAAI,QAAQ,KAAK,cAAc,QAAQ,EAAE,YAAY,EAEvD,SAAS,qBAAsB,IAAM,CACnC,IAAIC,EAEJ,SAASC,GAAsB,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AAc,EAEpB,OAAO2C,CAAe,EAAE,QAAQ,CAAC,CAAC,EAGlCnC,EAAiB,kBAAkB,CAACiC,CAAS,CAAC,EAC9C7B,EAAuB6B,CAAS,EAChC,MAAMzC,EAAc,EAEpB,OAAO2C,CAAe,EAAE,QAAQ,CAC9B,OAAO,iBAAiB,CACtB,YAAa,OAAO,iBAAiB,CACnC,GAAI3D,EAAc,MACpB,CAAC,CACH,CAAC,CACH,CAAC,EAED,OAAO2D,EAAgB,CAAC,GAAG,EAAE,EAAE,WAAW,EAC1C,OAAOA,EAAgB,CAAC,GAAG,EAAE,EAAE,KAAKE,CAAqB,CAC3D,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["Left", "Right", "Subject", "DeviceModelId", "StaticDeviceModelDataSource", "DefaultLoggerPublisherService", "DeviceNotRecognizedError", "NoAccessibleDeviceError", "OpeningConnectionError", "UnknownDeviceError", "UsbHidTransportNotSupportedError", "connectedDeviceStubBuilder", "RECONNECT_DEVICE_TIMEOUT", "hidDeviceStubBuilder", "usbHidDeviceConnectionFactoryStubBuilder", "WebUsbHidTransport", "usbDeviceModelDataSource", "logger", "stubDevice", "flushPromises", "transport", "initializeTransport", "discoverDevice", "onSuccess", "onError", "done", "error", "mockedGetDevices", "mockedRequestDevice", "connectionEventsSubject", "disconnectionEventsSubject", "emitHIDConnectionEvent", "device", "emitHIDDisconnectionEvent", "eventName", "callback", "deviceModel", "testCase", "discoveredDevice", "expectError", "count", "message", "firstDiscoveredDevice", "resolve", "reject", "err", "secondDiscoveredDevice", "abortSpy", "connectParams", "connect", "mockedDevice", "value", "connectedDevice", "disconnect", "onDisconnect", "hidDevice1", "hidDevice2", "hidDevice3", "event", "result", "hidDevice", "onComplete", "observedDevices", "knownDevices", "firstObservedDeviceId"]
7
+ }
@@ -0,0 +1,2 @@
1
+ class e{isSupported=jest.fn();getIdentifier=jest.fn();connect=jest.fn();startDiscovering=jest.fn();stopDiscovering=jest.fn();disconnect=jest.fn();listenToKnownDevices=jest.fn()}function n(t={}){return{isSupported:jest.fn(),getIdentifier:jest.fn(),startDiscovering:jest.fn(),stopDiscovering:jest.fn(),connect:jest.fn(),disconnect:jest.fn(),listenToKnownDevices:jest.fn(),...t}}export{e as WebUsbHidTransport,n as usbHidTransportMockBuilder};
2
+ //# sourceMappingURL=WebUsbHidTransport.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../src/internal/transport/usb/transport/__mocks__/WebUsbHidTransport.ts"],
4
+ "sourcesContent": ["import { type Transport } from \"@api/transport/model/Transport\";\n\nexport class WebUsbHidTransport implements Transport {\n isSupported = jest.fn();\n getIdentifier = jest.fn();\n connect = jest.fn();\n startDiscovering = jest.fn();\n stopDiscovering = jest.fn();\n\n disconnect = jest.fn();\n listenToKnownDevices = jest.fn();\n}\n\nexport function usbHidTransportMockBuilder(\n props: Partial<Transport> = {},\n): Transport {\n return {\n isSupported: jest.fn(),\n getIdentifier: jest.fn(),\n startDiscovering: jest.fn(),\n stopDiscovering: jest.fn(),\n connect: jest.fn(),\n disconnect: jest.fn(),\n listenToKnownDevices: jest.fn(),\n ...props,\n };\n}\n"],
5
+ "mappings": "AAEO,MAAMA,CAAwC,CACnD,YAAc,KAAK,GAAG,EACtB,cAAgB,KAAK,GAAG,EACxB,QAAU,KAAK,GAAG,EAClB,iBAAmB,KAAK,GAAG,EAC3B,gBAAkB,KAAK,GAAG,EAE1B,WAAa,KAAK,GAAG,EACrB,qBAAuB,KAAK,GAAG,CACjC,CAEO,SAASC,EACdC,EAA4B,CAAC,EAClB,CACX,MAAO,CACL,YAAa,KAAK,GAAG,EACrB,cAAe,KAAK,GAAG,EACvB,iBAAkB,KAAK,GAAG,EAC1B,gBAAiB,KAAK,GAAG,EACzB,QAAS,KAAK,GAAG,EACjB,WAAY,KAAK,GAAG,EACpB,qBAAsB,KAAK,GAAG,EAC9B,GAAGA,CACL,CACF",
6
+ "names": ["WebUsbHidTransport", "usbHidTransportMockBuilder", "props"]
7
+ }
@@ -1,22 +1,21 @@
1
- import { Container } from "inversify";
2
- import { Observable } from "rxjs";
3
- import { CommandResult } from "./command/model/CommandResult";
4
- import { SendCommandUseCaseArgs } from "./command/use-case/SendCommandUseCase";
5
- import { ExecuteDeviceActionUseCaseArgs } from "./device-action/use-case/ExecuteDeviceActionUseCase";
6
- import { ApduResponse } from "./device-session/ApduResponse";
7
- import { DeviceSessionState } from "./device-session/DeviceSessionState";
8
- import { DeviceSessionId } from "./device-session/types";
9
- import { ConnectedDevice } from "./transport/model/ConnectedDevice";
10
- import { ConnectUseCaseArgs, DisconnectUseCaseArgs, DiscoveredDevice, GetConnectedDeviceUseCaseArgs, SendApduUseCaseArgs, StartDiscoveringUseCaseArgs } from "./types";
11
- import { DeviceSession } from "../internal/device-session/model/DeviceSession";
12
- import { DeviceActionIntermediateValue, ExecuteDeviceActionReturnType } from "./device-action/DeviceAction";
13
- import { SdkError } from "./Error";
1
+ import { type Container } from "inversify";
2
+ import { type Observable } from "rxjs";
3
+ import { type CommandResult } from "./command/model/CommandResult";
4
+ import { type SendCommandUseCaseArgs } from "./command/use-case/SendCommandUseCase";
5
+ import { type ExecuteDeviceActionUseCaseArgs } from "./device-action/use-case/ExecuteDeviceActionUseCase";
6
+ import { type ApduResponse } from "./device-session/ApduResponse";
7
+ import { type DeviceSessionState } from "./device-session/DeviceSessionState";
8
+ import { type DeviceSessionId } from "./device-session/types";
9
+ import { type ConnectedDevice } from "./transport/model/ConnectedDevice";
10
+ import { type ConnectUseCaseArgs, type DisconnectUseCaseArgs, type DiscoveredDevice, type GetConnectedDeviceUseCaseArgs, type SendApduUseCaseArgs, type StartDiscoveringUseCaseArgs } from "./types";
11
+ import { type DeviceActionIntermediateValue, type ExecuteDeviceActionReturnType } from "./device-action/DeviceAction";
12
+ import { type DmkError } from "./Error";
14
13
  /**
15
- * The main class to interact with the SDK.
14
+ * The main class to interact with the Device Management Kit.
16
15
  *
17
- * NB: do not instantiate this class directly, instead, use `DeviceSdkBuilder`.
16
+ * NB: do not instantiate this class directly, instead, use `LedgerDMKBuilder`.
18
17
  */
19
- export declare class DeviceSdk {
18
+ export declare class DeviceManagementKit {
20
19
  readonly container: Container;
21
20
  /**
22
21
  * Returns a promise resolving to the version of the SDK.
@@ -37,11 +36,17 @@ export declare class DeviceSdk {
37
36
  */
38
37
  stopDiscovering(): void;
39
38
  /**
40
- * Connects to a device previously discovered with `DeviceSdk.startDiscovering`.
39
+ * Listen to list of known discovered devices (and later BLE).
40
+ *
41
+ * @returns {Observable<DiscoveredDevice[]>} An observable of known discovered devices.
42
+ */
43
+ listenToKnownDevices(): Observable<DiscoveredDevice[]>;
44
+ /**
45
+ * Connects to a device previously discovered with `DeviceManagementKit.startDiscovering`.
41
46
  * Creates a new device session which:
42
47
  * - Represents the connection to the device.
43
48
  * - Is terminated upon disconnection of the device.
44
- * - Exposes the device state through an observable (see `DeviceSdk.getDeviceSessionState`)
49
+ * - Exposes the device state through an observable (see `DeviceManagementKit.getDeviceSessionState`)
45
50
  * - Should be used for all subsequent communication with the device.
46
51
  *
47
52
  * @param {ConnectUseCaseArgs} args - The device ID (obtained in discovery) to connect to.
@@ -67,7 +72,7 @@ export declare class DeviceSdk {
67
72
  * @returns A promise resolving with the response from the command.
68
73
  */
69
74
  sendCommand<Response, Args, ErrorCodes>(args: SendCommandUseCaseArgs<Response, Args, ErrorCodes>): Promise<CommandResult<Response, ErrorCodes>>;
70
- executeDeviceAction<Output, Input, Error extends SdkError, IntermediateValue extends DeviceActionIntermediateValue>(args: ExecuteDeviceActionUseCaseArgs<Output, Input, Error, IntermediateValue>): ExecuteDeviceActionReturnType<Output, Error, IntermediateValue>;
75
+ executeDeviceAction<Output, Input, Error extends DmkError, IntermediateValue extends DeviceActionIntermediateValue>(args: ExecuteDeviceActionUseCaseArgs<Output, Input, Error, IntermediateValue>): ExecuteDeviceActionReturnType<Output, Error, IntermediateValue>;
71
76
  /**
72
77
  * Gets the connected from its device session ID.
73
78
  *
@@ -84,12 +89,22 @@ export declare class DeviceSdk {
84
89
  getDeviceSessionState(args: {
85
90
  sessionId: DeviceSessionId;
86
91
  }): Observable<DeviceSessionState>;
92
+ /**
93
+ * Close the Device Management kit.
94
+ *
95
+ */
87
96
  close(): void;
88
97
  /**
89
- * Lists all device sessions.
98
+ * Lists all connected devices.
99
+ *
100
+ * @returns {ConnectedDevice[]} The list of device sessions.
101
+ */
102
+ listConnectedDevices(): ConnectedDevice[];
103
+ /**
104
+ * Listen to connected device.
90
105
  *
91
- * @returns {DeviceSession[]} The list of device sessions.
106
+ * @returns {Observable<ConnectedDevice>} An observable of connected device.
92
107
  */
93
- listDeviceSessions(): DeviceSession[];
108
+ listenToConnectedDevice(): Observable<ConnectedDevice>;
94
109
  }
95
- //# sourceMappingURL=DeviceSdk.d.ts.map
110
+ //# sourceMappingURL=DeviceManagementKit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceManagementKit.d.ts","sourceRoot":"","sources":["../../../../src/api/DeviceManagementKit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAGvC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,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,iBAAiB,CAAC;IAQlE;;;;;OAKG;IACH,kBAAkB,CAAC,IAAI,EAAE,6BAA6B,GAAG,eAAe;IAMxE;;;;;OAKG;IACH,qBAAqB,CAAC,IAAI,EAAE;QAC1B,SAAS,EAAE,eAAe,CAAC;KAC5B,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAQlC;;;OAGG;IACH,KAAK;IAML;;;;OAIG;IACH,oBAAoB,IAAI,eAAe,EAAE;IAQzC;;;;OAIG;IACH,uBAAuB,IAAI,UAAU,CAAC,eAAe,CAAC;CAOvD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeviceManagementKit.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceManagementKit.test.d.ts","sourceRoot":"","sources":["../../../../src/api/DeviceManagementKit.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { type LoggerSubscriberService } from "./logger-subscriber/service/LoggerSubscriberService";
2
+ import { type Transport } from "./transport/model/Transport";
3
+ import { type BuiltinTransports } from "./transport/model/TransportIdentifier";
4
+ import { DeviceManagementKit } from "./DeviceManagementKit";
5
+ import { type DmkConfig } from "./DmkConfig";
6
+ /**
7
+ * Builder for the `DeviceManagementKit` class.
8
+ *
9
+ * @example
10
+ * ```
11
+ * const dmk = new LedgerDeviceManagementKitBuilder()
12
+ * .setStub(false)
13
+ * .addTransport(BuiltinTransports.USB)
14
+ * .addCustomTransport(new MyTransport())
15
+ * .addLogger(myLogger)
16
+ * .build();
17
+ * ```
18
+ */
19
+ export declare class DeviceManagementKitBuilder {
20
+ private stub;
21
+ private readonly loggers;
22
+ private readonly transports;
23
+ private readonly customTransports;
24
+ private config;
25
+ build(): DeviceManagementKit;
26
+ setStub(stubbed: boolean): DeviceManagementKitBuilder;
27
+ addTransport(transport: BuiltinTransports): DeviceManagementKitBuilder;
28
+ addCustomTransport(transport: Transport): DeviceManagementKitBuilder;
29
+ /**
30
+ * Add a logger to the SDK that will receive its logs
31
+ */
32
+ addLogger(logger: LoggerSubscriberService): DeviceManagementKitBuilder;
33
+ addConfig(config: Partial<DmkConfig>): DeviceManagementKitBuilder;
34
+ }
35
+ //# sourceMappingURL=DeviceManagementKitBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceManagementKitBuilder.d.ts","sourceRoot":"","sources":["../../../../src/api/DeviceManagementKitBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IACtD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,MAAM,CAGZ;IAEF,KAAK,IAAI,mBAAmB;IAU5B,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,0BAA0B;IAKrD,YAAY,CAAC,SAAS,EAAE,iBAAiB,GAAG,0BAA0B;IAKtE,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,0BAA0B;IAKpE;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,0BAA0B;IAKtE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,0BAA0B;CAOlE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeviceManagementKitBuilder.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceManagementKitBuilder.test.d.ts","sourceRoot":"","sources":["../../../../src/api/DeviceManagementKitBuilder.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export type DmkConfig = {
2
+ mockUrl: string;
3
+ managerApiUrl: string;
4
+ };
5
+ //# sourceMappingURL=DmkConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DmkConfig.d.ts","sourceRoot":"","sources":["../../../../src/api/DmkConfig.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -1,4 +1,4 @@
1
- export interface SdkError {
1
+ export interface DmkError {
2
2
  readonly _tag: string;
3
3
  readonly originalError?: unknown;
4
4
  message?: string;
@@ -17,7 +17,7 @@ export declare abstract class DeviceExchangeError<SpecificErrorCodes = void> {
17
17
  readonly message: string;
18
18
  protected constructor({ tag, errorCode, originalError, message, }: DeviceExchangeErrorArgs<SpecificErrorCodes>);
19
19
  }
20
- export declare class UnknownDeviceExchangeError implements SdkError {
20
+ export declare class UnknownDeviceExchangeError implements DmkError {
21
21
  readonly _tag = "UnknownDeviceExchangeError";
22
22
  readonly originalError?: unknown;
23
23
  readonly message: string;
@@ -1,5 +1,5 @@
1
1
  import { Apdu } from "../../apdu/model/Apdu";
2
- import { AppBuilderError } from "./AppBuilderError";
2
+ import { type AppBuilderError } from "./AppBuilderError";
3
3
  export declare const HEADER_LENGTH = 5;
4
4
  export declare const APDU_MAX_PAYLOAD = 255;
5
5
  export declare const APDU_MAX_SIZE: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ApduBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ApduBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,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;IACH,eAAe,UAAW,UAAU,KAAG,WAAW,CAGhD;IAEF;;;;;OAKG;IACH,mBAAmB,UAAW,MAAM,KAAG,WAAW,CAGhD;IAEF;;;;OAIG;IACH,oBAAoB,UAAW,MAAM,KAAG,WAAW,CAGjD;IAEF;;;;;;OAMG;IACH,kBAAkB,UAAW,MAAM,KAAG,WAAW,CAG/C;IAEF;;;;;;OAMG;IACH,oBAAoB,UAAW,UAAU,KAAG,WAAW,CAGrD;IAEF;;;;;;OAMG;IACH,mBAAmB,UAAW,MAAM,KAAG,WAAW,CAGhD;IAEF;;;OAGG;IACH,yBAAyB,QAAO,MAAM,CACE;IAExC;;;OAGG;IACH,SAAS,QAAO,eAAe,EAAE,CAA0B;CAC5D"}
@@ -1,5 +1,5 @@
1
- import { ApduResponse } from "../../device-session/ApduResponse";
2
- import { HexaString } from "../../utils/HexaString";
1
+ import { type ApduResponse } from "../../device-session/ApduResponse";
2
+ import { type HexaString } from "../../utils/HexaString";
3
3
  export type TaggedField = {
4
4
  readonly tag: number;
5
5
  readonly value: Uint8Array;
@@ -1 +1 @@
1
- {"version":3,"file":"ApduParser.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ApduParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAkB;gBAEpB,QAAQ,EAAE,YAAY;IAIlC;;;;OAIG;IACH,iBAAiB,WAAY,MAAM,KAAG,OAAO,CACL;IAExC;;;OAGG;IACH,eAAe,QAAO,MAAM,GAAG,SAAS,CAAkC;IAE1E;;;OAGG;IACH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B,QAAO,MAAM,GAAG,SAAS,CAAmC;IAE5E;;;;OAIG;IACH,oBAAoB,WAAY,MAAM,KAAG,UAAU,GAAG,SAAS,CACpB;IAE3C;;;OAGG;IACH,qBAAqB,QAAO,UAAU,GAAG,SAAS,CACZ;IAEtC;;;OAGG;IACH,sBAAsB,QAAO,WAAW,GAAG,SAAS,CACb;IAEvC;;;;;OAKG;IACH,kBAAkB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM;IAC9D,kBAAkB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,UAAU;IAUjE;;;;OAIG;IACH,cAAc,WAAY,UAAU,KAAG,MAAM,CACT;IAEpC;;;OAGG;IACH,0BAA0B,QAAO,MAAM,CACI;CAC5C"}
@@ -1,20 +1,20 @@
1
- import { SdkError } from "../../Error";
2
- interface SdkAppBuilderError extends SdkError {
1
+ import { type DmkError } from "../../Error";
2
+ interface DmkAppBuilderError extends DmkError {
3
3
  readonly message: string;
4
4
  }
5
- export declare class ValueOverflowError implements SdkAppBuilderError {
5
+ export declare class ValueOverflowError implements DmkAppBuilderError {
6
6
  readonly _tag = "ValueOverflow";
7
7
  readonly originalError?: Error;
8
8
  readonly message: string;
9
9
  constructor(value: string, max?: number | bigint);
10
10
  }
11
- export declare class DataOverflowError implements SdkAppBuilderError {
11
+ export declare class DataOverflowError implements DmkAppBuilderError {
12
12
  readonly _tag = "DataOverflow";
13
13
  readonly message: string;
14
14
  readonly originalError?: Error;
15
15
  constructor(value: string, remaining?: number);
16
16
  }
17
- export declare class HexaStringEncodeError implements SdkAppBuilderError {
17
+ export declare class HexaStringEncodeError implements DmkAppBuilderError {
18
18
  readonly _tag = "HexaString";
19
19
  readonly message: string;
20
20
  readonly originalError?: Error;
@@ -1 +1 @@
1
- {"version":3,"file":"AppBuilderError.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/AppBuilderError.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K,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBACb,KAAK,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,GAAG,MAAyB;CAGnE;AAED,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;gBACnB,KAAK,EAAE,MAAM,EAAE,SAAS,SAAI;CAMzC;AAED,qBAAa,qBAAsB,YAAW,kBAAkB;IAC9D,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC;gBACnB,KAAK,EAAE,MAAM;CAG1B;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AppBuilderError } from "./AppBuilderError";
1
+ import { type AppBuilderError } from "./AppBuilderError";
2
2
  /**
3
3
  * ByteArrayBuilder is a utility class to help build APDU payloads.
4
4
  * It allows to easily add data to the payload of an APDU command
@@ -1 +1 @@
1
- {"version":3,"file":"ByteArrayBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ByteArrayBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EAIhB,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAgB;IAIf,OAAO,CAAC,cAAc;IAHlC,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;gBAE5B,cAAc,GAAE,MAAwB;IAM5D;;;OAGG;IACH,KAAK,QAAO,UAAU,CAAc;IAEpC;;;;OAIG;IACH,QAAQ,QAAO,UAAU,GAAG,SAAS,CAEnC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G,gBAAgB,CAItD;IAEF;;;;;;OAMG;IACH,kBAAkB,UAAW,MAAM,KAAG,gBAAgB,CAgBpD;IAEF;;;;;;OAMG;IACH,oBAAoB,UAAW,UAAU,KAAG,gBAAgB,CAS1D;IAEF;;;;;;OAMG;IACH,mBAAmB,UAAW,MAAM,KAAG,gBAAgB,CASrD;IAEF;;;OAGG;IACH,yBAAyB,QAAO,MAAM,CAEpC;IAEF;;;OAGG;IACH,SAAS,QAAO,eAAe,EAAE,CAAgB;IAEjD;;;OAGG;IACH,SAAS,QAAO,OAAO,CAA6B;IAMpD;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB,CAO9B;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IA6BvB;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;CAuC9B"}
@@ -1,4 +1,4 @@
1
- import { HexaString } from "../../utils/HexaString";
1
+ import { type HexaString } from "../../utils/HexaString";
2
2
  export type TaggedField = {
3
3
  readonly tag: number;
4
4
  readonly value: Uint8Array;
@@ -1 +1 @@
1
- {"version":3,"file":"ByteArrayParser.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ByteArrayParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,KAAK,CAAa;gBAEG,MAAM,EAAE,UAAU;IAM/C;;;;OAIG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAI1C;;;OAGG;IACH,eAAe,IAAI,MAAM,GAAG,SAAS;IAKrC;;;;OAIG;IACH,gBAAgB,CAAC,SAAS,GAAE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