@ledgerhq/device-core 0.1.1-nightly.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 (375) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/CHANGELOG.md +12 -0
  3. package/LICENSE.txt +21 -0
  4. package/jest.config.json +13 -0
  5. package/lib/capabilities/isCustomLockScreenSupported.d.ts +5 -0
  6. package/lib/capabilities/isCustomLockScreenSupported.d.ts.map +1 -0
  7. package/lib/capabilities/isCustomLockScreenSupported.js +16 -0
  8. package/lib/capabilities/isCustomLockScreenSupported.js.map +1 -0
  9. package/lib/capabilities/isCustomLockScreenSupported.test.d.ts +2 -0
  10. package/lib/capabilities/isCustomLockScreenSupported.test.d.ts.map +1 -0
  11. package/lib/capabilities/isCustomLockScreenSupported.test.js +22 -0
  12. package/lib/capabilities/isCustomLockScreenSupported.test.js.map +1 -0
  13. package/lib/capabilities/isEditDeviceNameSupported.d.ts +3 -0
  14. package/lib/capabilities/isEditDeviceNameSupported.d.ts.map +1 -0
  15. package/lib/capabilities/isEditDeviceNameSupported.js +9 -0
  16. package/lib/capabilities/isEditDeviceNameSupported.js.map +1 -0
  17. package/lib/capabilities/isEditDeviceNameSupported.test.d.ts +2 -0
  18. package/lib/capabilities/isEditDeviceNameSupported.test.d.ts.map +1 -0
  19. package/lib/capabilities/isEditDeviceNameSupported.test.js +19 -0
  20. package/lib/capabilities/isEditDeviceNameSupported.test.js.map +1 -0
  21. package/lib/capabilities/isSyncOnboardingSupported.d.ts +3 -0
  22. package/lib/capabilities/isSyncOnboardingSupported.d.ts.map +1 -0
  23. package/lib/capabilities/isSyncOnboardingSupported.js +9 -0
  24. package/lib/capabilities/isSyncOnboardingSupported.js.map +1 -0
  25. package/lib/capabilities/isSyncOnboardingSupported.test.d.ts +2 -0
  26. package/lib/capabilities/isSyncOnboardingSupported.test.d.ts.map +1 -0
  27. package/lib/capabilities/isSyncOnboardingSupported.test.js +17 -0
  28. package/lib/capabilities/isSyncOnboardingSupported.test.js.map +1 -0
  29. package/lib/commands/entities/APDU.d.ts +9 -0
  30. package/lib/commands/entities/APDU.d.ts.map +1 -0
  31. package/lib/commands/entities/APDU.js +3 -0
  32. package/lib/commands/entities/APDU.js.map +1 -0
  33. package/lib/commands/entities/FirmwareInfoEntity.d.ts +16 -0
  34. package/lib/commands/entities/FirmwareInfoEntity.d.ts.map +1 -0
  35. package/lib/commands/entities/FirmwareInfoEntity.js +3 -0
  36. package/lib/commands/entities/FirmwareInfoEntity.js.map +1 -0
  37. package/lib/commands/use-cases/getDeviceName.d.ts +3 -0
  38. package/lib/commands/use-cases/getDeviceName.d.ts.map +1 -0
  39. package/lib/commands/use-cases/getDeviceName.js +48 -0
  40. package/lib/commands/use-cases/getDeviceName.js.map +1 -0
  41. package/lib/commands/use-cases/getVersion.d.ts +15 -0
  42. package/lib/commands/use-cases/getVersion.d.ts.map +1 -0
  43. package/lib/commands/use-cases/getVersion.js +31 -0
  44. package/lib/commands/use-cases/getVersion.js.map +1 -0
  45. package/lib/commands/use-cases/isBootloaderVersionSupported.d.ts +7 -0
  46. package/lib/commands/use-cases/isBootloaderVersionSupported.d.ts.map +1 -0
  47. package/lib/commands/use-cases/isBootloaderVersionSupported.js +20 -0
  48. package/lib/commands/use-cases/isBootloaderVersionSupported.js.map +1 -0
  49. package/lib/commands/use-cases/isBootloaderVersionSupported.test.d.ts +2 -0
  50. package/lib/commands/use-cases/isBootloaderVersionSupported.test.d.ts.map +1 -0
  51. package/lib/commands/use-cases/isBootloaderVersionSupported.test.js +53 -0
  52. package/lib/commands/use-cases/isBootloaderVersionSupported.test.js.map +1 -0
  53. package/lib/commands/use-cases/isDeviceLocalizationSupported.d.ts +3 -0
  54. package/lib/commands/use-cases/isDeviceLocalizationSupported.d.ts.map +1 -0
  55. package/lib/commands/use-cases/isDeviceLocalizationSupported.js +15 -0
  56. package/lib/commands/use-cases/isDeviceLocalizationSupported.js.map +1 -0
  57. package/lib/commands/use-cases/isDeviceLocalizationSupported.test.d.ts +2 -0
  58. package/lib/commands/use-cases/isDeviceLocalizationSupported.test.d.ts.map +1 -0
  59. package/lib/commands/use-cases/isDeviceLocalizationSupported.test.js +45 -0
  60. package/lib/commands/use-cases/isDeviceLocalizationSupported.test.js.map +1 -0
  61. package/lib/commands/use-cases/isHardwareVersionSupported.d.ts +7 -0
  62. package/lib/commands/use-cases/isHardwareVersionSupported.d.ts.map +1 -0
  63. package/lib/commands/use-cases/isHardwareVersionSupported.js +16 -0
  64. package/lib/commands/use-cases/isHardwareVersionSupported.js.map +1 -0
  65. package/lib/commands/use-cases/isHardwareVersionSupported.test.d.ts +2 -0
  66. package/lib/commands/use-cases/isHardwareVersionSupported.test.d.ts.map +1 -0
  67. package/lib/commands/use-cases/isHardwareVersionSupported.test.js +36 -0
  68. package/lib/commands/use-cases/isHardwareVersionSupported.test.js.map +1 -0
  69. package/lib/commands/use-cases/parseGetDeviceNameResponse.d.ts +3 -0
  70. package/lib/commands/use-cases/parseGetDeviceNameResponse.d.ts.map +1 -0
  71. package/lib/commands/use-cases/parseGetDeviceNameResponse.js +23 -0
  72. package/lib/commands/use-cases/parseGetDeviceNameResponse.js.map +1 -0
  73. package/lib/commands/use-cases/parseGetDeviceNameResponse.test.d.ts +2 -0
  74. package/lib/commands/use-cases/parseGetDeviceNameResponse.test.d.ts.map +1 -0
  75. package/lib/commands/use-cases/parseGetDeviceNameResponse.test.js +27 -0
  76. package/lib/commands/use-cases/parseGetDeviceNameResponse.test.js.map +1 -0
  77. package/lib/commands/use-cases/parseGetVersionResponse.d.ts +4 -0
  78. package/lib/commands/use-cases/parseGetVersionResponse.d.ts.map +1 -0
  79. package/lib/commands/use-cases/parseGetVersionResponse.js +108 -0
  80. package/lib/commands/use-cases/parseGetVersionResponse.js.map +1 -0
  81. package/lib/commands/use-cases/parseGetVersionResponse.test.d.ts +2 -0
  82. package/lib/commands/use-cases/parseGetVersionResponse.test.d.ts.map +1 -0
  83. package/lib/commands/use-cases/parseGetVersionResponse.test.js +105 -0
  84. package/lib/commands/use-cases/parseGetVersionResponse.test.js.map +1 -0
  85. package/lib/customLockScreen/screenSpecs.d.ts +30 -0
  86. package/lib/customLockScreen/screenSpecs.d.ts.map +1 -0
  87. package/lib/customLockScreen/screenSpecs.js +46 -0
  88. package/lib/customLockScreen/screenSpecs.js.map +1 -0
  89. package/lib/index.d.ts +23 -0
  90. package/lib/index.d.ts.map +1 -0
  91. package/lib/index.js +56 -0
  92. package/lib/index.js.map +1 -0
  93. package/lib/managerApi/entities/AppEntity.d.ts +62 -0
  94. package/lib/managerApi/entities/AppEntity.d.ts.map +1 -0
  95. package/lib/managerApi/entities/AppEntity.js +12 -0
  96. package/lib/managerApi/entities/AppEntity.js.map +1 -0
  97. package/lib/managerApi/entities/DeviceInfoEntity.d.ts +22 -0
  98. package/lib/managerApi/entities/DeviceInfoEntity.d.ts.map +1 -0
  99. package/lib/managerApi/entities/DeviceInfoEntity.js +3 -0
  100. package/lib/managerApi/entities/DeviceInfoEntity.js.map +1 -0
  101. package/lib/managerApi/entities/DeviceVersionEntity.d.ts +17 -0
  102. package/lib/managerApi/entities/DeviceVersionEntity.d.ts.map +1 -0
  103. package/lib/managerApi/entities/DeviceVersionEntity.js +3 -0
  104. package/lib/managerApi/entities/DeviceVersionEntity.js.map +1 -0
  105. package/lib/managerApi/entities/FirmwareUpdateContextEntity.d.ts +42 -0
  106. package/lib/managerApi/entities/FirmwareUpdateContextEntity.d.ts.map +1 -0
  107. package/lib/managerApi/entities/FirmwareUpdateContextEntity.js +3 -0
  108. package/lib/managerApi/entities/FirmwareUpdateContextEntity.js.map +1 -0
  109. package/lib/managerApi/entities/Id.d.ts +2 -0
  110. package/lib/managerApi/entities/Id.d.ts.map +1 -0
  111. package/lib/managerApi/entities/Id.js +3 -0
  112. package/lib/managerApi/entities/Id.js.map +1 -0
  113. package/lib/managerApi/entities/LanguagePackageEntity.d.ts +20 -0
  114. package/lib/managerApi/entities/LanguagePackageEntity.d.ts.map +1 -0
  115. package/lib/managerApi/entities/LanguagePackageEntity.js +3 -0
  116. package/lib/managerApi/entities/LanguagePackageEntity.js.map +1 -0
  117. package/lib/managerApi/entities/mocks/aDeviceInfo.d.ts +3 -0
  118. package/lib/managerApi/entities/mocks/aDeviceInfo.d.ts.map +1 -0
  119. package/lib/managerApi/entities/mocks/aDeviceInfo.js +8 -0
  120. package/lib/managerApi/entities/mocks/aDeviceInfo.js.map +1 -0
  121. package/lib/managerApi/entities/mocks/aDeviceVersion.d.ts +3 -0
  122. package/lib/managerApi/entities/mocks/aDeviceVersion.d.ts.map +1 -0
  123. package/lib/managerApi/entities/mocks/aDeviceVersion.js +8 -0
  124. package/lib/managerApi/entities/mocks/aDeviceVersion.js.map +1 -0
  125. package/lib/managerApi/entities/mocks/aFinalFirmware.d.ts +3 -0
  126. package/lib/managerApi/entities/mocks/aFinalFirmware.d.ts.map +1 -0
  127. package/lib/managerApi/entities/mocks/aFinalFirmware.js +8 -0
  128. package/lib/managerApi/entities/mocks/aFinalFirmware.js.map +1 -0
  129. package/lib/managerApi/entities/mocks/aOsuFirmware.d.ts +19 -0
  130. package/lib/managerApi/entities/mocks/aOsuFirmware.d.ts.map +1 -0
  131. package/lib/managerApi/entities/mocks/aOsuFirmware.js +8 -0
  132. package/lib/managerApi/entities/mocks/aOsuFirmware.js.map +1 -0
  133. package/lib/managerApi/repositories/HttpManagerApiRepository.d.ts +18 -0
  134. package/lib/managerApi/repositories/HttpManagerApiRepository.d.ts.map +1 -0
  135. package/lib/managerApi/repositories/HttpManagerApiRepository.js +204 -0
  136. package/lib/managerApi/repositories/HttpManagerApiRepository.js.map +1 -0
  137. package/lib/managerApi/repositories/HttpManagerApiRepository.test.d.ts +2 -0
  138. package/lib/managerApi/repositories/HttpManagerApiRepository.test.d.ts.map +1 -0
  139. package/lib/managerApi/repositories/HttpManagerApiRepository.test.js +402 -0
  140. package/lib/managerApi/repositories/HttpManagerApiRepository.test.js.map +1 -0
  141. package/lib/managerApi/repositories/ManagerApiRepository.d.ts +54 -0
  142. package/lib/managerApi/repositories/ManagerApiRepository.d.ts.map +1 -0
  143. package/lib/managerApi/repositories/ManagerApiRepository.js +3 -0
  144. package/lib/managerApi/repositories/ManagerApiRepository.js.map +1 -0
  145. package/lib/managerApi/repositories/StubManagerApiRepository.d.ts +15 -0
  146. package/lib/managerApi/repositories/StubManagerApiRepository.d.ts.map +1 -0
  147. package/lib/managerApi/repositories/StubManagerApiRepository.js +44 -0
  148. package/lib/managerApi/repositories/StubManagerApiRepository.js.map +1 -0
  149. package/lib/managerApi/use-cases/fetchMcus.d.ts +3 -0
  150. package/lib/managerApi/use-cases/fetchMcus.d.ts.map +1 -0
  151. package/lib/managerApi/use-cases/fetchMcus.js +8 -0
  152. package/lib/managerApi/use-cases/fetchMcus.js.map +1 -0
  153. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.d.ts +12 -0
  154. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.d.ts.map +1 -0
  155. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.js +62 -0
  156. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.js.map +1 -0
  157. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts +2 -0
  158. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts.map +1 -0
  159. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.js +178 -0
  160. package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.js.map +1 -0
  161. package/lib/managerApi/use-cases/getProviderIdUseCase.d.ts +7 -0
  162. package/lib/managerApi/use-cases/getProviderIdUseCase.d.ts.map +1 -0
  163. package/lib/managerApi/use-cases/getProviderIdUseCase.js +23 -0
  164. package/lib/managerApi/use-cases/getProviderIdUseCase.js.map +1 -0
  165. package/lib/managerApi/use-cases/getUserHashes.d.ts +5 -0
  166. package/lib/managerApi/use-cases/getUserHashes.d.ts.map +1 -0
  167. package/lib/managerApi/use-cases/getUserHashes.js +33 -0
  168. package/lib/managerApi/use-cases/getUserHashes.js.map +1 -0
  169. package/lib-es/capabilities/isCustomLockScreenSupported.d.ts +5 -0
  170. package/lib-es/capabilities/isCustomLockScreenSupported.d.ts.map +1 -0
  171. package/lib-es/capabilities/isCustomLockScreenSupported.js +12 -0
  172. package/lib-es/capabilities/isCustomLockScreenSupported.js.map +1 -0
  173. package/lib-es/capabilities/isCustomLockScreenSupported.test.d.ts +2 -0
  174. package/lib-es/capabilities/isCustomLockScreenSupported.test.d.ts.map +1 -0
  175. package/lib-es/capabilities/isCustomLockScreenSupported.test.js +20 -0
  176. package/lib-es/capabilities/isCustomLockScreenSupported.test.js.map +1 -0
  177. package/lib-es/capabilities/isEditDeviceNameSupported.d.ts +3 -0
  178. package/lib-es/capabilities/isEditDeviceNameSupported.d.ts.map +1 -0
  179. package/lib-es/capabilities/isEditDeviceNameSupported.js +5 -0
  180. package/lib-es/capabilities/isEditDeviceNameSupported.js.map +1 -0
  181. package/lib-es/capabilities/isEditDeviceNameSupported.test.d.ts +2 -0
  182. package/lib-es/capabilities/isEditDeviceNameSupported.test.d.ts.map +1 -0
  183. package/lib-es/capabilities/isEditDeviceNameSupported.test.js +17 -0
  184. package/lib-es/capabilities/isEditDeviceNameSupported.test.js.map +1 -0
  185. package/lib-es/capabilities/isSyncOnboardingSupported.d.ts +3 -0
  186. package/lib-es/capabilities/isSyncOnboardingSupported.d.ts.map +1 -0
  187. package/lib-es/capabilities/isSyncOnboardingSupported.js +5 -0
  188. package/lib-es/capabilities/isSyncOnboardingSupported.js.map +1 -0
  189. package/lib-es/capabilities/isSyncOnboardingSupported.test.d.ts +2 -0
  190. package/lib-es/capabilities/isSyncOnboardingSupported.test.d.ts.map +1 -0
  191. package/lib-es/capabilities/isSyncOnboardingSupported.test.js +15 -0
  192. package/lib-es/capabilities/isSyncOnboardingSupported.test.js.map +1 -0
  193. package/lib-es/commands/entities/APDU.d.ts +9 -0
  194. package/lib-es/commands/entities/APDU.d.ts.map +1 -0
  195. package/lib-es/commands/entities/APDU.js +2 -0
  196. package/lib-es/commands/entities/APDU.js.map +1 -0
  197. package/lib-es/commands/entities/FirmwareInfoEntity.d.ts +16 -0
  198. package/lib-es/commands/entities/FirmwareInfoEntity.d.ts.map +1 -0
  199. package/lib-es/commands/entities/FirmwareInfoEntity.js +2 -0
  200. package/lib-es/commands/entities/FirmwareInfoEntity.js.map +1 -0
  201. package/lib-es/commands/use-cases/getDeviceName.d.ts +3 -0
  202. package/lib-es/commands/use-cases/getDeviceName.d.ts.map +1 -0
  203. package/lib-es/commands/use-cases/getDeviceName.js +44 -0
  204. package/lib-es/commands/use-cases/getDeviceName.js.map +1 -0
  205. package/lib-es/commands/use-cases/getVersion.d.ts +15 -0
  206. package/lib-es/commands/use-cases/getVersion.d.ts.map +1 -0
  207. package/lib-es/commands/use-cases/getVersion.js +27 -0
  208. package/lib-es/commands/use-cases/getVersion.js.map +1 -0
  209. package/lib-es/commands/use-cases/isBootloaderVersionSupported.d.ts +7 -0
  210. package/lib-es/commands/use-cases/isBootloaderVersionSupported.d.ts.map +1 -0
  211. package/lib-es/commands/use-cases/isBootloaderVersionSupported.js +16 -0
  212. package/lib-es/commands/use-cases/isBootloaderVersionSupported.js.map +1 -0
  213. package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.d.ts +2 -0
  214. package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.d.ts.map +1 -0
  215. package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.js +51 -0
  216. package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.js.map +1 -0
  217. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.d.ts +3 -0
  218. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.d.ts.map +1 -0
  219. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.js +11 -0
  220. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.js.map +1 -0
  221. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.d.ts +2 -0
  222. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.d.ts.map +1 -0
  223. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.js +43 -0
  224. package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.js.map +1 -0
  225. package/lib-es/commands/use-cases/isHardwareVersionSupported.d.ts +7 -0
  226. package/lib-es/commands/use-cases/isHardwareVersionSupported.d.ts.map +1 -0
  227. package/lib-es/commands/use-cases/isHardwareVersionSupported.js +12 -0
  228. package/lib-es/commands/use-cases/isHardwareVersionSupported.js.map +1 -0
  229. package/lib-es/commands/use-cases/isHardwareVersionSupported.test.d.ts +2 -0
  230. package/lib-es/commands/use-cases/isHardwareVersionSupported.test.d.ts.map +1 -0
  231. package/lib-es/commands/use-cases/isHardwareVersionSupported.test.js +34 -0
  232. package/lib-es/commands/use-cases/isHardwareVersionSupported.test.js.map +1 -0
  233. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.d.ts +3 -0
  234. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.d.ts.map +1 -0
  235. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.js +19 -0
  236. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.js.map +1 -0
  237. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.d.ts +2 -0
  238. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.d.ts.map +1 -0
  239. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.js +25 -0
  240. package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.js.map +1 -0
  241. package/lib-es/commands/use-cases/parseGetVersionResponse.d.ts +4 -0
  242. package/lib-es/commands/use-cases/parseGetVersionResponse.d.ts.map +1 -0
  243. package/lib-es/commands/use-cases/parseGetVersionResponse.js +104 -0
  244. package/lib-es/commands/use-cases/parseGetVersionResponse.js.map +1 -0
  245. package/lib-es/commands/use-cases/parseGetVersionResponse.test.d.ts +2 -0
  246. package/lib-es/commands/use-cases/parseGetVersionResponse.test.d.ts.map +1 -0
  247. package/lib-es/commands/use-cases/parseGetVersionResponse.test.js +103 -0
  248. package/lib-es/commands/use-cases/parseGetVersionResponse.test.js.map +1 -0
  249. package/lib-es/customLockScreen/screenSpecs.d.ts +30 -0
  250. package/lib-es/customLockScreen/screenSpecs.d.ts.map +1 -0
  251. package/lib-es/customLockScreen/screenSpecs.js +40 -0
  252. package/lib-es/customLockScreen/screenSpecs.js.map +1 -0
  253. package/lib-es/index.d.ts +23 -0
  254. package/lib-es/index.d.ts.map +1 -0
  255. package/lib-es/index.js +21 -0
  256. package/lib-es/index.js.map +1 -0
  257. package/lib-es/managerApi/entities/AppEntity.d.ts +62 -0
  258. package/lib-es/managerApi/entities/AppEntity.d.ts.map +1 -0
  259. package/lib-es/managerApi/entities/AppEntity.js +9 -0
  260. package/lib-es/managerApi/entities/AppEntity.js.map +1 -0
  261. package/lib-es/managerApi/entities/DeviceInfoEntity.d.ts +22 -0
  262. package/lib-es/managerApi/entities/DeviceInfoEntity.d.ts.map +1 -0
  263. package/lib-es/managerApi/entities/DeviceInfoEntity.js +2 -0
  264. package/lib-es/managerApi/entities/DeviceInfoEntity.js.map +1 -0
  265. package/lib-es/managerApi/entities/DeviceVersionEntity.d.ts +17 -0
  266. package/lib-es/managerApi/entities/DeviceVersionEntity.d.ts.map +1 -0
  267. package/lib-es/managerApi/entities/DeviceVersionEntity.js +2 -0
  268. package/lib-es/managerApi/entities/DeviceVersionEntity.js.map +1 -0
  269. package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.d.ts +42 -0
  270. package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.d.ts.map +1 -0
  271. package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.js +2 -0
  272. package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.js.map +1 -0
  273. package/lib-es/managerApi/entities/Id.d.ts +2 -0
  274. package/lib-es/managerApi/entities/Id.d.ts.map +1 -0
  275. package/lib-es/managerApi/entities/Id.js +2 -0
  276. package/lib-es/managerApi/entities/Id.js.map +1 -0
  277. package/lib-es/managerApi/entities/LanguagePackageEntity.d.ts +20 -0
  278. package/lib-es/managerApi/entities/LanguagePackageEntity.d.ts.map +1 -0
  279. package/lib-es/managerApi/entities/LanguagePackageEntity.js +2 -0
  280. package/lib-es/managerApi/entities/LanguagePackageEntity.js.map +1 -0
  281. package/lib-es/managerApi/entities/mocks/aDeviceInfo.d.ts +3 -0
  282. package/lib-es/managerApi/entities/mocks/aDeviceInfo.d.ts.map +1 -0
  283. package/lib-es/managerApi/entities/mocks/aDeviceInfo.js +4 -0
  284. package/lib-es/managerApi/entities/mocks/aDeviceInfo.js.map +1 -0
  285. package/lib-es/managerApi/entities/mocks/aDeviceVersion.d.ts +3 -0
  286. package/lib-es/managerApi/entities/mocks/aDeviceVersion.d.ts.map +1 -0
  287. package/lib-es/managerApi/entities/mocks/aDeviceVersion.js +4 -0
  288. package/lib-es/managerApi/entities/mocks/aDeviceVersion.js.map +1 -0
  289. package/lib-es/managerApi/entities/mocks/aFinalFirmware.d.ts +3 -0
  290. package/lib-es/managerApi/entities/mocks/aFinalFirmware.d.ts.map +1 -0
  291. package/lib-es/managerApi/entities/mocks/aFinalFirmware.js +4 -0
  292. package/lib-es/managerApi/entities/mocks/aFinalFirmware.js.map +1 -0
  293. package/lib-es/managerApi/entities/mocks/aOsuFirmware.d.ts +19 -0
  294. package/lib-es/managerApi/entities/mocks/aOsuFirmware.d.ts.map +1 -0
  295. package/lib-es/managerApi/entities/mocks/aOsuFirmware.js +4 -0
  296. package/lib-es/managerApi/entities/mocks/aOsuFirmware.js.map +1 -0
  297. package/lib-es/managerApi/repositories/HttpManagerApiRepository.d.ts +18 -0
  298. package/lib-es/managerApi/repositories/HttpManagerApiRepository.d.ts.map +1 -0
  299. package/lib-es/managerApi/repositories/HttpManagerApiRepository.js +197 -0
  300. package/lib-es/managerApi/repositories/HttpManagerApiRepository.js.map +1 -0
  301. package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.d.ts +2 -0
  302. package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.d.ts.map +1 -0
  303. package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.js +400 -0
  304. package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.js.map +1 -0
  305. package/lib-es/managerApi/repositories/ManagerApiRepository.d.ts +54 -0
  306. package/lib-es/managerApi/repositories/ManagerApiRepository.d.ts.map +1 -0
  307. package/lib-es/managerApi/repositories/ManagerApiRepository.js +2 -0
  308. package/lib-es/managerApi/repositories/ManagerApiRepository.js.map +1 -0
  309. package/lib-es/managerApi/repositories/StubManagerApiRepository.d.ts +15 -0
  310. package/lib-es/managerApi/repositories/StubManagerApiRepository.d.ts.map +1 -0
  311. package/lib-es/managerApi/repositories/StubManagerApiRepository.js +40 -0
  312. package/lib-es/managerApi/repositories/StubManagerApiRepository.js.map +1 -0
  313. package/lib-es/managerApi/use-cases/fetchMcus.d.ts +3 -0
  314. package/lib-es/managerApi/use-cases/fetchMcus.d.ts.map +1 -0
  315. package/lib-es/managerApi/use-cases/fetchMcus.js +4 -0
  316. package/lib-es/managerApi/use-cases/fetchMcus.js.map +1 -0
  317. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.d.ts +12 -0
  318. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.d.ts.map +1 -0
  319. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.js +58 -0
  320. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.js.map +1 -0
  321. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts +2 -0
  322. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts.map +1 -0
  323. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.js +176 -0
  324. package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.js.map +1 -0
  325. package/lib-es/managerApi/use-cases/getProviderIdUseCase.d.ts +7 -0
  326. package/lib-es/managerApi/use-cases/getProviderIdUseCase.d.ts.map +1 -0
  327. package/lib-es/managerApi/use-cases/getProviderIdUseCase.js +19 -0
  328. package/lib-es/managerApi/use-cases/getProviderIdUseCase.js.map +1 -0
  329. package/lib-es/managerApi/use-cases/getUserHashes.d.ts +5 -0
  330. package/lib-es/managerApi/use-cases/getUserHashes.d.ts.map +1 -0
  331. package/lib-es/managerApi/use-cases/getUserHashes.js +26 -0
  332. package/lib-es/managerApi/use-cases/getUserHashes.js.map +1 -0
  333. package/package.json +67 -0
  334. package/src/capabilities/isCustomLockScreenSupported.test.ts +25 -0
  335. package/src/capabilities/isCustomLockScreenSupported.ts +17 -0
  336. package/src/capabilities/isEditDeviceNameSupported.test.ts +18 -0
  337. package/src/capabilities/isEditDeviceNameSupported.ts +5 -0
  338. package/src/capabilities/isSyncOnboardingSupported.test.ts +16 -0
  339. package/src/capabilities/isSyncOnboardingSupported.ts +5 -0
  340. package/src/commands/entities/APDU.ts +12 -0
  341. package/src/commands/entities/FirmwareInfoEntity.ts +14 -0
  342. package/src/commands/use-cases/getDeviceName.ts +38 -0
  343. package/src/commands/use-cases/getVersion.ts +23 -0
  344. package/src/commands/use-cases/isBootloaderVersionSupported.test.ts +58 -0
  345. package/src/commands/use-cases/isBootloaderVersionSupported.ts +24 -0
  346. package/src/commands/use-cases/isDeviceLocalizationSupported.test.ts +48 -0
  347. package/src/commands/use-cases/isDeviceLocalizationSupported.ts +20 -0
  348. package/src/commands/use-cases/isHardwareVersionSupported.test.ts +39 -0
  349. package/src/commands/use-cases/isHardwareVersionSupported.ts +20 -0
  350. package/src/commands/use-cases/parseGetDeviceNameResponse.test.ts +35 -0
  351. package/src/commands/use-cases/parseGetDeviceNameResponse.ts +20 -0
  352. package/src/commands/use-cases/parseGetVersionResponse.test.ts +123 -0
  353. package/src/commands/use-cases/parseGetVersionResponse.ts +121 -0
  354. package/src/customLockScreen/screenSpecs.ts +87 -0
  355. package/src/index.ts +33 -0
  356. package/src/managerApi/entities/AppEntity.ts +66 -0
  357. package/src/managerApi/entities/DeviceInfoEntity.ts +26 -0
  358. package/src/managerApi/entities/DeviceVersionEntity.ts +17 -0
  359. package/src/managerApi/entities/FirmwareUpdateContextEntity.ts +44 -0
  360. package/src/managerApi/entities/Id.ts +1 -0
  361. package/src/managerApi/entities/LanguagePackageEntity.ts +21 -0
  362. package/src/managerApi/entities/mocks/aDeviceInfo.ts +16 -0
  363. package/src/managerApi/entities/mocks/aDeviceVersion.ts +22 -0
  364. package/src/managerApi/entities/mocks/aFinalFirmware.ts +25 -0
  365. package/src/managerApi/entities/mocks/aOsuFirmware.ts +22 -0
  366. package/src/managerApi/repositories/HttpManagerApiRepository.test.ts +494 -0
  367. package/src/managerApi/repositories/HttpManagerApiRepository.ts +284 -0
  368. package/src/managerApi/repositories/ManagerApiRepository.ts +68 -0
  369. package/src/managerApi/repositories/StubManagerApiRepository.ts +49 -0
  370. package/src/managerApi/use-cases/fetchMcus.ts +5 -0
  371. package/src/managerApi/use-cases/getLatestFirmwareForDevice.test.ts +196 -0
  372. package/src/managerApi/use-cases/getLatestFirmwareForDevice.ts +66 -0
  373. package/src/managerApi/use-cases/getProviderIdUseCase.ts +24 -0
  374. package/src/managerApi/use-cases/getUserHashes.ts +30 -0
  375. package/tsconfig.json +16 -0
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devices_1 = require("@ledgerhq/devices");
4
+ const isDeviceLocalizationSupported_1 = require("./isDeviceLocalizationSupported");
5
+ const { nanoS, nanoSP, nanoX, stax } = devices_1.DeviceModelId;
6
+ test("isDeviceLocalizationSupported", () => {
7
+ /**
8
+ * Nano X
9
+ * */
10
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.0.0", nanoX)).toBe(false);
11
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.0.0-whatever0", nanoX)).toBe(false);
12
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.1.0", nanoX)).toBe(true);
13
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.1.0-rc1", nanoX)).toBe(true);
14
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.1.1", nanoX)).toBe(true);
15
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.1.1-whatever0", nanoX)).toBe(true);
16
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.2.0", nanoX)).toBe(true);
17
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.2.0-whatever0", nanoX)).toBe(true);
18
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("3.0.0", nanoX)).toBe(true);
19
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("3.0.0-whatever0", nanoX)).toBe(true);
20
+ /**
21
+ * Nano SP
22
+ * */
23
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.0.0", nanoSP)).toBe(false);
24
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.0.0-whatever", nanoSP)).toBe(false);
25
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.1.0", nanoSP)).toBe(true);
26
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.1.0-rc1", nanoSP)).toBe(true);
27
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.1.2", nanoSP)).toBe(true);
28
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.1.2-whatever0", nanoSP)).toBe(true);
29
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.2.0", nanoSP)).toBe(true);
30
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("1.2.0-whatever0", nanoSP)).toBe(true);
31
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.0.0", nanoSP)).toBe(true);
32
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("2.0.0-whatever0", nanoSP)).toBe(true);
33
+ /**
34
+ * Stax
35
+ * */
36
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("0.9.0", stax)).toBe(false);
37
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("9.0.0", stax)).toBe(true);
38
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("9.0.0-whatever", stax)).toBe(true);
39
+ /**
40
+ * NanoS
41
+ * */
42
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("9.0.0", nanoS)).toBe(false);
43
+ expect((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)("9.0.0-whatever", nanoS)).toBe(false);
44
+ });
45
+ //# sourceMappingURL=isDeviceLocalizationSupported.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isDeviceLocalizationSupported.test.js","sourceRoot":"","sources":["../../../src/commands/use-cases/isDeviceLocalizationSupported.test.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,mFAAgF;AAChF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,uBAAa,CAAC;AAErD,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE;IACzC;;SAEK;IACL,MAAM,CAAC,IAAA,6DAA6B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,CAAC,IAAA,6DAA6B,EAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE5E,MAAM,CAAC,IAAA,6DAA6B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjE,MAAM,CAAC,IAAA,6DAA6B,EAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrE,M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AC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5E,MAAM,CAAC,IAAA,6DAA6B,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,MAAM,CAAC,IAAA,6DAA6B,EAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5E,MAAM,CAAC,IAAA,6DAA6B,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,MAAM,CAAC,IAAA,6DAA6B,EAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE5E;;SAEK;IACL,MAAM,CAAC,IAAA,6DAA6B,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,MAAM,CAAC,IAAA,6DAA6B,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChE,MAAM,CAAC,IAAA,6DAA6B,EAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzE;;SAEK;IACL,MAAM,CAAC,IAAA,6DAA6B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,CAAC,IAAA,6DAA6B,EAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { DeviceModelId } from "@ledgerhq/devices";
2
+ /**
3
+ * @returns whether the Hardware Version bytes are included in the result of the
4
+ * getVersion APDU
5
+ * */
6
+ export declare const isHardwareVersionSupported: (seVersion: string, modelId?: DeviceModelId) => boolean;
7
+ //# sourceMappingURL=isHardwareVersionSupported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isHardwareVersionSupported.d.ts","sourceRoot":"","sources":["../../../src/commands/use-cases/isHardwareVersionSupported.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOlD;;;KAGK;AAEL,eAAO,MAAM,0BAA0B,cAAe,MAAM,YAAY,aAAa,KAAG,OAMrF,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isHardwareVersionSupported = void 0;
4
+ const semver_1 = require("semver");
5
+ const deviceVersionRangesForHardwareVersion = {
6
+ nanoX: ">=2.0.0",
7
+ };
8
+ /**
9
+ * @returns whether the Hardware Version bytes are included in the result of the
10
+ * getVersion APDU
11
+ * */
12
+ const isHardwareVersionSupported = (seVersion, modelId) => !!modelId &&
13
+ !!deviceVersionRangesForHardwareVersion[modelId] &&
14
+ !!(0, semver_1.satisfies)((0, semver_1.coerce)(seVersion) || seVersion, deviceVersionRangesForHardwareVersion[modelId]);
15
+ exports.isHardwareVersionSupported = isHardwareVersionSupported;
16
+ //# sourceMappingURL=isHardwareVersionSupported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isHardwareVersionSupported.js","sourceRoot":"","sources":["../../../src/commands/use-cases/isHardwareVersionSupported.ts"],"names":[],"mappings":";;;AAAA,mCAA+E;AAG/E,MAAM,qCAAqC,GAEvC;IACF,KAAK,EAAE,SAAS;CACjB,CAAC;AACF;;;KAGK;AAEE,MAAM,0BAA0B,GAAG,CAAC,SAAiB,EAAE,OAAuB,EAAW,EAAE,CAChG,CAAC,CAAC,OAAO;IACT,CAAC,CAAC,qCAAqC,CAAC,OAAO,CAAC;IAChD,CAAC,CAAC,IAAA,kBAAgB,EAChB,IAAA,eAAY,EAAC,SAAS,CAAC,IAAI,SAAS,EACpC,qCAAqC,CAAC,OAAO,CAAW,CACzD,CAAC;AANS,QAAA,0BAA0B,8BAMnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=isHardwareVersionSupported.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isHardwareVersionSupported.test.d.ts","sourceRoot":"","sources":["../../../src/commands/use-cases/isHardwareVersionSupported.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devices_1 = require("@ledgerhq/devices");
4
+ const isHardwareVersionSupported_1 = require("./isHardwareVersionSupported");
5
+ const { nanoS, nanoSP, nanoX, stax } = devices_1.DeviceModelId;
6
+ test("isHardwareVersionSupported", () => {
7
+ /**
8
+ * Nano S
9
+ * */
10
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0", nanoS)).toBe(false);
11
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0-whatever0", nanoS)).toBe(false);
12
+ /**
13
+ * Nano X
14
+ * */
15
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("1.9.0", nanoX)).toBe(false);
16
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("1.9.0-whatever0", nanoX)).toBe(false);
17
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0", nanoX)).toBe(true);
18
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0-rc1", nanoX)).toBe(true);
19
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.1", nanoX)).toBe(true);
20
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.1-whatever0", nanoX)).toBe(true);
21
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.1.0", nanoX)).toBe(true);
22
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.1.0-whatever0", nanoX)).toBe(true);
23
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("3.0.0", nanoX)).toBe(true);
24
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("3.0.0-whatever0", nanoX)).toBe(true);
25
+ /**
26
+ * Nano SP
27
+ * */
28
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0", nanoSP)).toBe(false);
29
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0-whatever0", nanoSP)).toBe(false);
30
+ /**
31
+ * Stax
32
+ * */
33
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0", stax)).toBe(false);
34
+ expect((0, isHardwareVersionSupported_1.isHardwareVersionSupported)("2.0.0-whatever0", stax)).toBe(false);
35
+ });
36
+ //# sourceMappingURL=isHardwareVersionSupported.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isHardwareVersionSupported.test.js","sourceRoot":"","sources":["../../../src/commands/use-cases/isHardwareVersionSupported.test.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,6EAA0E;AAE1E,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,uBAAa,CAAC;AAErD,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACtC;;SAEK;IACL,MAAM,CAAC,IAAA,uDAA0B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/D,MAAM,CAAC,IAAA,uDAA0B,EAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAEzE;;SAEK;IACL,MAAM,CAAC,IAAA,uDAA0B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/D,MAAM,CAAC,IAAA,uDAA0B,EAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAEzE,MAAM,CAAC,IA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AAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="node" />
2
+ export declare function parseGetDeviceNameResponse(response: Buffer): string;
3
+ //# sourceMappingURL=parseGetDeviceNameResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetDeviceNameResponse.d.ts","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetDeviceNameResponse.ts"],"names":[],"mappings":";AAGA,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgBnE"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseGetDeviceNameResponse = void 0;
4
+ const hw_transport_1 = require("@ledgerhq/hw-transport");
5
+ const logs_1 = require("@ledgerhq/logs");
6
+ function parseGetDeviceNameResponse(response) {
7
+ const tracer = new logs_1.LocalTracer("hw", {
8
+ function: "parseGetDeviceNameResponse",
9
+ });
10
+ const status = response.readUInt16BE(response.length - 2);
11
+ if (tracer)
12
+ tracer.trace("Result status from 0xe0d20000", { status });
13
+ switch (status) {
14
+ case hw_transport_1.StatusCodes.OK:
15
+ return response.slice(0, response.length - 2).toString("utf-8");
16
+ case hw_transport_1.StatusCodes.DEVICE_NOT_ONBOARDED:
17
+ case hw_transport_1.StatusCodes.DEVICE_NOT_ONBOARDED_2:
18
+ return "";
19
+ }
20
+ throw new hw_transport_1.TransportStatusError(status);
21
+ }
22
+ exports.parseGetDeviceNameResponse = parseGetDeviceNameResponse;
23
+ //# sourceMappingURL=parseGetDeviceNameResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetDeviceNameResponse.js","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetDeviceNameResponse.ts"],"names":[],"mappings":";;;AAAA,yDAA2E;AAC3E,yCAA6C;AAE7C,SAAgB,0BAA0B,CAAC,QAAgB;IACzD,MAAM,MAAM,GAAG,IAAI,kBAAW,CAAC,IAAI,EAAE;QACnC,QAAQ,EAAE,4BAA4B;KACvC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1D,IAAI,MAAM;QAAE,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtE,QAAQ,MAAM,EAAE;QACd,KAAK,0BAAW,CAAC,EAAE;YACjB,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClE,KAAK,0BAAW,CAAC,oBAAoB,CAAC;QACtC,KAAK,0BAAW,CAAC,sBAAsB;YACrC,OAAO,EAAE,CAAC;KACb;IAED,MAAM,IAAI,mCAAoB,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AAhBD,gEAgBC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parseGetDeviceNameResponse.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetDeviceNameResponse.test.d.ts","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetDeviceNameResponse.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const parseGetDeviceNameResponse_1 = require("./parseGetDeviceNameResponse");
4
+ describe("getDeviceName", () => {
5
+ it("should return name if available", () => {
6
+ const responseBuffer = Buffer.from("50756572746f9000", "hex");
7
+ const result = (0, parseGetDeviceNameResponse_1.parseGetDeviceNameResponse)(responseBuffer);
8
+ expect(result).toMatch("Puerto"); // 🐾
9
+ });
10
+ it("should return empty name when the device is not onboarded", () => {
11
+ const responseBuffer = Buffer.from("bababababababa6d07", "hex");
12
+ const result = (0, parseGetDeviceNameResponse_1.parseGetDeviceNameResponse)(responseBuffer);
13
+ expect(result).toMatch("");
14
+ });
15
+ it("should return empty name when the device is not onboarded #2", () => {
16
+ const responseBuffer = Buffer.from("bababababababa6611", "hex");
17
+ const result = (0, parseGetDeviceNameResponse_1.parseGetDeviceNameResponse)(responseBuffer);
18
+ expect(result).toMatch("");
19
+ });
20
+ it("should throw for an unexpected bootloader or any other code", () => {
21
+ const responseBuffer = Buffer.from("662d", "hex");
22
+ expect(() => {
23
+ (0, parseGetDeviceNameResponse_1.parseGetDeviceNameResponse)(responseBuffer);
24
+ }).toThrow(Error);
25
+ });
26
+ });
27
+ //# sourceMappingURL=parseGetDeviceNameResponse.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetDeviceNameResponse.test.js","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetDeviceNameResponse.test.ts"],"names":[],"mappings":";;AAAA,6EAA0E;AAE1E,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAE9D,MAAM,MAAM,GAAG,IAAA,uDAA0B,EAAC,cAAc,CAAC,CAAC;QAE1D,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAEhE,MAAM,MAAM,GAAG,IAAA,uDAA0B,EAAC,cAAc,CAAC,CAAC;QAE1D,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAEhE,MAAM,MAAM,GAAG,IAAA,uDAA0B,EAAC,cAAc,CAAC,CAAC;QAE1D,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAElD,MAAM,CAAC,GAAG,EAAE;YACV,IAAA,uDAA0B,EAAC,cAAc,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="node" />
2
+ import { FirmwareInfoEntity } from "../entities/FirmwareInfoEntity";
3
+ export declare function parseGetVersionResponse(response: Buffer): FirmwareInfoEntity;
4
+ //# sourceMappingURL=parseGetVersionResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetVersionResponse.d.ts","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetVersionResponse.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAKpE,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,CAkH5E"}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseGetVersionResponse = void 0;
4
+ const devices_1 = require("@ledgerhq/devices");
5
+ const isDeviceLocalizationSupported_1 = require("./isDeviceLocalizationSupported");
6
+ const isHardwareVersionSupported_1 = require("./isHardwareVersionSupported");
7
+ const isBootloaderVersionSupported_1 = require("./isBootloaderVersionSupported");
8
+ function parseGetVersionResponse(response) {
9
+ const data = response.slice(0, response.length - 2);
10
+ let i = 0;
11
+ // parse the target id of either BL or SE
12
+ const targetId = data.readUIntBE(0, 4);
13
+ i += 4;
14
+ // parse the version of either BL or SE
15
+ const rawVersionLength = data[i++];
16
+ let rawVersion = data.slice(i, i + rawVersionLength).toString();
17
+ i += rawVersionLength;
18
+ // flags. gives information about manager allowed in SE mode.
19
+ const flagsLength = data[i++];
20
+ let flags = data.slice(i, i + flagsLength);
21
+ i += flagsLength;
22
+ if (!rawVersionLength) {
23
+ // To support old firmware like bootloader of 1.3.1
24
+ rawVersion = "0.0.0";
25
+ flags = Buffer.allocUnsafeSlow(0);
26
+ }
27
+ let mcuVersion = "";
28
+ let mcuBlVersion;
29
+ let seVersion;
30
+ let bootloaderVersion;
31
+ let hardwareVersion;
32
+ let mcuTargetId;
33
+ let seTargetId;
34
+ let languageId;
35
+ const isBootloader = (targetId & 4026531840) !== 805306368;
36
+ if (isBootloader) {
37
+ mcuBlVersion = rawVersion;
38
+ mcuTargetId = targetId;
39
+ if (i < data.length) {
40
+ // se part 1
41
+ const part1Length = data[i++];
42
+ const part1 = data.slice(i, i + part1Length);
43
+ i += part1Length;
44
+ // at this time, this is how we branch old & new format
45
+ if (part1Length >= 5) {
46
+ seVersion = part1.toString();
47
+ // se part 2
48
+ const part2Length = data[i++];
49
+ const part2 = data.slice(i, i + part2Length);
50
+ i += flagsLength;
51
+ seTargetId = part2.readUIntBE(0, 4);
52
+ }
53
+ else {
54
+ seTargetId = part1.readUIntBE(0, 4);
55
+ }
56
+ }
57
+ }
58
+ else {
59
+ seVersion = rawVersion;
60
+ seTargetId = targetId;
61
+ // if SE: mcu version
62
+ const mcuVersionLength = data[i++];
63
+ let mcuVersionBuf = Buffer.from(data.slice(i, i + mcuVersionLength));
64
+ i += mcuVersionLength;
65
+ if (mcuVersionBuf[mcuVersionBuf.length - 1] === 0) {
66
+ mcuVersionBuf = mcuVersionBuf.slice(0, mcuVersionBuf.length - 1);
67
+ }
68
+ mcuVersion = mcuVersionBuf.toString();
69
+ const isOSU = rawVersion.includes("-osu");
70
+ if (!isOSU) {
71
+ const deviceModel = (0, devices_1.identifyTargetId)(targetId);
72
+ if ((0, isBootloaderVersionSupported_1.isBootloaderVersionSupported)(seVersion, deviceModel === null || deviceModel === void 0 ? void 0 : deviceModel.id)) {
73
+ const bootloaderVersionLength = data[i++];
74
+ let bootloaderVersionBuf = Buffer.from(data.slice(i, i + bootloaderVersionLength));
75
+ i += bootloaderVersionLength;
76
+ if (bootloaderVersionBuf[bootloaderVersionBuf.length - 1] === 0) {
77
+ bootloaderVersionBuf = bootloaderVersionBuf.slice(0, bootloaderVersionBuf.length - 1);
78
+ }
79
+ bootloaderVersion = bootloaderVersionBuf.toString();
80
+ }
81
+ if ((0, isHardwareVersionSupported_1.isHardwareVersionSupported)(seVersion, deviceModel === null || deviceModel === void 0 ? void 0 : deviceModel.id)) {
82
+ const hardwareVersionLength = data[i++];
83
+ hardwareVersion = data.slice(i, i + hardwareVersionLength).readUIntBE(0, 1); // ?? string? number?
84
+ i += hardwareVersionLength;
85
+ }
86
+ if ((0, isDeviceLocalizationSupported_1.isDeviceLocalizationSupported)(seVersion, deviceModel === null || deviceModel === void 0 ? void 0 : deviceModel.id)) {
87
+ const languageIdLength = data[i++];
88
+ languageId = data.slice(i, i + languageIdLength).readUIntBE(0, 1);
89
+ }
90
+ }
91
+ }
92
+ return {
93
+ isBootloader,
94
+ rawVersion,
95
+ targetId,
96
+ seVersion,
97
+ mcuVersion,
98
+ mcuBlVersion,
99
+ mcuTargetId,
100
+ seTargetId,
101
+ flags,
102
+ bootloaderVersion,
103
+ hardwareVersion,
104
+ languageId,
105
+ };
106
+ }
107
+ exports.parseGetVersionResponse = parseGetVersionResponse;
108
+ //# sourceMappingURL=parseGetVersionResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetVersionResponse.js","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetVersionResponse.ts"],"names":[],"mappings":";;;AAAA,+CAA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,WAAW,uBAAX,WAAW,CAAE,EAAE,CAAC,EAAE;gBAC7D,MAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBACnC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACnE;SACF;KACF;IAED,OAAO;QACL,YAAY;QACZ,UAAU;QACV,QAAQ;QACR,SAAS;QACT,UAAU;QACV,YAAY;QACZ,WAAW;QACX,UAAU;QACV,KAAK;QACL,iBAAiB;QACjB,eAAe;QACf,UAAU;KACX,CAAC;AACJ,CAAC;AAlHD,0DAkHC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parseGetVersionResponse.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetVersionResponse.test.d.ts","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetVersionResponse.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const parseGetVersionResponse_1 = require("./parseGetVersionResponse");
4
+ describe("parseGetVersionResult", () => {
5
+ it("correctly parses an arbitrary regular result buffer", () => {
6
+ const responseBuffer = Buffer.from([
7
+ "33000004",
8
+ "05",
9
+ "322e322e33",
10
+ "04",
11
+ "ee000000",
12
+ "04",
13
+ "322e3330",
14
+ "04",
15
+ "312e3136",
16
+ "01",
17
+ "01",
18
+ "01",
19
+ "00",
20
+ "01",
21
+ "00",
22
+ "9000", // status
23
+ ].join(""), "hex");
24
+ const expectedParseResult = {
25
+ isBootloader: false,
26
+ rawVersion: "2.2.3",
27
+ targetId: 855638020,
28
+ seVersion: "2.2.3",
29
+ mcuVersion: "2.30",
30
+ mcuBlVersion: undefined,
31
+ mcuTargetId: undefined,
32
+ seTargetId: 855638020,
33
+ flags: Buffer.from([238, 0, 0, 0]),
34
+ bootloaderVersion: "1.16",
35
+ hardwareVersion: 1,
36
+ languageId: 0,
37
+ };
38
+ const parseResult = (0, parseGetVersionResponse_1.parseGetVersionResponse)(responseBuffer);
39
+ expect(parseResult).toEqual(expectedParseResult);
40
+ });
41
+ it("should handle old firmware with zero rawVersionLength", () => {
42
+ const responseBuffer = Buffer.from([
43
+ "33000004",
44
+ "00",
45
+ "04",
46
+ "ee000000",
47
+ "04",
48
+ "322e3330",
49
+ "01",
50
+ "01",
51
+ "01",
52
+ "00",
53
+ "01",
54
+ "00",
55
+ "9000", // status
56
+ ].join(""), "hex");
57
+ const expectedParseResult = {
58
+ isBootloader: false,
59
+ rawVersion: "0.0.0",
60
+ targetId: 855638020,
61
+ seVersion: "0.0.0",
62
+ mcuVersion: "2.30",
63
+ mcuBlVersion: undefined,
64
+ mcuTargetId: undefined,
65
+ seTargetId: 855638020,
66
+ flags: Buffer.from([]),
67
+ bootloaderVersion: undefined,
68
+ hardwareVersion: undefined,
69
+ languageId: undefined, // because seVersion is "0.0.0" so isDeviceLocalizationSupported will return false
70
+ };
71
+ const parseResult = (0, parseGetVersionResponse_1.parseGetVersionResponse)(responseBuffer);
72
+ expect(parseResult).toEqual(expectedParseResult);
73
+ });
74
+ it("correctly parses buffer for a bootloader version", () => {
75
+ const responseBuffer = Buffer.from([
76
+ "05010003",
77
+ "04",
78
+ "312e3136",
79
+ "04",
80
+ "f4d8aa43",
81
+ "05",
82
+ "322e322e33",
83
+ "04",
84
+ "33000004",
85
+ "9000", // status
86
+ ].join(""), "hex");
87
+ const expectedParseResult = {
88
+ isBootloader: true,
89
+ rawVersion: "1.16",
90
+ targetId: 83951619,
91
+ seVersion: "2.2.3",
92
+ mcuVersion: "",
93
+ mcuBlVersion: "1.16",
94
+ mcuTargetId: 83951619,
95
+ seTargetId: 855638020,
96
+ flags: Buffer.from([244, 216, 170, 67]),
97
+ bootloaderVersion: undefined,
98
+ hardwareVersion: undefined,
99
+ languageId: undefined,
100
+ };
101
+ const parseResult = (0, parseGetVersionResponse_1.parseGetVersionResponse)(responseBuffer);
102
+ expect(parseResult).toEqual(expectedParseResult);
103
+ });
104
+ });
105
+ //# sourceMappingURL=parseGetVersionResponse.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGetVersionResponse.test.js","sourceRoot":"","sources":["../../../src/commands/use-cases/parseGetVersionResponse.test.ts"],"names":[],"mappings":";;AAAA,uEAAoE;AAEpE,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC7D,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAChC;YACE,UAAU;YACV,IAAI;YACJ,YAAY;YACZ,IAAI;YACJ,UAAU;YACV,IAAI;YACJ,UAAU;YACV,IAAI;YACJ,UAAU;YACV,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,MAAM,EAAE,eAAe;SACxB,CAAC,IAAI,CAAC,EAAE,CAAC,EACV,KAAK,CACN,CAAC;QAEF,MAAM,mBAAmB,GAAG;YAC1B,YAAY,EAAE,KAAK;YACnB,UAAU,EAAE,OAAO;YACnB,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,OAAO;YAClB,UAAU,EAAE,MAAM;YAClB,YAAY,EAAE,SAAS;YACvB,WAAW,EAAE,SAAS;YACtB,UAAU,EAAE,SAAS;YACrB,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAClC,iBAAiB,EAAE,MAAM;YACzB,eAAe,EAAE,CAAC;YAClB,UAAU,EAAE,CAAC;SACd,CAAC;QAEF,MAAM,WAAW,GAAG,IAAA,iDAAuB,EAAC,cAAc,CAAC,CAAC;QAE5D,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAA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S,EAAE,OAAO;YAClB,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,MAAM;YACpB,WAAW,EAAE,QAAQ;YACrB,UAAU,EAAE,SAAS;YACrB,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;YACvC,iBAAiB,EAAE,SAAS;YAC5B,eAAe,EAAE,SAAS;YAC1B,UAAU,EAAE,SAAS;SACtB,CAAC;QAEF,MAAM,WAAW,GAAG,IAAA,iDAAuB,EAAC,cAAc,CAAC,CAAC;QAE5D,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { CLSSupportedDeviceModelId } from "../capabilities/isCustomLockScreenSupported";
2
+ type ScreenSpecs = {
3
+ /** width of the screen in pixels */
4
+ width: number;
5
+ /** height of the screen in pixels */
6
+ height: number;
7
+ /** number of pixels at the top of the screen which are not visible */
8
+ paddingTop: number;
9
+ /** number of pixels at the bottom of the screen which are not visible */
10
+ paddingBottom: number;
11
+ /** number of pixels at the left of the screen which are not visible */
12
+ paddingLeft: number;
13
+ /** number of pixels at the right of the screen which are not visible */
14
+ paddingRight: number;
15
+ };
16
+ export declare const SCREEN_SPECS: Record<CLSSupportedDeviceModelId, ScreenSpecs>;
17
+ type Dimensions = {
18
+ width: number;
19
+ height: number;
20
+ };
21
+ export declare function getScreenSpecs(deviceModelId: CLSSupportedDeviceModelId): ScreenSpecs;
22
+ export declare function getScreenDataDimensions(deviceModelId: CLSSupportedDeviceModelId): Dimensions;
23
+ /**
24
+ *
25
+ * @param deviceModelId
26
+ * @returns the dimensions of the visible area of the screen (without padding)
27
+ */
28
+ export declare function getScreenVisibleAreaDimensions(deviceModelId: CLSSupportedDeviceModelId): Dimensions;
29
+ export {};
30
+ //# sourceMappingURL=screenSpecs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenSpecs.d.ts","sourceRoot":"","sources":["../../src/customLockScreen/screenSpecs.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EAE1B,MAAM,6CAA6C,CAAC;AAErD,KAAK,WAAW,GAAG;IACjB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AASF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,yBAAyB,EAAE,WAAW,CAYvE,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,cAAc,CAAC,aAAa,EAAE,yBAAyB,eAEtE;AAYD,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,yBAAyB,cAE/E;AAgBD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,aAAa,EAAE,yBAAyB,cAEtF"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getScreenVisibleAreaDimensions = exports.getScreenDataDimensions = exports.getScreenSpecs = exports.SCREEN_SPECS = void 0;
4
+ const devices_1 = require("@ledgerhq/devices");
5
+ const isCustomLockScreenSupported_1 = require("../capabilities/isCustomLockScreenSupported");
6
+ const NO_PADDING = {
7
+ paddingTop: 0,
8
+ paddingBottom: 0,
9
+ paddingLeft: 0,
10
+ paddingRight: 0,
11
+ };
12
+ exports.SCREEN_SPECS = {
13
+ [devices_1.DeviceModelId.stax]: Object.assign(Object.assign({ width: 400, height: 672 }, NO_PADDING), { paddingBottom: 2 }),
14
+ [devices_1.DeviceModelId.europa]: Object.assign({ width: 480, height: 600 }, NO_PADDING),
15
+ };
16
+ function getScreenSpecs(deviceModelId) {
17
+ return exports.SCREEN_SPECS[deviceModelId];
18
+ }
19
+ exports.getScreenSpecs = getScreenSpecs;
20
+ const screenDataDimensions = isCustomLockScreenSupported_1.supportedDeviceModelIds.reduce((acc, deviceModelId) => {
21
+ const { width, height } = exports.SCREEN_SPECS[deviceModelId];
22
+ acc[deviceModelId] = { width, height };
23
+ return acc;
24
+ }, {});
25
+ function getScreenDataDimensions(deviceModelId) {
26
+ return screenDataDimensions[deviceModelId];
27
+ }
28
+ exports.getScreenDataDimensions = getScreenDataDimensions;
29
+ const screenVisibleAreaDimensions = isCustomLockScreenSupported_1.supportedDeviceModelIds.reduce((acc, deviceModelId) => {
30
+ const { width, height, paddingTop, paddingBottom, paddingLeft, paddingRight } = exports.SCREEN_SPECS[deviceModelId];
31
+ acc[deviceModelId] = {
32
+ width: width - paddingLeft - paddingRight,
33
+ height: height - paddingTop - paddingBottom,
34
+ };
35
+ return acc;
36
+ }, {});
37
+ /**
38
+ *
39
+ * @param deviceModelId
40
+ * @returns the dimensions of the visible area of the screen (without padding)
41
+ */
42
+ function getScreenVisibleAreaDimensions(deviceModelId) {
43
+ return screenVisibleAreaDimensions[deviceModelId];
44
+ }
45
+ exports.getScreenVisibleAreaDimensions = getScreenVisibleAreaDimensions;
46
+ //# sourceMappingURL=screenSpecs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenSpecs.js","sourceRoot":"","sources":["../../src/customLockScreen/screenSpecs.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAClD,6FAGqD;AAiBrD,MAAM,UAAU,GAAG;IACjB,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,CAAC;IAChB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;CACP,CAAC;AAEE,QAAA,YAAY,GAAmD;IAC1E,CAAC,uBAAa,CAAC,IAAI,CA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pD,CAAC;AAFD,wEAEC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export type { DeviceInfoEntity } from "./managerApi/entities/DeviceInfoEntity";
2
+ export type { FinalFirmware, OsuFirmware, FirmwareUpdateContextEntity, } from "./managerApi/entities/FirmwareUpdateContextEntity";
3
+ export type { ManagerApiRepository } from "./managerApi/repositories/ManagerApiRepository";
4
+ export { HttpManagerApiRepository } from "./managerApi/repositories/HttpManagerApiRepository";
5
+ export { StubManagerApiRepository } from "./managerApi/repositories/StubManagerApiRepository";
6
+ export { getLatestFirmwareForDevice } from "./managerApi/use-cases/getLatestFirmwareForDevice";
7
+ export { isDeviceLocalizationSupported } from "./commands/use-cases/isDeviceLocalizationSupported";
8
+ export { PROVIDERS, getProviderIdUseCase } from "./managerApi/use-cases/getProviderIdUseCase";
9
+ export { fetchMcus } from "./managerApi/use-cases/fetchMcus";
10
+ export { aDeviceInfoBuilder } from "./managerApi/entities/mocks/aDeviceInfo";
11
+ export type { FirmwareInfoEntity } from "./commands/entities/FirmwareInfoEntity";
12
+ export { GET_VERSION_APDU } from "./commands/use-cases/getVersion";
13
+ export { parseGetVersionResponse } from "./commands/use-cases/parseGetVersionResponse";
14
+ export { getDeviceName } from "./commands/use-cases/getDeviceName";
15
+ export { isHardwareVersionSupported } from "./commands/use-cases/isHardwareVersionSupported";
16
+ export { isBootloaderVersionSupported } from "./commands/use-cases/isBootloaderVersionSupported";
17
+ export { getVersion } from "./commands/use-cases/getVersion";
18
+ export { type CLSSupportedDeviceModelId, isCustomLockScreenSupported, } from "./capabilities/isCustomLockScreenSupported";
19
+ export { isEditDeviceNameSupported } from "./capabilities/isEditDeviceNameSupported";
20
+ export { isSyncOnboardingSupported } from "./capabilities/isSyncOnboardingSupported";
21
+ export { supportedDeviceModelIds } from "./capabilities/isCustomLockScreenSupported";
22
+ export * from "./customLockScreen/screenSpecs";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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