@ledgerhq/device-core 0.1.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.
- package/.turbo/turbo-build.log +4 -0
- package/LICENSE.txt +21 -0
- package/jest.config.json +13 -0
- package/lib/capabilities/isCustomLockScreenSupported.d.ts +5 -0
- package/lib/capabilities/isCustomLockScreenSupported.d.ts.map +1 -0
- package/lib/capabilities/isCustomLockScreenSupported.js +16 -0
- package/lib/capabilities/isCustomLockScreenSupported.js.map +1 -0
- package/lib/capabilities/isCustomLockScreenSupported.test.d.ts +2 -0
- package/lib/capabilities/isCustomLockScreenSupported.test.d.ts.map +1 -0
- package/lib/capabilities/isCustomLockScreenSupported.test.js +22 -0
- package/lib/capabilities/isCustomLockScreenSupported.test.js.map +1 -0
- package/lib/capabilities/isEditDeviceNameSupported.d.ts +3 -0
- package/lib/capabilities/isEditDeviceNameSupported.d.ts.map +1 -0
- package/lib/capabilities/isEditDeviceNameSupported.js +9 -0
- package/lib/capabilities/isEditDeviceNameSupported.js.map +1 -0
- package/lib/capabilities/isEditDeviceNameSupported.test.d.ts +2 -0
- package/lib/capabilities/isEditDeviceNameSupported.test.d.ts.map +1 -0
- package/lib/capabilities/isEditDeviceNameSupported.test.js +19 -0
- package/lib/capabilities/isEditDeviceNameSupported.test.js.map +1 -0
- package/lib/capabilities/isSyncOnboardingSupported.d.ts +3 -0
- package/lib/capabilities/isSyncOnboardingSupported.d.ts.map +1 -0
- package/lib/capabilities/isSyncOnboardingSupported.js +9 -0
- package/lib/capabilities/isSyncOnboardingSupported.js.map +1 -0
- package/lib/capabilities/isSyncOnboardingSupported.test.d.ts +2 -0
- package/lib/capabilities/isSyncOnboardingSupported.test.d.ts.map +1 -0
- package/lib/capabilities/isSyncOnboardingSupported.test.js +17 -0
- package/lib/capabilities/isSyncOnboardingSupported.test.js.map +1 -0
- package/lib/commands/entities/APDU.d.ts +9 -0
- package/lib/commands/entities/APDU.d.ts.map +1 -0
- package/lib/commands/entities/APDU.js +3 -0
- package/lib/commands/entities/APDU.js.map +1 -0
- package/lib/commands/entities/FirmwareInfoEntity.d.ts +16 -0
- package/lib/commands/entities/FirmwareInfoEntity.d.ts.map +1 -0
- package/lib/commands/entities/FirmwareInfoEntity.js +3 -0
- package/lib/commands/entities/FirmwareInfoEntity.js.map +1 -0
- package/lib/commands/use-cases/getDeviceName.d.ts +3 -0
- package/lib/commands/use-cases/getDeviceName.d.ts.map +1 -0
- package/lib/commands/use-cases/getDeviceName.js +48 -0
- package/lib/commands/use-cases/getDeviceName.js.map +1 -0
- package/lib/commands/use-cases/getVersion.d.ts +15 -0
- package/lib/commands/use-cases/getVersion.d.ts.map +1 -0
- package/lib/commands/use-cases/getVersion.js +31 -0
- package/lib/commands/use-cases/getVersion.js.map +1 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.d.ts +7 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.d.ts.map +1 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.js +20 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.js.map +1 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.test.d.ts +2 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.test.d.ts.map +1 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.test.js +53 -0
- package/lib/commands/use-cases/isBootloaderVersionSupported.test.js.map +1 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.d.ts +3 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.d.ts.map +1 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.js +15 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.js.map +1 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.test.d.ts +2 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.test.d.ts.map +1 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.test.js +45 -0
- package/lib/commands/use-cases/isDeviceLocalizationSupported.test.js.map +1 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.d.ts +7 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.d.ts.map +1 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.js +16 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.js.map +1 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.test.d.ts +2 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.test.d.ts.map +1 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.test.js +36 -0
- package/lib/commands/use-cases/isHardwareVersionSupported.test.js.map +1 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.d.ts +3 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.d.ts.map +1 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.js +23 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.js.map +1 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.test.d.ts +2 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.test.d.ts.map +1 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.test.js +27 -0
- package/lib/commands/use-cases/parseGetDeviceNameResponse.test.js.map +1 -0
- package/lib/commands/use-cases/parseGetVersionResponse.d.ts +4 -0
- package/lib/commands/use-cases/parseGetVersionResponse.d.ts.map +1 -0
- package/lib/commands/use-cases/parseGetVersionResponse.js +108 -0
- package/lib/commands/use-cases/parseGetVersionResponse.js.map +1 -0
- package/lib/commands/use-cases/parseGetVersionResponse.test.d.ts +2 -0
- package/lib/commands/use-cases/parseGetVersionResponse.test.d.ts.map +1 -0
- package/lib/commands/use-cases/parseGetVersionResponse.test.js +105 -0
- package/lib/commands/use-cases/parseGetVersionResponse.test.js.map +1 -0
- package/lib/customLockScreen/screenSpecs.d.ts +30 -0
- package/lib/customLockScreen/screenSpecs.d.ts.map +1 -0
- package/lib/customLockScreen/screenSpecs.js +46 -0
- package/lib/customLockScreen/screenSpecs.js.map +1 -0
- package/lib/index.d.ts +23 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +56 -0
- package/lib/index.js.map +1 -0
- package/lib/managerApi/entities/AppEntity.d.ts +62 -0
- package/lib/managerApi/entities/AppEntity.d.ts.map +1 -0
- package/lib/managerApi/entities/AppEntity.js +12 -0
- package/lib/managerApi/entities/AppEntity.js.map +1 -0
- package/lib/managerApi/entities/DeviceInfoEntity.d.ts +22 -0
- package/lib/managerApi/entities/DeviceInfoEntity.d.ts.map +1 -0
- package/lib/managerApi/entities/DeviceInfoEntity.js +3 -0
- package/lib/managerApi/entities/DeviceInfoEntity.js.map +1 -0
- package/lib/managerApi/entities/DeviceVersionEntity.d.ts +17 -0
- package/lib/managerApi/entities/DeviceVersionEntity.d.ts.map +1 -0
- package/lib/managerApi/entities/DeviceVersionEntity.js +3 -0
- package/lib/managerApi/entities/DeviceVersionEntity.js.map +1 -0
- package/lib/managerApi/entities/FirmwareUpdateContextEntity.d.ts +42 -0
- package/lib/managerApi/entities/FirmwareUpdateContextEntity.d.ts.map +1 -0
- package/lib/managerApi/entities/FirmwareUpdateContextEntity.js +3 -0
- package/lib/managerApi/entities/FirmwareUpdateContextEntity.js.map +1 -0
- package/lib/managerApi/entities/Id.d.ts +2 -0
- package/lib/managerApi/entities/Id.d.ts.map +1 -0
- package/lib/managerApi/entities/Id.js +3 -0
- package/lib/managerApi/entities/Id.js.map +1 -0
- package/lib/managerApi/entities/LanguagePackageEntity.d.ts +20 -0
- package/lib/managerApi/entities/LanguagePackageEntity.d.ts.map +1 -0
- package/lib/managerApi/entities/LanguagePackageEntity.js +3 -0
- package/lib/managerApi/entities/LanguagePackageEntity.js.map +1 -0
- package/lib/managerApi/entities/mocks/aDeviceInfo.d.ts +3 -0
- package/lib/managerApi/entities/mocks/aDeviceInfo.d.ts.map +1 -0
- package/lib/managerApi/entities/mocks/aDeviceInfo.js +8 -0
- package/lib/managerApi/entities/mocks/aDeviceInfo.js.map +1 -0
- package/lib/managerApi/entities/mocks/aDeviceVersion.d.ts +3 -0
- package/lib/managerApi/entities/mocks/aDeviceVersion.d.ts.map +1 -0
- package/lib/managerApi/entities/mocks/aDeviceVersion.js +8 -0
- package/lib/managerApi/entities/mocks/aDeviceVersion.js.map +1 -0
- package/lib/managerApi/entities/mocks/aFinalFirmware.d.ts +3 -0
- package/lib/managerApi/entities/mocks/aFinalFirmware.d.ts.map +1 -0
- package/lib/managerApi/entities/mocks/aFinalFirmware.js +8 -0
- package/lib/managerApi/entities/mocks/aFinalFirmware.js.map +1 -0
- package/lib/managerApi/entities/mocks/aOsuFirmware.d.ts +19 -0
- package/lib/managerApi/entities/mocks/aOsuFirmware.d.ts.map +1 -0
- package/lib/managerApi/entities/mocks/aOsuFirmware.js +8 -0
- package/lib/managerApi/entities/mocks/aOsuFirmware.js.map +1 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.d.ts +18 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.d.ts.map +1 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.js +204 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.js.map +1 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.test.d.ts +2 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.test.d.ts.map +1 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.test.js +402 -0
- package/lib/managerApi/repositories/HttpManagerApiRepository.test.js.map +1 -0
- package/lib/managerApi/repositories/ManagerApiRepository.d.ts +54 -0
- package/lib/managerApi/repositories/ManagerApiRepository.d.ts.map +1 -0
- package/lib/managerApi/repositories/ManagerApiRepository.js +3 -0
- package/lib/managerApi/repositories/ManagerApiRepository.js.map +1 -0
- package/lib/managerApi/repositories/StubManagerApiRepository.d.ts +15 -0
- package/lib/managerApi/repositories/StubManagerApiRepository.d.ts.map +1 -0
- package/lib/managerApi/repositories/StubManagerApiRepository.js +44 -0
- package/lib/managerApi/repositories/StubManagerApiRepository.js.map +1 -0
- package/lib/managerApi/use-cases/fetchMcus.d.ts +3 -0
- package/lib/managerApi/use-cases/fetchMcus.d.ts.map +1 -0
- package/lib/managerApi/use-cases/fetchMcus.js +8 -0
- package/lib/managerApi/use-cases/fetchMcus.js.map +1 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.d.ts +12 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.d.ts.map +1 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.js +62 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.js.map +1 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts +2 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts.map +1 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.js +178 -0
- package/lib/managerApi/use-cases/getLatestFirmwareForDevice.test.js.map +1 -0
- package/lib/managerApi/use-cases/getProviderIdUseCase.d.ts +7 -0
- package/lib/managerApi/use-cases/getProviderIdUseCase.d.ts.map +1 -0
- package/lib/managerApi/use-cases/getProviderIdUseCase.js +23 -0
- package/lib/managerApi/use-cases/getProviderIdUseCase.js.map +1 -0
- package/lib/managerApi/use-cases/getUserHashes.d.ts +5 -0
- package/lib/managerApi/use-cases/getUserHashes.d.ts.map +1 -0
- package/lib/managerApi/use-cases/getUserHashes.js +33 -0
- package/lib/managerApi/use-cases/getUserHashes.js.map +1 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.d.ts +5 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.d.ts.map +1 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.js +12 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.js.map +1 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.test.d.ts +2 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.test.d.ts.map +1 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.test.js +20 -0
- package/lib-es/capabilities/isCustomLockScreenSupported.test.js.map +1 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.d.ts +3 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.d.ts.map +1 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.js +5 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.js.map +1 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.test.d.ts +2 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.test.d.ts.map +1 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.test.js +17 -0
- package/lib-es/capabilities/isEditDeviceNameSupported.test.js.map +1 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.d.ts +3 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.d.ts.map +1 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.js +5 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.js.map +1 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.test.d.ts +2 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.test.d.ts.map +1 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.test.js +15 -0
- package/lib-es/capabilities/isSyncOnboardingSupported.test.js.map +1 -0
- package/lib-es/commands/entities/APDU.d.ts +9 -0
- package/lib-es/commands/entities/APDU.d.ts.map +1 -0
- package/lib-es/commands/entities/APDU.js +2 -0
- package/lib-es/commands/entities/APDU.js.map +1 -0
- package/lib-es/commands/entities/FirmwareInfoEntity.d.ts +16 -0
- package/lib-es/commands/entities/FirmwareInfoEntity.d.ts.map +1 -0
- package/lib-es/commands/entities/FirmwareInfoEntity.js +2 -0
- package/lib-es/commands/entities/FirmwareInfoEntity.js.map +1 -0
- package/lib-es/commands/use-cases/getDeviceName.d.ts +3 -0
- package/lib-es/commands/use-cases/getDeviceName.d.ts.map +1 -0
- package/lib-es/commands/use-cases/getDeviceName.js +44 -0
- package/lib-es/commands/use-cases/getDeviceName.js.map +1 -0
- package/lib-es/commands/use-cases/getVersion.d.ts +15 -0
- package/lib-es/commands/use-cases/getVersion.d.ts.map +1 -0
- package/lib-es/commands/use-cases/getVersion.js +27 -0
- package/lib-es/commands/use-cases/getVersion.js.map +1 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.d.ts +7 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.d.ts.map +1 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.js +16 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.js.map +1 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.d.ts +2 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.d.ts.map +1 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.js +51 -0
- package/lib-es/commands/use-cases/isBootloaderVersionSupported.test.js.map +1 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.d.ts +3 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.d.ts.map +1 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.js +11 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.js.map +1 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.d.ts +2 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.d.ts.map +1 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.js +43 -0
- package/lib-es/commands/use-cases/isDeviceLocalizationSupported.test.js.map +1 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.d.ts +7 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.d.ts.map +1 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.js +12 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.js.map +1 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.test.d.ts +2 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.test.d.ts.map +1 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.test.js +34 -0
- package/lib-es/commands/use-cases/isHardwareVersionSupported.test.js.map +1 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.d.ts +3 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.d.ts.map +1 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.js +19 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.js.map +1 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.d.ts +2 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.d.ts.map +1 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.js +25 -0
- package/lib-es/commands/use-cases/parseGetDeviceNameResponse.test.js.map +1 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.d.ts +4 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.d.ts.map +1 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.js +104 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.js.map +1 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.test.d.ts +2 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.test.d.ts.map +1 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.test.js +103 -0
- package/lib-es/commands/use-cases/parseGetVersionResponse.test.js.map +1 -0
- package/lib-es/customLockScreen/screenSpecs.d.ts +30 -0
- package/lib-es/customLockScreen/screenSpecs.d.ts.map +1 -0
- package/lib-es/customLockScreen/screenSpecs.js +40 -0
- package/lib-es/customLockScreen/screenSpecs.js.map +1 -0
- package/lib-es/index.d.ts +23 -0
- package/lib-es/index.d.ts.map +1 -0
- package/lib-es/index.js +21 -0
- package/lib-es/index.js.map +1 -0
- package/lib-es/managerApi/entities/AppEntity.d.ts +62 -0
- package/lib-es/managerApi/entities/AppEntity.d.ts.map +1 -0
- package/lib-es/managerApi/entities/AppEntity.js +9 -0
- package/lib-es/managerApi/entities/AppEntity.js.map +1 -0
- package/lib-es/managerApi/entities/DeviceInfoEntity.d.ts +22 -0
- package/lib-es/managerApi/entities/DeviceInfoEntity.d.ts.map +1 -0
- package/lib-es/managerApi/entities/DeviceInfoEntity.js +2 -0
- package/lib-es/managerApi/entities/DeviceInfoEntity.js.map +1 -0
- package/lib-es/managerApi/entities/DeviceVersionEntity.d.ts +17 -0
- package/lib-es/managerApi/entities/DeviceVersionEntity.d.ts.map +1 -0
- package/lib-es/managerApi/entities/DeviceVersionEntity.js +2 -0
- package/lib-es/managerApi/entities/DeviceVersionEntity.js.map +1 -0
- package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.d.ts +42 -0
- package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.d.ts.map +1 -0
- package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.js +2 -0
- package/lib-es/managerApi/entities/FirmwareUpdateContextEntity.js.map +1 -0
- package/lib-es/managerApi/entities/Id.d.ts +2 -0
- package/lib-es/managerApi/entities/Id.d.ts.map +1 -0
- package/lib-es/managerApi/entities/Id.js +2 -0
- package/lib-es/managerApi/entities/Id.js.map +1 -0
- package/lib-es/managerApi/entities/LanguagePackageEntity.d.ts +20 -0
- package/lib-es/managerApi/entities/LanguagePackageEntity.d.ts.map +1 -0
- package/lib-es/managerApi/entities/LanguagePackageEntity.js +2 -0
- package/lib-es/managerApi/entities/LanguagePackageEntity.js.map +1 -0
- package/lib-es/managerApi/entities/mocks/aDeviceInfo.d.ts +3 -0
- package/lib-es/managerApi/entities/mocks/aDeviceInfo.d.ts.map +1 -0
- package/lib-es/managerApi/entities/mocks/aDeviceInfo.js +4 -0
- package/lib-es/managerApi/entities/mocks/aDeviceInfo.js.map +1 -0
- package/lib-es/managerApi/entities/mocks/aDeviceVersion.d.ts +3 -0
- package/lib-es/managerApi/entities/mocks/aDeviceVersion.d.ts.map +1 -0
- package/lib-es/managerApi/entities/mocks/aDeviceVersion.js +4 -0
- package/lib-es/managerApi/entities/mocks/aDeviceVersion.js.map +1 -0
- package/lib-es/managerApi/entities/mocks/aFinalFirmware.d.ts +3 -0
- package/lib-es/managerApi/entities/mocks/aFinalFirmware.d.ts.map +1 -0
- package/lib-es/managerApi/entities/mocks/aFinalFirmware.js +4 -0
- package/lib-es/managerApi/entities/mocks/aFinalFirmware.js.map +1 -0
- package/lib-es/managerApi/entities/mocks/aOsuFirmware.d.ts +19 -0
- package/lib-es/managerApi/entities/mocks/aOsuFirmware.d.ts.map +1 -0
- package/lib-es/managerApi/entities/mocks/aOsuFirmware.js +4 -0
- package/lib-es/managerApi/entities/mocks/aOsuFirmware.js.map +1 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.d.ts +18 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.d.ts.map +1 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.js +197 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.js.map +1 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.d.ts +2 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.d.ts.map +1 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.js +400 -0
- package/lib-es/managerApi/repositories/HttpManagerApiRepository.test.js.map +1 -0
- package/lib-es/managerApi/repositories/ManagerApiRepository.d.ts +54 -0
- package/lib-es/managerApi/repositories/ManagerApiRepository.d.ts.map +1 -0
- package/lib-es/managerApi/repositories/ManagerApiRepository.js +2 -0
- package/lib-es/managerApi/repositories/ManagerApiRepository.js.map +1 -0
- package/lib-es/managerApi/repositories/StubManagerApiRepository.d.ts +15 -0
- package/lib-es/managerApi/repositories/StubManagerApiRepository.d.ts.map +1 -0
- package/lib-es/managerApi/repositories/StubManagerApiRepository.js +40 -0
- package/lib-es/managerApi/repositories/StubManagerApiRepository.js.map +1 -0
- package/lib-es/managerApi/use-cases/fetchMcus.d.ts +3 -0
- package/lib-es/managerApi/use-cases/fetchMcus.d.ts.map +1 -0
- package/lib-es/managerApi/use-cases/fetchMcus.js +4 -0
- package/lib-es/managerApi/use-cases/fetchMcus.js.map +1 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.d.ts +12 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.d.ts.map +1 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.js +58 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.js.map +1 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts +2 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.d.ts.map +1 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.js +176 -0
- package/lib-es/managerApi/use-cases/getLatestFirmwareForDevice.test.js.map +1 -0
- package/lib-es/managerApi/use-cases/getProviderIdUseCase.d.ts +7 -0
- package/lib-es/managerApi/use-cases/getProviderIdUseCase.d.ts.map +1 -0
- package/lib-es/managerApi/use-cases/getProviderIdUseCase.js +19 -0
- package/lib-es/managerApi/use-cases/getProviderIdUseCase.js.map +1 -0
- package/lib-es/managerApi/use-cases/getUserHashes.d.ts +5 -0
- package/lib-es/managerApi/use-cases/getUserHashes.d.ts.map +1 -0
- package/lib-es/managerApi/use-cases/getUserHashes.js +26 -0
- package/lib-es/managerApi/use-cases/getUserHashes.js.map +1 -0
- package/package.json +67 -0
- package/src/capabilities/isCustomLockScreenSupported.test.ts +25 -0
- package/src/capabilities/isCustomLockScreenSupported.ts +17 -0
- package/src/capabilities/isEditDeviceNameSupported.test.ts +18 -0
- package/src/capabilities/isEditDeviceNameSupported.ts +5 -0
- package/src/capabilities/isSyncOnboardingSupported.test.ts +16 -0
- package/src/capabilities/isSyncOnboardingSupported.ts +5 -0
- package/src/commands/entities/APDU.ts +12 -0
- package/src/commands/entities/FirmwareInfoEntity.ts +14 -0
- package/src/commands/use-cases/getDeviceName.ts +38 -0
- package/src/commands/use-cases/getVersion.ts +23 -0
- package/src/commands/use-cases/isBootloaderVersionSupported.test.ts +58 -0
- package/src/commands/use-cases/isBootloaderVersionSupported.ts +24 -0
- package/src/commands/use-cases/isDeviceLocalizationSupported.test.ts +48 -0
- package/src/commands/use-cases/isDeviceLocalizationSupported.ts +20 -0
- package/src/commands/use-cases/isHardwareVersionSupported.test.ts +39 -0
- package/src/commands/use-cases/isHardwareVersionSupported.ts +20 -0
- package/src/commands/use-cases/parseGetDeviceNameResponse.test.ts +35 -0
- package/src/commands/use-cases/parseGetDeviceNameResponse.ts +20 -0
- package/src/commands/use-cases/parseGetVersionResponse.test.ts +123 -0
- package/src/commands/use-cases/parseGetVersionResponse.ts +121 -0
- package/src/customLockScreen/screenSpecs.ts +87 -0
- package/src/index.ts +33 -0
- package/src/managerApi/entities/AppEntity.ts +66 -0
- package/src/managerApi/entities/DeviceInfoEntity.ts +26 -0
- package/src/managerApi/entities/DeviceVersionEntity.ts +17 -0
- package/src/managerApi/entities/FirmwareUpdateContextEntity.ts +44 -0
- package/src/managerApi/entities/Id.ts +1 -0
- package/src/managerApi/entities/LanguagePackageEntity.ts +21 -0
- package/src/managerApi/entities/mocks/aDeviceInfo.ts +16 -0
- package/src/managerApi/entities/mocks/aDeviceVersion.ts +22 -0
- package/src/managerApi/entities/mocks/aFinalFirmware.ts +25 -0
- package/src/managerApi/entities/mocks/aOsuFirmware.ts +22 -0
- package/src/managerApi/repositories/HttpManagerApiRepository.test.ts +494 -0
- package/src/managerApi/repositories/HttpManagerApiRepository.ts +284 -0
- package/src/managerApi/repositories/ManagerApiRepository.ts +68 -0
- package/src/managerApi/repositories/StubManagerApiRepository.ts +49 -0
- package/src/managerApi/use-cases/fetchMcus.ts +5 -0
- package/src/managerApi/use-cases/getLatestFirmwareForDevice.test.ts +196 -0
- package/src/managerApi/use-cases/getLatestFirmwareForDevice.ts +66 -0
- package/src/managerApi/use-cases/getProviderIdUseCase.ts +24 -0
- package/src/managerApi/use-cases/getUserHashes.ts +30 -0
- package/tsconfig.json +16 -0
|
@@ -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 @@
|
|
|
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,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;IAExE;;SAEK;IACL,MAAM,CAAC,IAAA,uDAA0B,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,CAAC,IAAA,uDAA0B,EAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE1E;;SAEK;IACL,MAAM,CAAC,IAAA,uDAA0B,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,CAAC,IAAA,uDAA0B,EAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC"}
|
|
@@ -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 @@
|
|
|
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,EA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ponse.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":["../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C5B;YAED,IAAI,IAAA,6DAA6B,EAAC,SAAS,EAAE,WAAW,aAAX,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 @@
|
|
|
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,U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AAC;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;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G,CAAC;AACb,CAAC,EACD,EAAmD,CACpD,CAAC;AAEJ;;;;GAIG;AACH,SAAgB,8BAA8B,CAAC,aAAwC;IACrF,OAAO,2BAA2B,CAAC,aAAa,CAAC,CAAC;AACpD,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":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,YAAY,EACV,aAAa,EACb,WAAW,EACX,2BAA2B,GAC5B,MAAM,mDAAmD,CAAC;AAC3D,YAAY,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EACL,KAAK,yBAAyB,EAC9B,2BAA2B,GAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAErF,cAAc,gCAAgC,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.supportedDeviceModelIds = exports.isSyncOnboardingSupported = exports.isEditDeviceNameSupported = exports.isCustomLockScreenSupported = exports.getVersion = exports.isBootloaderVersionSupported = exports.isHardwareVersionSupported = exports.getDeviceName = exports.parseGetVersionResponse = exports.GET_VERSION_APDU = exports.aDeviceInfoBuilder = exports.fetchMcus = exports.getProviderIdUseCase = exports.PROVIDERS = exports.isDeviceLocalizationSupported = exports.getLatestFirmwareForDevice = exports.StubManagerApiRepository = exports.HttpManagerApiRepository = void 0;
|
|
18
|
+
var HttpManagerApiRepository_1 = require("./managerApi/repositories/HttpManagerApiRepository");
|
|
19
|
+
Object.defineProperty(exports, "HttpManagerApiRepository", { enumerable: true, get: function () { return HttpManagerApiRepository_1.HttpManagerApiRepository; } });
|
|
20
|
+
var StubManagerApiRepository_1 = require("./managerApi/repositories/StubManagerApiRepository");
|
|
21
|
+
Object.defineProperty(exports, "StubManagerApiRepository", { enumerable: true, get: function () { return StubManagerApiRepository_1.StubManagerApiRepository; } });
|
|
22
|
+
var getLatestFirmwareForDevice_1 = require("./managerApi/use-cases/getLatestFirmwareForDevice");
|
|
23
|
+
Object.defineProperty(exports, "getLatestFirmwareForDevice", { enumerable: true, get: function () { return getLatestFirmwareForDevice_1.getLatestFirmwareForDevice; } });
|
|
24
|
+
var isDeviceLocalizationSupported_1 = require("./commands/use-cases/isDeviceLocalizationSupported");
|
|
25
|
+
Object.defineProperty(exports, "isDeviceLocalizationSupported", { enumerable: true, get: function () { return isDeviceLocalizationSupported_1.isDeviceLocalizationSupported; } });
|
|
26
|
+
var getProviderIdUseCase_1 = require("./managerApi/use-cases/getProviderIdUseCase");
|
|
27
|
+
Object.defineProperty(exports, "PROVIDERS", { enumerable: true, get: function () { return getProviderIdUseCase_1.PROVIDERS; } });
|
|
28
|
+
Object.defineProperty(exports, "getProviderIdUseCase", { enumerable: true, get: function () { return getProviderIdUseCase_1.getProviderIdUseCase; } });
|
|
29
|
+
var fetchMcus_1 = require("./managerApi/use-cases/fetchMcus");
|
|
30
|
+
Object.defineProperty(exports, "fetchMcus", { enumerable: true, get: function () { return fetchMcus_1.fetchMcus; } });
|
|
31
|
+
var aDeviceInfo_1 = require("./managerApi/entities/mocks/aDeviceInfo");
|
|
32
|
+
Object.defineProperty(exports, "aDeviceInfoBuilder", { enumerable: true, get: function () { return aDeviceInfo_1.aDeviceInfoBuilder; } });
|
|
33
|
+
var getVersion_1 = require("./commands/use-cases/getVersion");
|
|
34
|
+
Object.defineProperty(exports, "GET_VERSION_APDU", { enumerable: true, get: function () { return getVersion_1.GET_VERSION_APDU; } });
|
|
35
|
+
var parseGetVersionResponse_1 = require("./commands/use-cases/parseGetVersionResponse");
|
|
36
|
+
Object.defineProperty(exports, "parseGetVersionResponse", { enumerable: true, get: function () { return parseGetVersionResponse_1.parseGetVersionResponse; } });
|
|
37
|
+
var getDeviceName_1 = require("./commands/use-cases/getDeviceName");
|
|
38
|
+
Object.defineProperty(exports, "getDeviceName", { enumerable: true, get: function () { return getDeviceName_1.getDeviceName; } });
|
|
39
|
+
var isHardwareVersionSupported_1 = require("./commands/use-cases/isHardwareVersionSupported");
|
|
40
|
+
Object.defineProperty(exports, "isHardwareVersionSupported", { enumerable: true, get: function () { return isHardwareVersionSupported_1.isHardwareVersionSupported; } });
|
|
41
|
+
var isBootloaderVersionSupported_1 = require("./commands/use-cases/isBootloaderVersionSupported");
|
|
42
|
+
Object.defineProperty(exports, "isBootloaderVersionSupported", { enumerable: true, get: function () { return isBootloaderVersionSupported_1.isBootloaderVersionSupported; } });
|
|
43
|
+
var getVersion_2 = require("./commands/use-cases/getVersion");
|
|
44
|
+
Object.defineProperty(exports, "getVersion", { enumerable: true, get: function () { return getVersion_2.getVersion; } });
|
|
45
|
+
// src/capabilities/
|
|
46
|
+
var isCustomLockScreenSupported_1 = require("./capabilities/isCustomLockScreenSupported");
|
|
47
|
+
Object.defineProperty(exports, "isCustomLockScreenSupported", { enumerable: true, get: function () { return isCustomLockScreenSupported_1.isCustomLockScreenSupported; } });
|
|
48
|
+
var isEditDeviceNameSupported_1 = require("./capabilities/isEditDeviceNameSupported");
|
|
49
|
+
Object.defineProperty(exports, "isEditDeviceNameSupported", { enumerable: true, get: function () { return isEditDeviceNameSupported_1.isEditDeviceNameSupported; } });
|
|
50
|
+
var isSyncOnboardingSupported_1 = require("./capabilities/isSyncOnboardingSupported");
|
|
51
|
+
Object.defineProperty(exports, "isSyncOnboardingSupported", { enumerable: true, get: function () { return isSyncOnboardingSupported_1.isSyncOnboardingSupported; } });
|
|
52
|
+
var isCustomLockScreenSupported_2 = require("./capabilities/isCustomLockScreenSupported");
|
|
53
|
+
Object.defineProperty(exports, "supportedDeviceModelIds", { enumerable: true, get: function () { return isCustomLockScreenSupported_2.supportedDeviceModelIds; } });
|
|
54
|
+
// src/customLockScreen/
|
|
55
|
+
__exportStar(require("./customLockScreen/screenSpecs"), exports);
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQA,+FAA8F;AAArF,oIAAA,wBAAwB,OAAA;AACjC,+FAA8F;AAArF,oIAAA,wBAAwB,OAAA;AACjC,gGAA+F;AAAtF,wIAAA,0BAA0B,OAAA;AACnC,oGAAmG;AAA1F,8IAAA,6BAA6B,OAAA;AACtC,oFAA8F;AAArF,iHAAA,SAAS,OAAA;AAAE,4HAAA,oBAAoB,OAAA;AACxC,8DAA6D;AAApD,sGAAA,SAAS,OAAA;AAClB,uEAA6E;AAApE,iHAAA,kBAAkB,OAAA;AAG3B,8DAAmE;AAA1D,8GAAA,gBAAgB,OAAA;AACzB,wFAAuF;AAA9E,kIAAA,uBAAuB,OAAA;AAChC,oEAAmE;AAA1D,8GAAA,aAAa,OAAA;AACtB,8FAA6F;AAApF,wIAAA,0BAA0B,OAAA;AACnC,kGAAiG;AAAxF,4IAAA,4BAA4B,OAAA;AACrC,8DAA6D;AAApD,wGAAA,UAAU,OAAA;AACnB,oBAAoB;AACpB,0FAGoD;AADlD,0IAAA,2BAA2B,OAAA;AAE7B,sFAAqF;AAA5E,sIAAA,yBAAyB,OAAA;AAClC,sFAAqF;AAA5E,sIAAA,yBAAyB,OAAA;AAClC,0FAAqF;AAA5E,sIAAA,uBAAuB,OAAA;AAChC,wBAAwB;AACxB,iEAA+C"}
|