@zwave-js/cc 14.0.0-beta.1 → 14.0.0-beta.4

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 (922) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +194 -0
  2. package/build/cjs/cc/AlarmSensorCC.js +395 -0
  3. package/build/cjs/cc/AlarmSensorCC.js.map +7 -0
  4. package/build/cjs/cc/AssociationCC.d.ts +253 -0
  5. package/build/cjs/cc/AssociationCC.js +711 -0
  6. package/build/cjs/cc/AssociationCC.js.map +7 -0
  7. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +230 -0
  8. package/build/cjs/cc/AssociationGroupInfoCC.js +746 -0
  9. package/build/cjs/cc/AssociationGroupInfoCC.js.map +7 -0
  10. package/build/cjs/cc/BarrierOperatorCC.d.ts +243 -0
  11. package/build/cjs/cc/BarrierOperatorCC.js +582 -0
  12. package/build/cjs/cc/BarrierOperatorCC.js.map +7 -0
  13. package/build/cjs/cc/BasicCC.d.ts +191 -0
  14. package/build/cjs/cc/BasicCC.js +384 -0
  15. package/build/cjs/cc/BasicCC.js.map +7 -0
  16. package/build/cjs/cc/BatteryCC.d.ts +406 -0
  17. package/build/cjs/cc/BatteryCC.js +508 -0
  18. package/build/cjs/cc/BatteryCC.js.map +7 -0
  19. package/build/cjs/cc/BinarySensorCC.d.ts +122 -0
  20. package/build/cjs/cc/BinarySensorCC.js +431 -0
  21. package/build/cjs/cc/BinarySensorCC.js.map +7 -0
  22. package/build/cjs/cc/BinarySwitchCC.d.ts +139 -0
  23. package/build/cjs/cc/BinarySwitchCC.js +378 -0
  24. package/build/cjs/cc/BinarySwitchCC.js.map +7 -0
  25. package/build/cjs/cc/CRC16CC.d.ts +29 -0
  26. package/build/cjs/cc/CRC16CC.js +133 -0
  27. package/build/cjs/cc/CRC16CC.js.map +7 -0
  28. package/build/cjs/cc/CentralSceneCC.d.ts +210 -0
  29. package/build/cjs/cc/CentralSceneCC.js +449 -0
  30. package/build/cjs/cc/CentralSceneCC.js.map +7 -0
  31. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +177 -0
  32. package/build/cjs/cc/ClimateControlScheduleCC.js +480 -0
  33. package/build/cjs/cc/ClimateControlScheduleCC.js.map +7 -0
  34. package/build/cjs/cc/ClockCC.d.ts +47 -0
  35. package/build/cjs/cc/ClockCC.js +226 -0
  36. package/build/cjs/cc/ClockCC.js.map +7 -0
  37. package/build/cjs/cc/ColorSwitchCC.d.ts +339 -0
  38. package/build/cjs/cc/ColorSwitchCC.js +1117 -0
  39. package/build/cjs/cc/ColorSwitchCC.js.map +7 -0
  40. package/build/cjs/cc/ConfigurationCC.d.ts +396 -0
  41. package/build/cjs/cc/ConfigurationCC.js +2230 -0
  42. package/build/cjs/cc/ConfigurationCC.js.map +7 -0
  43. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +17 -0
  44. package/build/cjs/cc/DeviceResetLocallyCC.js +92 -0
  45. package/build/cjs/cc/DeviceResetLocallyCC.js.map +7 -0
  46. package/build/cjs/cc/DoorLockCC.d.ts +837 -0
  47. package/build/cjs/cc/DoorLockCC.js +1239 -0
  48. package/build/cjs/cc/DoorLockCC.js.map +7 -0
  49. package/build/cjs/cc/DoorLockLoggingCC.d.ts +77 -0
  50. package/build/cjs/cc/DoorLockLoggingCC.js +343 -0
  51. package/build/cjs/cc/DoorLockLoggingCC.js.map +7 -0
  52. package/build/cjs/cc/EnergyProductionCC.d.ts +77 -0
  53. package/build/cjs/cc/EnergyProductionCC.js +240 -0
  54. package/build/cjs/cc/EnergyProductionCC.js.map +7 -0
  55. package/build/cjs/cc/EntryControlCC.d.ts +231 -0
  56. package/build/cjs/cc/EntryControlCC.js +593 -0
  57. package/build/cjs/cc/EntryControlCC.js.map +7 -0
  58. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  59. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +1122 -0
  60. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +7 -0
  61. package/build/cjs/cc/HailCC.d.ts +6 -0
  62. package/build/cjs/cc/HailCC.js +45 -0
  63. package/build/cjs/cc/HailCC.js.map +7 -0
  64. package/build/cjs/cc/HumidityControlModeCC.d.ts +111 -0
  65. package/build/cjs/cc/HumidityControlModeCC.js +323 -0
  66. package/build/cjs/cc/HumidityControlModeCC.js.map +7 -0
  67. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  68. package/build/cjs/cc/HumidityControlOperatingStateCC.js +164 -0
  69. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +7 -0
  70. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +209 -0
  71. package/build/cjs/cc/HumidityControlSetpointCC.js +634 -0
  72. package/build/cjs/cc/HumidityControlSetpointCC.js.map +7 -0
  73. package/build/cjs/cc/InclusionControllerCC.d.ts +42 -0
  74. package/build/cjs/cc/InclusionControllerCC.js +160 -0
  75. package/build/cjs/cc/InclusionControllerCC.js.map +7 -0
  76. package/build/cjs/cc/IndicatorCC.d.ts +338 -0
  77. package/build/cjs/cc/IndicatorCC.js +1234 -0
  78. package/build/cjs/cc/IndicatorCC.js.map +7 -0
  79. package/build/cjs/cc/IrrigationCC.d.ts +1496 -0
  80. package/build/cjs/cc/IrrigationCC.js +1978 -0
  81. package/build/cjs/cc/IrrigationCC.js.map +7 -0
  82. package/build/cjs/cc/LanguageCC.d.ts +101 -0
  83. package/build/cjs/cc/LanguageCC.js +267 -0
  84. package/build/cjs/cc/LanguageCC.js.map +7 -0
  85. package/build/cjs/cc/LockCC.d.ts +73 -0
  86. package/build/cjs/cc/LockCC.js +222 -0
  87. package/build/cjs/cc/LockCC.js.map +7 -0
  88. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +32 -0
  89. package/build/cjs/cc/ManufacturerProprietaryCC.js +209 -0
  90. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +7 -0
  91. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +171 -0
  92. package/build/cjs/cc/ManufacturerSpecificCC.js +334 -0
  93. package/build/cjs/cc/ManufacturerSpecificCC.js.map +7 -0
  94. package/build/cjs/cc/MeterCC.d.ts +318 -0
  95. package/build/cjs/cc/MeterCC.js +1235 -0
  96. package/build/cjs/cc/MeterCC.js.map +7 -0
  97. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +241 -0
  98. package/build/cjs/cc/MultiChannelAssociationCC.js +956 -0
  99. package/build/cjs/cc/MultiChannelAssociationCC.js.map +7 -0
  100. package/build/cjs/cc/MultiChannelCC.d.ts +394 -0
  101. package/build/cjs/cc/MultiChannelCC.js +1050 -0
  102. package/build/cjs/cc/MultiChannelCC.js.map +7 -0
  103. package/build/cjs/cc/MultiCommandCC.d.ts +27 -0
  104. package/build/cjs/cc/MultiCommandCC.js +159 -0
  105. package/build/cjs/cc/MultiCommandCC.js.map +7 -0
  106. package/build/cjs/cc/MultilevelSensorCC.d.ts +185 -0
  107. package/build/cjs/cc/MultilevelSensorCC.js +716 -0
  108. package/build/cjs/cc/MultilevelSensorCC.js.map +7 -0
  109. package/build/cjs/cc/MultilevelSwitchCC.d.ts +357 -0
  110. package/build/cjs/cc/MultilevelSwitchCC.js +780 -0
  111. package/build/cjs/cc/MultilevelSwitchCC.js.map +7 -0
  112. package/build/cjs/cc/NoOperationCC.d.ts +9 -0
  113. package/build/cjs/cc/NoOperationCC.js +64 -0
  114. package/build/cjs/cc/NoOperationCC.js.map +7 -0
  115. package/build/cjs/cc/NodeNamingCC.d.ts +118 -0
  116. package/build/cjs/cc/NodeNamingCC.js +364 -0
  117. package/build/cjs/cc/NodeNamingCC.js.map +7 -0
  118. package/build/cjs/cc/NotificationCC.d.ts +479 -0
  119. package/build/cjs/cc/NotificationCC.js +1245 -0
  120. package/build/cjs/cc/NotificationCC.js.map +7 -0
  121. package/build/cjs/cc/PowerlevelCC.d.ts +82 -0
  122. package/build/cjs/cc/PowerlevelCC.js +510 -0
  123. package/build/cjs/cc/PowerlevelCC.js.map +7 -0
  124. package/build/cjs/cc/ProtectionCC.d.ts +325 -0
  125. package/build/cjs/cc/ProtectionCC.js +667 -0
  126. package/build/cjs/cc/ProtectionCC.js.map +7 -0
  127. package/build/cjs/cc/SceneActivationCC.d.ts +89 -0
  128. package/build/cjs/cc/SceneActivationCC.js +193 -0
  129. package/build/cjs/cc/SceneActivationCC.js.map +7 -0
  130. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  131. package/build/cjs/cc/SceneActuatorConfigurationCC.js +370 -0
  132. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +7 -0
  133. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +129 -0
  134. package/build/cjs/cc/SceneControllerConfigurationCC.js +423 -0
  135. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +7 -0
  136. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +434 -0
  137. package/build/cjs/cc/ScheduleEntryLockCC.js +1763 -0
  138. package/build/cjs/cc/ScheduleEntryLockCC.js.map +7 -0
  139. package/build/cjs/cc/Security2CC.d.ts +251 -0
  140. package/build/cjs/cc/Security2CC.js +1589 -0
  141. package/build/cjs/cc/Security2CC.js.map +7 -0
  142. package/build/cjs/cc/SecurityCC.d.ts +128 -0
  143. package/build/cjs/cc/SecurityCC.js +757 -0
  144. package/build/cjs/cc/SecurityCC.js.map +7 -0
  145. package/build/cjs/cc/SoundSwitchCC.d.ts +232 -0
  146. package/build/cjs/cc/SoundSwitchCC.js +661 -0
  147. package/build/cjs/cc/SoundSwitchCC.js.map +7 -0
  148. package/build/cjs/cc/SupervisionCC.d.ts +104 -0
  149. package/build/cjs/cc/SupervisionCC.js +308 -0
  150. package/build/cjs/cc/SupervisionCC.js.map +7 -0
  151. package/build/cjs/cc/ThermostatFanModeCC.d.ts +141 -0
  152. package/build/cjs/cc/ThermostatFanModeCC.js +372 -0
  153. package/build/cjs/cc/ThermostatFanModeCC.js.map +7 -0
  154. package/build/cjs/cc/ThermostatFanStateCC.d.ts +60 -0
  155. package/build/cjs/cc/ThermostatFanStateCC.js +166 -0
  156. package/build/cjs/cc/ThermostatFanStateCC.js.map +7 -0
  157. package/build/cjs/cc/ThermostatModeCC.d.ts +150 -0
  158. package/build/cjs/cc/ThermostatModeCC.js +436 -0
  159. package/build/cjs/cc/ThermostatModeCC.js.map +7 -0
  160. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +61 -0
  161. package/build/cjs/cc/ThermostatOperatingStateCC.js +162 -0
  162. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +7 -0
  163. package/build/cjs/cc/ThermostatSetbackCC.d.ts +46 -0
  164. package/build/cjs/cc/ThermostatSetbackCC.js +262 -0
  165. package/build/cjs/cc/ThermostatSetbackCC.js.map +7 -0
  166. package/build/cjs/cc/ThermostatSetpointCC.d.ts +197 -0
  167. package/build/cjs/cc/ThermostatSetpointCC.js +638 -0
  168. package/build/cjs/cc/ThermostatSetpointCC.js.map +7 -0
  169. package/build/cjs/cc/TimeCC.d.ts +88 -0
  170. package/build/cjs/cc/TimeCC.js +473 -0
  171. package/build/cjs/cc/TimeCC.js.map +7 -0
  172. package/build/cjs/cc/TimeParametersCC.d.ts +72 -0
  173. package/build/cjs/cc/TimeParametersCC.js +313 -0
  174. package/build/cjs/cc/TimeParametersCC.js.map +7 -0
  175. package/build/cjs/cc/TransportServiceCC.d.ts +107 -0
  176. package/build/cjs/cc/TransportServiceCC.js +404 -0
  177. package/build/cjs/cc/TransportServiceCC.js.map +7 -0
  178. package/build/cjs/cc/UserCodeCC.d.ts +683 -0
  179. package/build/cjs/cc/UserCodeCC.js +1620 -0
  180. package/build/cjs/cc/UserCodeCC.js.map +7 -0
  181. package/build/cjs/cc/VersionCC.d.ts +469 -0
  182. package/build/cjs/cc/VersionCC.js +828 -0
  183. package/build/cjs/cc/VersionCC.js.map +7 -0
  184. package/build/cjs/cc/WakeUpCC.d.ts +150 -0
  185. package/build/cjs/cc/WakeUpCC.js +456 -0
  186. package/build/cjs/cc/WakeUpCC.js.map +7 -0
  187. package/build/cjs/cc/WindowCoveringCC.d.ts +315 -0
  188. package/build/cjs/cc/WindowCoveringCC.js +776 -0
  189. package/build/cjs/cc/WindowCoveringCC.js.map +7 -0
  190. package/build/cjs/cc/ZWaveLongRangeCC.d.ts +4 -0
  191. package/build/cjs/cc/ZWaveLongRangeCC.js +43 -0
  192. package/build/cjs/cc/ZWaveLongRangeCC.js.map +7 -0
  193. package/build/cjs/cc/ZWavePlusCC.d.ts +163 -0
  194. package/build/cjs/cc/ZWavePlusCC.js +288 -0
  195. package/build/cjs/cc/ZWavePlusCC.js.map +7 -0
  196. package/build/cjs/cc/ZWaveProtocolCC.d.ts +344 -0
  197. package/build/cjs/cc/ZWaveProtocolCC.js +1071 -0
  198. package/build/cjs/cc/ZWaveProtocolCC.js.map +7 -0
  199. package/build/cjs/cc/index.d.ts +132 -0
  200. package/build/cjs/cc/index.js +1180 -0
  201. package/build/cjs/cc/index.js.map +7 -0
  202. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  203. package/build/cjs/cc/manufacturerProprietary/Decorators.js +76 -0
  204. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +7 -0
  205. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  206. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +412 -0
  207. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +7 -0
  208. package/build/cjs/index.d.ts +15 -0
  209. package/build/cjs/index.js +77 -0
  210. package/build/cjs/index.js.map +7 -0
  211. package/build/cjs/index_safe.d.ts +3 -0
  212. package/build/cjs/index_safe.js +25 -0
  213. package/build/cjs/index_safe.js.map +7 -0
  214. package/build/cjs/lib/API.d.ts +271 -0
  215. package/build/cjs/lib/API.js +413 -0
  216. package/build/cjs/lib/API.js.map +7 -0
  217. package/build/cjs/lib/CommandClass.d.ts +234 -0
  218. package/build/cjs/lib/CommandClass.js +692 -0
  219. package/build/cjs/lib/CommandClass.js.map +7 -0
  220. package/build/cjs/lib/CommandClassDecorators.d.ts +112 -0
  221. package/build/cjs/lib/CommandClassDecorators.js +182 -0
  222. package/build/cjs/lib/CommandClassDecorators.js.map +7 -0
  223. package/build/cjs/lib/EncapsulatingCommandClass.d.ts +22 -0
  224. package/build/cjs/lib/EncapsulatingCommandClass.js +71 -0
  225. package/build/cjs/lib/EncapsulatingCommandClass.js.map +7 -0
  226. package/build/cjs/lib/ICommandClassContainer.js +17 -0
  227. package/build/cjs/lib/ICommandClassContainer.js.map +7 -0
  228. package/build/cjs/lib/NotificationEventPayload.d.ts +10 -0
  229. package/build/cjs/lib/NotificationEventPayload.js +31 -0
  230. package/build/cjs/lib/NotificationEventPayload.js.map +7 -0
  231. package/build/cjs/lib/Security2/Extension.js +333 -0
  232. package/build/cjs/lib/Security2/Extension.js.map +7 -0
  233. package/build/cjs/lib/Security2/shared.js +69 -0
  234. package/build/cjs/lib/Security2/shared.js.map +7 -0
  235. package/build/cjs/lib/SetValueResult.js +65 -0
  236. package/build/cjs/lib/SetValueResult.js.map +7 -0
  237. package/build/cjs/lib/Values.d.ts +223 -0
  238. package/build/cjs/lib/Values.js +191 -0
  239. package/build/cjs/lib/Values.js.map +7 -0
  240. package/build/cjs/lib/_Types.js +1676 -0
  241. package/build/cjs/lib/_Types.js.map +7 -0
  242. package/build/cjs/lib/serializers.d.ts +34 -0
  243. package/build/cjs/lib/serializers.js +110 -0
  244. package/build/cjs/lib/serializers.js.map +7 -0
  245. package/build/cjs/lib/utils.d.ts +17 -0
  246. package/build/cjs/lib/utils.js +678 -0
  247. package/build/cjs/lib/utils.js.map +7 -0
  248. package/build/cjs/package.json +3 -0
  249. package/build/esm/cc/AlarmSensorCC.d.ts +194 -0
  250. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -0
  251. package/build/esm/cc/AlarmSensorCC.js +392 -0
  252. package/build/esm/cc/AlarmSensorCC.js.map +1 -0
  253. package/build/esm/cc/AssociationCC.d.ts +253 -0
  254. package/build/esm/cc/AssociationCC.d.ts.map +1 -0
  255. package/build/esm/cc/AssociationCC.js +706 -0
  256. package/build/esm/cc/AssociationCC.js.map +1 -0
  257. package/build/esm/cc/AssociationGroupInfoCC.d.ts +230 -0
  258. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -0
  259. package/build/esm/cc/AssociationGroupInfoCC.js +769 -0
  260. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -0
  261. package/build/esm/cc/BarrierOperatorCC.d.ts +243 -0
  262. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -0
  263. package/build/esm/cc/BarrierOperatorCC.js +610 -0
  264. package/build/esm/cc/BarrierOperatorCC.js.map +1 -0
  265. package/build/esm/cc/BasicCC.d.ts +191 -0
  266. package/build/esm/cc/BasicCC.d.ts.map +1 -0
  267. package/build/esm/cc/BasicCC.js +390 -0
  268. package/build/esm/cc/BasicCC.js.map +1 -0
  269. package/build/esm/cc/BatteryCC.d.ts +406 -0
  270. package/build/esm/cc/BatteryCC.d.ts.map +1 -0
  271. package/build/esm/cc/BatteryCC.js +513 -0
  272. package/build/esm/cc/BatteryCC.js.map +1 -0
  273. package/build/esm/cc/BinarySensorCC.d.ts +122 -0
  274. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -0
  275. package/build/esm/cc/BinarySensorCC.js +417 -0
  276. package/build/esm/cc/BinarySensorCC.js.map +1 -0
  277. package/build/esm/cc/BinarySwitchCC.d.ts +139 -0
  278. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -0
  279. package/build/esm/cc/BinarySwitchCC.js +362 -0
  280. package/build/esm/cc/BinarySwitchCC.js.map +1 -0
  281. package/build/esm/cc/CRC16CC.d.ts +29 -0
  282. package/build/esm/cc/CRC16CC.d.ts.map +1 -0
  283. package/build/esm/cc/CRC16CC.js +123 -0
  284. package/build/esm/cc/CRC16CC.js.map +1 -0
  285. package/build/esm/cc/CentralSceneCC.d.ts +210 -0
  286. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -0
  287. package/build/esm/cc/CentralSceneCC.js +427 -0
  288. package/build/esm/cc/CentralSceneCC.js.map +1 -0
  289. package/build/esm/cc/ClimateControlScheduleCC.d.ts +177 -0
  290. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -0
  291. package/build/esm/cc/ClimateControlScheduleCC.js +466 -0
  292. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -0
  293. package/build/esm/cc/ClockCC.d.ts +47 -0
  294. package/build/esm/cc/ClockCC.d.ts.map +1 -0
  295. package/build/esm/cc/ClockCC.js +205 -0
  296. package/build/esm/cc/ClockCC.js.map +1 -0
  297. package/build/esm/cc/ColorSwitchCC.d.ts +339 -0
  298. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -0
  299. package/build/esm/cc/ColorSwitchCC.js +1149 -0
  300. package/build/esm/cc/ColorSwitchCC.js.map +1 -0
  301. package/build/esm/cc/ConfigurationCC.d.ts +396 -0
  302. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -0
  303. package/build/esm/cc/ConfigurationCC.js +2454 -0
  304. package/build/esm/cc/ConfigurationCC.js.map +1 -0
  305. package/build/esm/cc/DeviceResetLocallyCC.d.ts +17 -0
  306. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -0
  307. package/build/esm/cc/DeviceResetLocallyCC.js +73 -0
  308. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -0
  309. package/build/esm/cc/DoorLockCC.d.ts +837 -0
  310. package/build/esm/cc/DoorLockCC.d.ts.map +1 -0
  311. package/build/esm/cc/DoorLockCC.js +1270 -0
  312. package/build/esm/cc/DoorLockCC.js.map +1 -0
  313. package/build/esm/cc/DoorLockLoggingCC.d.ts +77 -0
  314. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -0
  315. package/build/esm/cc/DoorLockLoggingCC.js +316 -0
  316. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -0
  317. package/build/esm/cc/EnergyProductionCC.d.ts +77 -0
  318. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -0
  319. package/build/esm/cc/EnergyProductionCC.js +213 -0
  320. package/build/esm/cc/EnergyProductionCC.js.map +1 -0
  321. package/build/esm/cc/EntryControlCC.d.ts +231 -0
  322. package/build/esm/cc/EntryControlCC.d.ts.map +1 -0
  323. package/build/esm/cc/EntryControlCC.js +581 -0
  324. package/build/esm/cc/EntryControlCC.js.map +1 -0
  325. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  326. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
  327. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1142 -0
  328. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
  329. package/build/esm/cc/HailCC.d.ts +6 -0
  330. package/build/esm/cc/HailCC.d.ts.map +1 -0
  331. package/build/esm/cc/HailCC.js +21 -0
  332. package/build/esm/cc/HailCC.js.map +1 -0
  333. package/build/esm/cc/HumidityControlModeCC.d.ts +111 -0
  334. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -0
  335. package/build/esm/cc/HumidityControlModeCC.js +305 -0
  336. package/build/esm/cc/HumidityControlModeCC.js.map +1 -0
  337. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  338. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
  339. package/build/esm/cc/HumidityControlOperatingStateCC.js +137 -0
  340. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -0
  341. package/build/esm/cc/HumidityControlSetpointCC.d.ts +209 -0
  342. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -0
  343. package/build/esm/cc/HumidityControlSetpointCC.js +645 -0
  344. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -0
  345. package/build/esm/cc/InclusionControllerCC.d.ts +42 -0
  346. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -0
  347. package/build/esm/cc/InclusionControllerCC.js +133 -0
  348. package/build/esm/cc/InclusionControllerCC.js.map +1 -0
  349. package/build/esm/cc/IndicatorCC.d.ts +338 -0
  350. package/build/esm/cc/IndicatorCC.d.ts.map +1 -0
  351. package/build/esm/cc/IndicatorCC.js +1317 -0
  352. package/build/esm/cc/IndicatorCC.js.map +1 -0
  353. package/build/esm/cc/IrrigationCC.d.ts +1496 -0
  354. package/build/esm/cc/IrrigationCC.d.ts.map +1 -0
  355. package/build/esm/cc/IrrigationCC.js +2038 -0
  356. package/build/esm/cc/IrrigationCC.js.map +1 -0
  357. package/build/esm/cc/LanguageCC.d.ts +101 -0
  358. package/build/esm/cc/LanguageCC.d.ts.map +1 -0
  359. package/build/esm/cc/LanguageCC.js +243 -0
  360. package/build/esm/cc/LanguageCC.js.map +1 -0
  361. package/build/esm/cc/LockCC.d.ts +73 -0
  362. package/build/esm/cc/LockCC.d.ts.map +1 -0
  363. package/build/esm/cc/LockCC.js +197 -0
  364. package/build/esm/cc/LockCC.js.map +1 -0
  365. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +32 -0
  366. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
  367. package/build/esm/cc/ManufacturerProprietaryCC.js +201 -0
  368. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -0
  369. package/build/esm/cc/ManufacturerSpecificCC.d.ts +171 -0
  370. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -0
  371. package/build/esm/cc/ManufacturerSpecificCC.js +315 -0
  372. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -0
  373. package/build/esm/cc/MeterCC.d.ts +318 -0
  374. package/build/esm/cc/MeterCC.d.ts.map +1 -0
  375. package/build/esm/cc/MeterCC.js +1308 -0
  376. package/build/esm/cc/MeterCC.js.map +1 -0
  377. package/build/esm/cc/MultiChannelAssociationCC.d.ts +241 -0
  378. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -0
  379. package/build/esm/cc/MultiChannelAssociationCC.js +981 -0
  380. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -0
  381. package/build/esm/cc/MultiChannelCC.d.ts +394 -0
  382. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -0
  383. package/build/esm/cc/MultiChannelCC.js +1127 -0
  384. package/build/esm/cc/MultiChannelCC.js.map +1 -0
  385. package/build/esm/cc/MultiCommandCC.d.ts +27 -0
  386. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -0
  387. package/build/esm/cc/MultiCommandCC.js +142 -0
  388. package/build/esm/cc/MultiCommandCC.js.map +1 -0
  389. package/build/esm/cc/MultilevelSensorCC.d.ts +185 -0
  390. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -0
  391. package/build/esm/cc/MultilevelSensorCC.js +753 -0
  392. package/build/esm/cc/MultilevelSensorCC.js.map +1 -0
  393. package/build/esm/cc/MultilevelSwitchCC.d.ts +357 -0
  394. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -0
  395. package/build/esm/cc/MultilevelSwitchCC.js +810 -0
  396. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -0
  397. package/build/esm/cc/NoOperationCC.d.ts +9 -0
  398. package/build/esm/cc/NoOperationCC.d.ts.map +1 -0
  399. package/build/esm/cc/NoOperationCC.js +39 -0
  400. package/build/esm/cc/NoOperationCC.js.map +1 -0
  401. package/build/esm/cc/NodeNamingCC.d.ts +118 -0
  402. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -0
  403. package/build/esm/cc/NodeNamingCC.js +345 -0
  404. package/build/esm/cc/NodeNamingCC.js.map +1 -0
  405. package/build/esm/cc/NotificationCC.d.ts +479 -0
  406. package/build/esm/cc/NotificationCC.d.ts.map +1 -0
  407. package/build/esm/cc/NotificationCC.js +1350 -0
  408. package/build/esm/cc/NotificationCC.js.map +1 -0
  409. package/build/esm/cc/PowerlevelCC.d.ts +82 -0
  410. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -0
  411. package/build/esm/cc/PowerlevelCC.js +485 -0
  412. package/build/esm/cc/PowerlevelCC.js.map +1 -0
  413. package/build/esm/cc/ProtectionCC.d.ts +325 -0
  414. package/build/esm/cc/ProtectionCC.d.ts.map +1 -0
  415. package/build/esm/cc/ProtectionCC.js +669 -0
  416. package/build/esm/cc/ProtectionCC.js.map +1 -0
  417. package/build/esm/cc/SceneActivationCC.d.ts +89 -0
  418. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -0
  419. package/build/esm/cc/SceneActivationCC.js +166 -0
  420. package/build/esm/cc/SceneActivationCC.js.map +1 -0
  421. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  422. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
  423. package/build/esm/cc/SceneActuatorConfigurationCC.js +374 -0
  424. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -0
  425. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +129 -0
  426. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
  427. package/build/esm/cc/SceneControllerConfigurationCC.js +446 -0
  428. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -0
  429. package/build/esm/cc/ScheduleEntryLockCC.d.ts +434 -0
  430. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -0
  431. package/build/esm/cc/ScheduleEntryLockCC.js +1826 -0
  432. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -0
  433. package/build/esm/cc/Security2CC.d.ts +251 -0
  434. package/build/esm/cc/Security2CC.d.ts.map +1 -0
  435. package/build/esm/cc/Security2CC.js +1814 -0
  436. package/build/esm/cc/Security2CC.js.map +1 -0
  437. package/build/esm/cc/SecurityCC.d.ts +128 -0
  438. package/build/esm/cc/SecurityCC.d.ts.map +1 -0
  439. package/build/esm/cc/SecurityCC.js +800 -0
  440. package/build/esm/cc/SecurityCC.js.map +1 -0
  441. package/build/esm/cc/SoundSwitchCC.d.ts +232 -0
  442. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -0
  443. package/build/esm/cc/SoundSwitchCC.js +633 -0
  444. package/build/esm/cc/SoundSwitchCC.js.map +1 -0
  445. package/build/esm/cc/SupervisionCC.d.ts +104 -0
  446. package/build/esm/cc/SupervisionCC.d.ts.map +1 -0
  447. package/build/esm/cc/SupervisionCC.js +319 -0
  448. package/build/esm/cc/SupervisionCC.js.map +1 -0
  449. package/build/esm/cc/ThermostatFanModeCC.d.ts +141 -0
  450. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -0
  451. package/build/esm/cc/ThermostatFanModeCC.js +359 -0
  452. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -0
  453. package/build/esm/cc/ThermostatFanStateCC.d.ts +60 -0
  454. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -0
  455. package/build/esm/cc/ThermostatFanStateCC.js +139 -0
  456. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -0
  457. package/build/esm/cc/ThermostatModeCC.d.ts +150 -0
  458. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -0
  459. package/build/esm/cc/ThermostatModeCC.js +426 -0
  460. package/build/esm/cc/ThermostatModeCC.js.map +1 -0
  461. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +61 -0
  462. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
  463. package/build/esm/cc/ThermostatOperatingStateCC.js +135 -0
  464. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -0
  465. package/build/esm/cc/ThermostatSetbackCC.d.ts +46 -0
  466. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -0
  467. package/build/esm/cc/ThermostatSetbackCC.js +244 -0
  468. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -0
  469. package/build/esm/cc/ThermostatSetpointCC.d.ts +197 -0
  470. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -0
  471. package/build/esm/cc/ThermostatSetpointCC.js +655 -0
  472. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -0
  473. package/build/esm/cc/TimeCC.d.ts +88 -0
  474. package/build/esm/cc/TimeCC.d.ts.map +1 -0
  475. package/build/esm/cc/TimeCC.js +451 -0
  476. package/build/esm/cc/TimeCC.js.map +1 -0
  477. package/build/esm/cc/TimeParametersCC.d.ts +72 -0
  478. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -0
  479. package/build/esm/cc/TimeParametersCC.js +300 -0
  480. package/build/esm/cc/TimeParametersCC.js.map +1 -0
  481. package/build/esm/cc/TransportServiceCC.d.ts +107 -0
  482. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -0
  483. package/build/esm/cc/TransportServiceCC.js +422 -0
  484. package/build/esm/cc/TransportServiceCC.js.map +1 -0
  485. package/build/esm/cc/UserCodeCC.d.ts +683 -0
  486. package/build/esm/cc/UserCodeCC.d.ts.map +1 -0
  487. package/build/esm/cc/UserCodeCC.js +1695 -0
  488. package/build/esm/cc/UserCodeCC.js.map +1 -0
  489. package/build/esm/cc/VersionCC.d.ts +469 -0
  490. package/build/esm/cc/VersionCC.d.ts.map +1 -0
  491. package/build/esm/cc/VersionCC.js +862 -0
  492. package/build/esm/cc/VersionCC.js.map +1 -0
  493. package/build/esm/cc/WakeUpCC.d.ts +150 -0
  494. package/build/esm/cc/WakeUpCC.d.ts.map +1 -0
  495. package/build/esm/cc/WakeUpCC.js +438 -0
  496. package/build/esm/cc/WakeUpCC.js.map +1 -0
  497. package/build/esm/cc/WindowCoveringCC.d.ts +315 -0
  498. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -0
  499. package/build/esm/cc/WindowCoveringCC.js +780 -0
  500. package/build/esm/cc/WindowCoveringCC.js.map +1 -0
  501. package/build/esm/cc/ZWaveLongRangeCC.d.ts +4 -0
  502. package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -0
  503. package/build/esm/cc/ZWaveLongRangeCC.js +17 -0
  504. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -0
  505. package/build/esm/cc/ZWavePlusCC.d.ts +163 -0
  506. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -0
  507. package/build/esm/cc/ZWavePlusCC.js +267 -0
  508. package/build/esm/cc/ZWavePlusCC.js.map +1 -0
  509. package/build/esm/cc/ZWaveProtocolCC.d.ts +344 -0
  510. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -0
  511. package/build/esm/cc/ZWaveProtocolCC.js +1030 -0
  512. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -0
  513. package/build/esm/cc/index.d.ts +132 -0
  514. package/build/esm/cc/index.d.ts.map +1 -0
  515. package/build/esm/cc/index.js +71 -0
  516. package/build/esm/cc/index.js.map +1 -0
  517. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  518. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -0
  519. package/build/esm/cc/manufacturerProprietary/Decorators.js +79 -0
  520. package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -0
  521. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  522. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
  523. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +385 -0
  524. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
  525. package/build/esm/index.d.ts +15 -0
  526. package/build/esm/index.d.ts.map +1 -0
  527. package/build/esm/index.js +14 -0
  528. package/build/esm/index.js.map +1 -0
  529. package/build/esm/index_safe.d.ts +3 -0
  530. package/build/esm/index_safe.d.ts.map +1 -0
  531. package/build/esm/index_safe.js +4 -0
  532. package/build/esm/index_safe.js.map +1 -0
  533. package/build/esm/lib/API.d.ts +271 -0
  534. package/build/esm/lib/API.d.ts.map +1 -0
  535. package/build/esm/lib/API.js +448 -0
  536. package/build/esm/lib/API.js.map +1 -0
  537. package/build/esm/lib/CommandClass.d.ts +234 -0
  538. package/build/esm/lib/CommandClass.d.ts.map +1 -0
  539. package/build/esm/lib/CommandClass.js +781 -0
  540. package/build/esm/lib/CommandClass.js.map +1 -0
  541. package/build/esm/lib/CommandClassDecorators.d.ts +112 -0
  542. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -0
  543. package/build/esm/lib/CommandClassDecorators.js +229 -0
  544. package/build/esm/lib/CommandClassDecorators.js.map +1 -0
  545. package/build/esm/lib/EncapsulatingCommandClass.d.ts +22 -0
  546. package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -0
  547. package/build/esm/lib/EncapsulatingCommandClass.js +56 -0
  548. package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -0
  549. package/build/esm/lib/ICommandClassContainer.d.ts +2 -0
  550. package/build/esm/lib/ICommandClassContainer.d.ts.map +1 -0
  551. package/build/esm/lib/ICommandClassContainer.js +2 -0
  552. package/build/esm/lib/ICommandClassContainer.js.map +1 -0
  553. package/build/esm/lib/NotificationEventPayload.d.ts +10 -0
  554. package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -0
  555. package/build/esm/lib/NotificationEventPayload.js +7 -0
  556. package/build/esm/lib/NotificationEventPayload.js.map +1 -0
  557. package/build/esm/lib/Security2/Extension.d.ts +106 -0
  558. package/build/esm/lib/Security2/Extension.d.ts.map +1 -0
  559. package/build/esm/lib/Security2/Extension.js +296 -0
  560. package/build/esm/lib/Security2/Extension.js.map +1 -0
  561. package/build/esm/lib/Security2/shared.d.ts +37 -0
  562. package/build/esm/lib/Security2/shared.d.ts.map +1 -0
  563. package/build/esm/lib/Security2/shared.js +40 -0
  564. package/build/esm/lib/Security2/shared.js.map +1 -0
  565. package/build/esm/lib/SetValueResult.d.ts +55 -0
  566. package/build/esm/lib/SetValueResult.d.ts.map +1 -0
  567. package/build/esm/lib/SetValueResult.js +53 -0
  568. package/build/esm/lib/SetValueResult.js.map +1 -0
  569. package/build/esm/lib/Values.d.ts +223 -0
  570. package/build/esm/lib/Values.d.ts.map +1 -0
  571. package/build/esm/lib/Values.js +169 -0
  572. package/build/esm/lib/Values.js.map +1 -0
  573. package/build/esm/lib/_Types.d.ts +1461 -0
  574. package/build/esm/lib/_Types.d.ts.map +1 -0
  575. package/build/esm/lib/_Types.js +1432 -0
  576. package/build/esm/lib/_Types.js.map +1 -0
  577. package/build/esm/lib/serializers.d.ts +34 -0
  578. package/build/esm/lib/serializers.d.ts.map +1 -0
  579. package/build/esm/lib/serializers.js +98 -0
  580. package/build/esm/lib/serializers.js.map +1 -0
  581. package/build/esm/lib/utils.d.ts +17 -0
  582. package/build/esm/lib/utils.d.ts.map +1 -0
  583. package/build/esm/lib/utils.js +847 -0
  584. package/build/esm/lib/utils.js.map +1 -0
  585. package/build/esm/package.json +3 -0
  586. package/package.json +28 -23
  587. package/build/cc/AlarmSensorCC.d.ts +0 -194
  588. package/build/cc/AlarmSensorCC.d.ts.map +0 -1
  589. package/build/cc/AlarmSensorCC.js +0 -395
  590. package/build/cc/AlarmSensorCC.js.map +0 -1
  591. package/build/cc/AssociationCC.d.ts +0 -253
  592. package/build/cc/AssociationCC.d.ts.map +0 -1
  593. package/build/cc/AssociationCC.js +0 -732
  594. package/build/cc/AssociationCC.js.map +0 -1
  595. package/build/cc/AssociationGroupInfoCC.d.ts +0 -230
  596. package/build/cc/AssociationGroupInfoCC.d.ts.map +0 -1
  597. package/build/cc/AssociationGroupInfoCC.js +0 -772
  598. package/build/cc/AssociationGroupInfoCC.js.map +0 -1
  599. package/build/cc/BarrierOperatorCC.d.ts +0 -243
  600. package/build/cc/BarrierOperatorCC.d.ts.map +0 -1
  601. package/build/cc/BarrierOperatorCC.js +0 -613
  602. package/build/cc/BarrierOperatorCC.js.map +0 -1
  603. package/build/cc/BasicCC.d.ts +0 -191
  604. package/build/cc/BasicCC.d.ts.map +0 -1
  605. package/build/cc/BasicCC.js +0 -393
  606. package/build/cc/BasicCC.js.map +0 -1
  607. package/build/cc/BatteryCC.d.ts +0 -406
  608. package/build/cc/BatteryCC.d.ts.map +0 -1
  609. package/build/cc/BatteryCC.js +0 -516
  610. package/build/cc/BatteryCC.js.map +0 -1
  611. package/build/cc/BinarySensorCC.d.ts +0 -122
  612. package/build/cc/BinarySensorCC.d.ts.map +0 -1
  613. package/build/cc/BinarySensorCC.js +0 -420
  614. package/build/cc/BinarySensorCC.js.map +0 -1
  615. package/build/cc/BinarySwitchCC.d.ts +0 -139
  616. package/build/cc/BinarySwitchCC.d.ts.map +0 -1
  617. package/build/cc/BinarySwitchCC.js +0 -365
  618. package/build/cc/BinarySwitchCC.js.map +0 -1
  619. package/build/cc/CRC16CC.d.ts +0 -29
  620. package/build/cc/CRC16CC.d.ts.map +0 -1
  621. package/build/cc/CRC16CC.js +0 -126
  622. package/build/cc/CRC16CC.js.map +0 -1
  623. package/build/cc/CentralSceneCC.d.ts +0 -210
  624. package/build/cc/CentralSceneCC.d.ts.map +0 -1
  625. package/build/cc/CentralSceneCC.js +0 -453
  626. package/build/cc/CentralSceneCC.js.map +0 -1
  627. package/build/cc/ClimateControlScheduleCC.d.ts +0 -177
  628. package/build/cc/ClimateControlScheduleCC.d.ts.map +0 -1
  629. package/build/cc/ClimateControlScheduleCC.js +0 -469
  630. package/build/cc/ClimateControlScheduleCC.js.map +0 -1
  631. package/build/cc/ClockCC.d.ts +0 -47
  632. package/build/cc/ClockCC.d.ts.map +0 -1
  633. package/build/cc/ClockCC.js +0 -208
  634. package/build/cc/ClockCC.js.map +0 -1
  635. package/build/cc/ColorSwitchCC.d.ts +0 -339
  636. package/build/cc/ColorSwitchCC.d.ts.map +0 -1
  637. package/build/cc/ColorSwitchCC.js +0 -1152
  638. package/build/cc/ColorSwitchCC.js.map +0 -1
  639. package/build/cc/ConfigurationCC.d.ts +0 -396
  640. package/build/cc/ConfigurationCC.d.ts.map +0 -1
  641. package/build/cc/ConfigurationCC.js +0 -2458
  642. package/build/cc/ConfigurationCC.js.map +0 -1
  643. package/build/cc/DeviceResetLocallyCC.d.ts +0 -17
  644. package/build/cc/DeviceResetLocallyCC.d.ts.map +0 -1
  645. package/build/cc/DeviceResetLocallyCC.js +0 -76
  646. package/build/cc/DeviceResetLocallyCC.js.map +0 -1
  647. package/build/cc/DoorLockCC.d.ts +0 -837
  648. package/build/cc/DoorLockCC.d.ts.map +0 -1
  649. package/build/cc/DoorLockCC.js +0 -1273
  650. package/build/cc/DoorLockCC.js.map +0 -1
  651. package/build/cc/DoorLockLoggingCC.d.ts +0 -77
  652. package/build/cc/DoorLockLoggingCC.d.ts.map +0 -1
  653. package/build/cc/DoorLockLoggingCC.js +0 -319
  654. package/build/cc/DoorLockLoggingCC.js.map +0 -1
  655. package/build/cc/EnergyProductionCC.d.ts +0 -77
  656. package/build/cc/EnergyProductionCC.d.ts.map +0 -1
  657. package/build/cc/EnergyProductionCC.js +0 -216
  658. package/build/cc/EnergyProductionCC.js.map +0 -1
  659. package/build/cc/EntryControlCC.d.ts +0 -231
  660. package/build/cc/EntryControlCC.d.ts.map +0 -1
  661. package/build/cc/EntryControlCC.js +0 -607
  662. package/build/cc/EntryControlCC.js.map +0 -1
  663. package/build/cc/FirmwareUpdateMetaDataCC.d.ts +0 -359
  664. package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +0 -1
  665. package/build/cc/FirmwareUpdateMetaDataCC.js +0 -1145
  666. package/build/cc/FirmwareUpdateMetaDataCC.js.map +0 -1
  667. package/build/cc/HailCC.d.ts +0 -6
  668. package/build/cc/HailCC.d.ts.map +0 -1
  669. package/build/cc/HailCC.js +0 -24
  670. package/build/cc/HailCC.js.map +0 -1
  671. package/build/cc/HumidityControlModeCC.d.ts +0 -111
  672. package/build/cc/HumidityControlModeCC.d.ts.map +0 -1
  673. package/build/cc/HumidityControlModeCC.js +0 -308
  674. package/build/cc/HumidityControlModeCC.js.map +0 -1
  675. package/build/cc/HumidityControlOperatingStateCC.d.ts +0 -60
  676. package/build/cc/HumidityControlOperatingStateCC.d.ts.map +0 -1
  677. package/build/cc/HumidityControlOperatingStateCC.js +0 -140
  678. package/build/cc/HumidityControlOperatingStateCC.js.map +0 -1
  679. package/build/cc/HumidityControlSetpointCC.d.ts +0 -209
  680. package/build/cc/HumidityControlSetpointCC.d.ts.map +0 -1
  681. package/build/cc/HumidityControlSetpointCC.js +0 -648
  682. package/build/cc/HumidityControlSetpointCC.js.map +0 -1
  683. package/build/cc/InclusionControllerCC.d.ts +0 -42
  684. package/build/cc/InclusionControllerCC.d.ts.map +0 -1
  685. package/build/cc/InclusionControllerCC.js +0 -136
  686. package/build/cc/InclusionControllerCC.js.map +0 -1
  687. package/build/cc/IndicatorCC.d.ts +0 -338
  688. package/build/cc/IndicatorCC.d.ts.map +0 -1
  689. package/build/cc/IndicatorCC.js +0 -1320
  690. package/build/cc/IndicatorCC.js.map +0 -1
  691. package/build/cc/IrrigationCC.d.ts +0 -1496
  692. package/build/cc/IrrigationCC.d.ts.map +0 -1
  693. package/build/cc/IrrigationCC.js +0 -2041
  694. package/build/cc/IrrigationCC.js.map +0 -1
  695. package/build/cc/LanguageCC.d.ts +0 -101
  696. package/build/cc/LanguageCC.d.ts.map +0 -1
  697. package/build/cc/LanguageCC.js +0 -246
  698. package/build/cc/LanguageCC.js.map +0 -1
  699. package/build/cc/LockCC.d.ts +0 -73
  700. package/build/cc/LockCC.d.ts.map +0 -1
  701. package/build/cc/LockCC.js +0 -200
  702. package/build/cc/LockCC.js.map +0 -1
  703. package/build/cc/ManufacturerProprietaryCC.d.ts +0 -32
  704. package/build/cc/ManufacturerProprietaryCC.d.ts.map +0 -1
  705. package/build/cc/ManufacturerProprietaryCC.js +0 -204
  706. package/build/cc/ManufacturerProprietaryCC.js.map +0 -1
  707. package/build/cc/ManufacturerSpecificCC.d.ts +0 -171
  708. package/build/cc/ManufacturerSpecificCC.d.ts.map +0 -1
  709. package/build/cc/ManufacturerSpecificCC.js +0 -318
  710. package/build/cc/ManufacturerSpecificCC.js.map +0 -1
  711. package/build/cc/MeterCC.d.ts +0 -318
  712. package/build/cc/MeterCC.d.ts.map +0 -1
  713. package/build/cc/MeterCC.js +0 -1312
  714. package/build/cc/MeterCC.js.map +0 -1
  715. package/build/cc/MultiChannelAssociationCC.d.ts +0 -241
  716. package/build/cc/MultiChannelAssociationCC.d.ts.map +0 -1
  717. package/build/cc/MultiChannelAssociationCC.js +0 -1007
  718. package/build/cc/MultiChannelAssociationCC.js.map +0 -1
  719. package/build/cc/MultiChannelCC.d.ts +0 -394
  720. package/build/cc/MultiChannelCC.d.ts.map +0 -1
  721. package/build/cc/MultiChannelCC.js +0 -1130
  722. package/build/cc/MultiChannelCC.js.map +0 -1
  723. package/build/cc/MultiCommandCC.d.ts +0 -27
  724. package/build/cc/MultiCommandCC.d.ts.map +0 -1
  725. package/build/cc/MultiCommandCC.js +0 -145
  726. package/build/cc/MultiCommandCC.js.map +0 -1
  727. package/build/cc/MultilevelSensorCC.d.ts +0 -185
  728. package/build/cc/MultilevelSensorCC.d.ts.map +0 -1
  729. package/build/cc/MultilevelSensorCC.js +0 -756
  730. package/build/cc/MultilevelSensorCC.js.map +0 -1
  731. package/build/cc/MultilevelSwitchCC.d.ts +0 -357
  732. package/build/cc/MultilevelSwitchCC.d.ts.map +0 -1
  733. package/build/cc/MultilevelSwitchCC.js +0 -813
  734. package/build/cc/MultilevelSwitchCC.js.map +0 -1
  735. package/build/cc/NoOperationCC.d.ts +0 -9
  736. package/build/cc/NoOperationCC.d.ts.map +0 -1
  737. package/build/cc/NoOperationCC.js +0 -42
  738. package/build/cc/NoOperationCC.js.map +0 -1
  739. package/build/cc/NodeNamingCC.d.ts +0 -118
  740. package/build/cc/NodeNamingCC.d.ts.map +0 -1
  741. package/build/cc/NodeNamingCC.js +0 -348
  742. package/build/cc/NodeNamingCC.js.map +0 -1
  743. package/build/cc/NotificationCC.d.ts +0 -479
  744. package/build/cc/NotificationCC.d.ts.map +0 -1
  745. package/build/cc/NotificationCC.js +0 -1379
  746. package/build/cc/NotificationCC.js.map +0 -1
  747. package/build/cc/PowerlevelCC.d.ts +0 -82
  748. package/build/cc/PowerlevelCC.d.ts.map +0 -1
  749. package/build/cc/PowerlevelCC.js +0 -488
  750. package/build/cc/PowerlevelCC.js.map +0 -1
  751. package/build/cc/ProtectionCC.d.ts +0 -325
  752. package/build/cc/ProtectionCC.d.ts.map +0 -1
  753. package/build/cc/ProtectionCC.js +0 -672
  754. package/build/cc/ProtectionCC.js.map +0 -1
  755. package/build/cc/SceneActivationCC.d.ts +0 -89
  756. package/build/cc/SceneActivationCC.d.ts.map +0 -1
  757. package/build/cc/SceneActivationCC.js +0 -169
  758. package/build/cc/SceneActivationCC.js.map +0 -1
  759. package/build/cc/SceneActuatorConfigurationCC.d.ts +0 -120
  760. package/build/cc/SceneActuatorConfigurationCC.d.ts.map +0 -1
  761. package/build/cc/SceneActuatorConfigurationCC.js +0 -377
  762. package/build/cc/SceneActuatorConfigurationCC.js.map +0 -1
  763. package/build/cc/SceneControllerConfigurationCC.d.ts +0 -129
  764. package/build/cc/SceneControllerConfigurationCC.d.ts.map +0 -1
  765. package/build/cc/SceneControllerConfigurationCC.js +0 -449
  766. package/build/cc/SceneControllerConfigurationCC.js.map +0 -1
  767. package/build/cc/ScheduleEntryLockCC.d.ts +0 -434
  768. package/build/cc/ScheduleEntryLockCC.d.ts.map +0 -1
  769. package/build/cc/ScheduleEntryLockCC.js +0 -1829
  770. package/build/cc/ScheduleEntryLockCC.js.map +0 -1
  771. package/build/cc/Security2CC.d.ts +0 -251
  772. package/build/cc/Security2CC.d.ts.map +0 -1
  773. package/build/cc/Security2CC.js +0 -1817
  774. package/build/cc/Security2CC.js.map +0 -1
  775. package/build/cc/SecurityCC.d.ts +0 -128
  776. package/build/cc/SecurityCC.d.ts.map +0 -1
  777. package/build/cc/SecurityCC.js +0 -803
  778. package/build/cc/SecurityCC.js.map +0 -1
  779. package/build/cc/SoundSwitchCC.d.ts +0 -232
  780. package/build/cc/SoundSwitchCC.d.ts.map +0 -1
  781. package/build/cc/SoundSwitchCC.js +0 -636
  782. package/build/cc/SoundSwitchCC.js.map +0 -1
  783. package/build/cc/SupervisionCC.d.ts +0 -104
  784. package/build/cc/SupervisionCC.d.ts.map +0 -1
  785. package/build/cc/SupervisionCC.js +0 -322
  786. package/build/cc/SupervisionCC.js.map +0 -1
  787. package/build/cc/ThermostatFanModeCC.d.ts +0 -141
  788. package/build/cc/ThermostatFanModeCC.d.ts.map +0 -1
  789. package/build/cc/ThermostatFanModeCC.js +0 -362
  790. package/build/cc/ThermostatFanModeCC.js.map +0 -1
  791. package/build/cc/ThermostatFanStateCC.d.ts +0 -60
  792. package/build/cc/ThermostatFanStateCC.d.ts.map +0 -1
  793. package/build/cc/ThermostatFanStateCC.js +0 -142
  794. package/build/cc/ThermostatFanStateCC.js.map +0 -1
  795. package/build/cc/ThermostatModeCC.d.ts +0 -150
  796. package/build/cc/ThermostatModeCC.d.ts.map +0 -1
  797. package/build/cc/ThermostatModeCC.js +0 -429
  798. package/build/cc/ThermostatModeCC.js.map +0 -1
  799. package/build/cc/ThermostatOperatingStateCC.d.ts +0 -61
  800. package/build/cc/ThermostatOperatingStateCC.d.ts.map +0 -1
  801. package/build/cc/ThermostatOperatingStateCC.js +0 -138
  802. package/build/cc/ThermostatOperatingStateCC.js.map +0 -1
  803. package/build/cc/ThermostatSetbackCC.d.ts +0 -46
  804. package/build/cc/ThermostatSetbackCC.d.ts.map +0 -1
  805. package/build/cc/ThermostatSetbackCC.js +0 -247
  806. package/build/cc/ThermostatSetbackCC.js.map +0 -1
  807. package/build/cc/ThermostatSetpointCC.d.ts +0 -197
  808. package/build/cc/ThermostatSetpointCC.d.ts.map +0 -1
  809. package/build/cc/ThermostatSetpointCC.js +0 -658
  810. package/build/cc/ThermostatSetpointCC.js.map +0 -1
  811. package/build/cc/TimeCC.d.ts +0 -88
  812. package/build/cc/TimeCC.d.ts.map +0 -1
  813. package/build/cc/TimeCC.js +0 -454
  814. package/build/cc/TimeCC.js.map +0 -1
  815. package/build/cc/TimeParametersCC.d.ts +0 -72
  816. package/build/cc/TimeParametersCC.d.ts.map +0 -1
  817. package/build/cc/TimeParametersCC.js +0 -303
  818. package/build/cc/TimeParametersCC.js.map +0 -1
  819. package/build/cc/TransportServiceCC.d.ts +0 -107
  820. package/build/cc/TransportServiceCC.d.ts.map +0 -1
  821. package/build/cc/TransportServiceCC.js +0 -426
  822. package/build/cc/TransportServiceCC.js.map +0 -1
  823. package/build/cc/UserCodeCC.d.ts +0 -683
  824. package/build/cc/UserCodeCC.d.ts.map +0 -1
  825. package/build/cc/UserCodeCC.js +0 -1699
  826. package/build/cc/UserCodeCC.js.map +0 -1
  827. package/build/cc/VersionCC.d.ts +0 -469
  828. package/build/cc/VersionCC.d.ts.map +0 -1
  829. package/build/cc/VersionCC.js +0 -865
  830. package/build/cc/VersionCC.js.map +0 -1
  831. package/build/cc/WakeUpCC.d.ts +0 -150
  832. package/build/cc/WakeUpCC.d.ts.map +0 -1
  833. package/build/cc/WakeUpCC.js +0 -441
  834. package/build/cc/WakeUpCC.js.map +0 -1
  835. package/build/cc/WindowCoveringCC.d.ts +0 -315
  836. package/build/cc/WindowCoveringCC.d.ts.map +0 -1
  837. package/build/cc/WindowCoveringCC.js +0 -783
  838. package/build/cc/WindowCoveringCC.js.map +0 -1
  839. package/build/cc/ZWaveLongRangeCC.d.ts +0 -4
  840. package/build/cc/ZWaveLongRangeCC.d.ts.map +0 -1
  841. package/build/cc/ZWaveLongRangeCC.js +0 -20
  842. package/build/cc/ZWaveLongRangeCC.js.map +0 -1
  843. package/build/cc/ZWavePlusCC.d.ts +0 -163
  844. package/build/cc/ZWavePlusCC.d.ts.map +0 -1
  845. package/build/cc/ZWavePlusCC.js +0 -270
  846. package/build/cc/ZWavePlusCC.js.map +0 -1
  847. package/build/cc/ZWaveProtocolCC.d.ts +0 -344
  848. package/build/cc/ZWaveProtocolCC.d.ts.map +0 -1
  849. package/build/cc/ZWaveProtocolCC.js +0 -1033
  850. package/build/cc/ZWaveProtocolCC.js.map +0 -1
  851. package/build/cc/index.d.ts +0 -132
  852. package/build/cc/index.d.ts.map +0 -1
  853. package/build/cc/index.js +0 -627
  854. package/build/cc/index.js.map +0 -1
  855. package/build/cc/manufacturerProprietary/Decorators.d.ts +0 -64
  856. package/build/cc/manufacturerProprietary/Decorators.d.ts.map +0 -1
  857. package/build/cc/manufacturerProprietary/Decorators.js +0 -83
  858. package/build/cc/manufacturerProprietary/Decorators.js.map +0 -1
  859. package/build/cc/manufacturerProprietary/FibaroCC.d.ts +0 -79
  860. package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +0 -1
  861. package/build/cc/manufacturerProprietary/FibaroCC.js +0 -392
  862. package/build/cc/manufacturerProprietary/FibaroCC.js.map +0 -1
  863. package/build/index.d.ts +0 -15
  864. package/build/index.d.ts.map +0 -1
  865. package/build/index.js +0 -52
  866. package/build/index.js.map +0 -1
  867. package/build/index_safe.d.ts +0 -3
  868. package/build/index_safe.d.ts.map +0 -1
  869. package/build/index_safe.js +0 -20
  870. package/build/index_safe.js.map +0 -1
  871. package/build/lib/API.d.ts +0 -271
  872. package/build/lib/API.d.ts.map +0 -1
  873. package/build/lib/API.js +0 -458
  874. package/build/lib/API.js.map +0 -1
  875. package/build/lib/CommandClass.d.ts +0 -234
  876. package/build/lib/CommandClass.d.ts.map +0 -1
  877. package/build/lib/CommandClass.js +0 -788
  878. package/build/lib/CommandClass.js.map +0 -1
  879. package/build/lib/CommandClassDecorators.d.ts +0 -112
  880. package/build/lib/CommandClassDecorators.d.ts.map +0 -1
  881. package/build/lib/CommandClassDecorators.js +0 -243
  882. package/build/lib/CommandClassDecorators.js.map +0 -1
  883. package/build/lib/EncapsulatingCommandClass.d.ts +0 -22
  884. package/build/lib/EncapsulatingCommandClass.d.ts.map +0 -1
  885. package/build/lib/EncapsulatingCommandClass.js +0 -61
  886. package/build/lib/EncapsulatingCommandClass.js.map +0 -1
  887. package/build/lib/ICommandClassContainer.d.ts.map +0 -1
  888. package/build/lib/ICommandClassContainer.js +0 -3
  889. package/build/lib/ICommandClassContainer.js.map +0 -1
  890. package/build/lib/NotificationEventPayload.d.ts +0 -10
  891. package/build/lib/NotificationEventPayload.d.ts.map +0 -1
  892. package/build/lib/NotificationEventPayload.js +0 -10
  893. package/build/lib/NotificationEventPayload.js.map +0 -1
  894. package/build/lib/Security2/Extension.d.ts.map +0 -1
  895. package/build/lib/Security2/Extension.js +0 -303
  896. package/build/lib/Security2/Extension.js.map +0 -1
  897. package/build/lib/Security2/shared.d.ts.map +0 -1
  898. package/build/lib/Security2/shared.js +0 -43
  899. package/build/lib/Security2/shared.js.map +0 -1
  900. package/build/lib/SetValueResult.d.ts.map +0 -1
  901. package/build/lib/SetValueResult.js +0 -60
  902. package/build/lib/SetValueResult.js.map +0 -1
  903. package/build/lib/Values.d.ts +0 -223
  904. package/build/lib/Values.d.ts.map +0 -1
  905. package/build/lib/Values.js +0 -172
  906. package/build/lib/Values.js.map +0 -1
  907. package/build/lib/_Types.d.ts.map +0 -1
  908. package/build/lib/_Types.js +0 -1443
  909. package/build/lib/_Types.js.map +0 -1
  910. package/build/lib/serializers.d.ts +0 -34
  911. package/build/lib/serializers.d.ts.map +0 -1
  912. package/build/lib/serializers.js +0 -107
  913. package/build/lib/serializers.js.map +0 -1
  914. package/build/lib/utils.d.ts +0 -17
  915. package/build/lib/utils.d.ts.map +0 -1
  916. package/build/lib/utils.js +0 -860
  917. package/build/lib/utils.js.map +0 -1
  918. /package/build/{lib → cjs/lib}/ICommandClassContainer.d.ts +0 -0
  919. /package/build/{lib → cjs/lib}/Security2/Extension.d.ts +0 -0
  920. /package/build/{lib → cjs/lib}/Security2/shared.d.ts +0 -0
  921. /package/build/{lib → cjs/lib}/SetValueResult.d.ts +0 -0
  922. /package/build/{lib → cjs/lib}/_Types.d.ts +0 -0
@@ -0,0 +1,1589 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var Security2CC_exports = {};
20
+ __export(Security2CC_exports, {
21
+ Security2CC: () => Security2CC,
22
+ Security2CCAPI: () => Security2CCAPI,
23
+ Security2CCCommandsSupportedGet: () => Security2CCCommandsSupportedGet,
24
+ Security2CCCommandsSupportedReport: () => Security2CCCommandsSupportedReport,
25
+ Security2CCKEXFail: () => Security2CCKEXFail,
26
+ Security2CCKEXGet: () => Security2CCKEXGet,
27
+ Security2CCKEXReport: () => Security2CCKEXReport,
28
+ Security2CCKEXSet: () => Security2CCKEXSet,
29
+ Security2CCMessageEncapsulation: () => Security2CCMessageEncapsulation,
30
+ Security2CCNetworkKeyGet: () => Security2CCNetworkKeyGet,
31
+ Security2CCNetworkKeyReport: () => Security2CCNetworkKeyReport,
32
+ Security2CCNetworkKeyVerify: () => Security2CCNetworkKeyVerify,
33
+ Security2CCNonceGet: () => Security2CCNonceGet,
34
+ Security2CCNonceReport: () => Security2CCNonceReport,
35
+ Security2CCPublicKeyReport: () => Security2CCPublicKeyReport,
36
+ Security2CCTransferEnd: () => Security2CCTransferEnd
37
+ });
38
+ module.exports = __toCommonJS(Security2CC_exports);
39
+ var import_core = require("@zwave-js/core");
40
+ var import_safe = require("@zwave-js/core/safe");
41
+ var import_safe2 = require("@zwave-js/shared/safe");
42
+ var import_safe3 = require("@zwave-js/shared/safe");
43
+ var import_async = require("alcalzone-shared/async/index.js");
44
+ var import_typeguards = require("alcalzone-shared/typeguards/index.js");
45
+ var import_API = require("../lib/API.js");
46
+ var import_CommandClass = require("../lib/CommandClass.js");
47
+ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
48
+ var import_Extension = require("../lib/Security2/Extension.js");
49
+ var import_shared = require("../lib/Security2/shared.js");
50
+ var import_Types = require("../lib/_Types.js");
51
+ var import_CRC16CC = require("./CRC16CC.js");
52
+ var import_MultiChannelCC = require("./MultiChannelCC.js");
53
+ var import_SecurityCC = require("./SecurityCC.js");
54
+ var import_TransportServiceCC = require("./TransportServiceCC.js");
55
+ var __decorate = function(decorators, target, key, desc) {
56
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
57
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
58
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
59
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
60
+ };
61
+ var Security2CC_1, Security2CCMessageEncapsulation_1, Security2CCNonceReport_1, Security2CCNonceGet_1, Security2CCKEXReport_1, Security2CCKEXSet_1, Security2CCKEXFail_1, Security2CCPublicKeyReport_1, Security2CCNetworkKeyReport_1, Security2CCNetworkKeyGet_1, Security2CCTransferEnd_1, Security2CCCommandsSupportedReport_1;
62
+ function securityClassToBitMask(key) {
63
+ return (0, import_core.encodeBitMask)([key], import_core.SecurityClass.S0_Legacy, import_core.SecurityClass.S2_Unauthenticated);
64
+ }
65
+ function bitMaskToSecurityClass(buffer, offset) {
66
+ const keys = (0, import_core.parseBitMask)(buffer.subarray(offset, offset + 1), import_core.SecurityClass.S2_Unauthenticated);
67
+ (0, import_core.validatePayload)(keys.length === 1);
68
+ return keys[0];
69
+ }
70
+ function getAuthenticationData(sendingNodeId, destination, homeId, commandLength, unencryptedPayload) {
71
+ const nodeIdSize = (0, import_core.isLongRangeNodeId)(sendingNodeId) || (0, import_core.isLongRangeNodeId)(destination) ? 2 : 1;
72
+ const ret = new import_safe2.Bytes(2 * nodeIdSize + 6 + unencryptedPayload.length);
73
+ let offset = 0;
74
+ ret.writeUIntBE(sendingNodeId, offset, nodeIdSize);
75
+ offset += nodeIdSize;
76
+ ret.writeUIntBE(destination, offset, nodeIdSize);
77
+ offset += nodeIdSize;
78
+ ret.writeUInt32BE(homeId, offset);
79
+ offset += 4;
80
+ ret.writeUInt16BE(commandLength, offset);
81
+ offset += 2;
82
+ ret.set(unencryptedPayload, offset);
83
+ return ret;
84
+ }
85
+ function getSecurityManager(ownNodeId, securityManagers, otherNodeId) {
86
+ const longRange = (0, import_core.isLongRangeNodeId)(ownNodeId) || (0, import_core.isLongRangeNodeId)((0, import_typeguards.isArray)(otherNodeId) ? otherNodeId[0] : otherNodeId);
87
+ return longRange ? securityManagers.securityManagerLR : securityManagers.securityManager2;
88
+ }
89
+ function validateSequenceNumber(securityManager, sourceNodeId, sequenceNumber) {
90
+ import_core.validatePayload.withReason(`Duplicate command (sequence number ${sequenceNumber})`)(!securityManager.isDuplicateSinglecast(sourceNodeId, sequenceNumber));
91
+ return securityManager.storeSequenceNumber(sourceNodeId, sequenceNumber);
92
+ }
93
+ const MAX_DECRYPT_ATTEMPTS_SINGLECAST = 5;
94
+ const MAX_DECRYPT_ATTEMPTS_MULTICAST = 5;
95
+ const MAX_DECRYPT_ATTEMPTS_SC_FOLLOWUP = 1;
96
+ function assertSecurityRX(ctx) {
97
+ if (!ctx.ownNodeId) {
98
+ throw new import_core.ZWaveError(`Secure commands (S2) can only be decoded when the controller's node id is known!`, import_core.ZWaveErrorCodes.Driver_NotReady);
99
+ }
100
+ const ret = getSecurityManager(ctx.ownNodeId, ctx, ctx.sourceNodeId);
101
+ if (!ret) {
102
+ throw new import_core.ZWaveError(`Secure commands (S2) can only be decoded when the security manager is set up!`, import_core.ZWaveErrorCodes.Driver_NoSecurity);
103
+ }
104
+ return ret;
105
+ }
106
+ function assertSecurityTX(ctx, destination) {
107
+ if (!ctx.ownNodeId) {
108
+ throw new import_core.ZWaveError(`Secure commands (S2) can only be sent when the controller's node id is known!`, import_core.ZWaveErrorCodes.Driver_NotReady);
109
+ }
110
+ const ret = getSecurityManager(ctx.ownNodeId, ctx, destination);
111
+ if (!ret) {
112
+ throw new import_core.ZWaveError(`Secure commands (S2) can only be sent when the security manager is set up!`, import_core.ZWaveErrorCodes.Driver_NoSecurity);
113
+ }
114
+ return ret;
115
+ }
116
+ function decryptSinglecast(ctx, securityManager, sendingNodeId, curSequenceNumber, prevSequenceNumber, ciphertext, authData, authTag, spanState, extensions) {
117
+ const decryptWithNonce = (nonce) => {
118
+ const { keyCCM: key } = securityManager.getKeysForNode(sendingNodeId);
119
+ const iv = nonce;
120
+ return {
121
+ key,
122
+ iv,
123
+ ...(0, import_core.decryptAES128CCM)(key, iv, ciphertext, authData, authTag)
124
+ };
125
+ };
126
+ const getNonceAndDecrypt = () => {
127
+ const iv = securityManager.nextNonce(sendingNodeId);
128
+ return decryptWithNonce(iv);
129
+ };
130
+ if (spanState.type === import_core.SPANState.SPAN) {
131
+ if (
132
+ // The previous SPAN is still known, i.e. the node didn't send another command that was successfully decrypted
133
+ !!spanState.currentSPAN && spanState.currentSPAN.expires > (0, import_core.highResTimestamp)() && prevSequenceNumber != void 0 && curSequenceNumber === (prevSequenceNumber + 1 & 255) && !ctx.__internalIsMockNode
134
+ ) {
135
+ const nonce = spanState.currentSPAN.nonce;
136
+ spanState.currentSPAN = void 0;
137
+ const result = decryptWithNonce(nonce);
138
+ if (result.authOK) {
139
+ return {
140
+ ...result,
141
+ securityClass: spanState.securityClass
142
+ };
143
+ }
144
+ } else {
145
+ spanState.currentSPAN = void 0;
146
+ }
147
+ return {
148
+ ...getNonceAndDecrypt(),
149
+ securityClass: spanState.securityClass
150
+ };
151
+ } else if (spanState.type === import_core.SPANState.LocalEI) {
152
+ const senderEI = getSenderEI(extensions);
153
+ if (!senderEI)
154
+ failNoSPAN();
155
+ const receiverEI = spanState.receiverEI;
156
+ const isBootstrappingNode = securityManager.tempKeys.has(sendingNodeId);
157
+ if (isBootstrappingNode) {
158
+ securityManager.initializeTempSPAN(sendingNodeId, senderEI, receiverEI);
159
+ const ret = getNonceAndDecrypt();
160
+ if (ret.authOK) {
161
+ return {
162
+ ...ret,
163
+ securityClass: import_core.SecurityClass.Temporary
164
+ };
165
+ }
166
+ securityManager.setSPANState(sendingNodeId, spanState);
167
+ }
168
+ const possibleSecurityClasses = isBootstrappingNode ? [ctx.getHighestSecurityClass(sendingNodeId)] : import_core.securityClassOrder.filter((s) => ctx.hasSecurityClass(sendingNodeId, s) !== false);
169
+ for (const secClass of possibleSecurityClasses) {
170
+ if (!securityManager.hasKeysForSecurityClass(secClass)) {
171
+ continue;
172
+ }
173
+ securityManager.initializeSPAN(sendingNodeId, secClass, senderEI, receiverEI);
174
+ const ret = getNonceAndDecrypt();
175
+ if (ret.authOK) {
176
+ if (ctx.hasSecurityClass(sendingNodeId, secClass) === void 0) {
177
+ ctx.setSecurityClass(sendingNodeId, secClass, true);
178
+ }
179
+ return {
180
+ ...ret,
181
+ securityClass: secClass
182
+ };
183
+ } else {
184
+ securityManager.setSPANState(sendingNodeId, spanState);
185
+ }
186
+ }
187
+ }
188
+ return {
189
+ plaintext: new Uint8Array(),
190
+ authOK: false,
191
+ securityClass: void 0
192
+ };
193
+ }
194
+ function decryptMulticast(sendingNodeId, securityManager, groupId, ciphertext, authData, authTag) {
195
+ const iv = securityManager.nextPeerMPAN(sendingNodeId, groupId);
196
+ const { keyCCM: key } = securityManager.getKeysForNode(sendingNodeId);
197
+ return {
198
+ key,
199
+ iv,
200
+ ...(0, import_core.decryptAES128CCM)(key, iv, ciphertext, authData, authTag),
201
+ // The security class is irrelevant when decrypting multicast commands
202
+ securityClass: void 0
203
+ };
204
+ }
205
+ function getDestinationIDTX() {
206
+ if (this.isSinglecast())
207
+ return this.nodeId;
208
+ const ret = getMulticastGroupId(this.extensions);
209
+ if (ret == void 0) {
210
+ throw new import_core.ZWaveError("Multicast Security S2 encapsulation requires the MGRP extension", import_core.ZWaveErrorCodes.Security2CC_MissingExtension);
211
+ }
212
+ return ret;
213
+ }
214
+ function getDestinationIDRX(ctx, extensions) {
215
+ if (ctx.frameType === "singlecast") {
216
+ return ctx.ownNodeId;
217
+ }
218
+ const ret = getMulticastGroupId(extensions);
219
+ if (ret == void 0) {
220
+ throw new import_core.ZWaveError("Multicast Security S2 encapsulation requires the MGRP extension", import_core.ZWaveErrorCodes.Security2CC_MissingExtension);
221
+ }
222
+ return ret;
223
+ }
224
+ function getMulticastGroupId(extensions) {
225
+ const mgrpExtension = extensions.find((e) => e instanceof import_Extension.MGRPExtension);
226
+ return mgrpExtension?.groupId;
227
+ }
228
+ function getSenderEI(extensions) {
229
+ const spanExtension = extensions.find((e) => e instanceof import_Extension.SPANExtension);
230
+ return spanExtension?.senderEI;
231
+ }
232
+ let Security2CCAPI = class Security2CCAPI2 extends import_API.CCAPI {
233
+ supportsCommand(_cmd) {
234
+ return true;
235
+ }
236
+ /**
237
+ * Sends a nonce to the node, either in response to a NonceGet request or a message that failed to decrypt. The message is sent without any retransmission etc.
238
+ * The return value indicates whether a nonce was successfully sent
239
+ */
240
+ async sendNonce() {
241
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.NonceReport);
242
+ this.assertPhysicalEndpoint(this.endpoint);
243
+ const securityManager = getSecurityManager(this.host.ownNodeId, this.host, this.endpoint.nodeId);
244
+ if (!securityManager) {
245
+ throw new import_core.ZWaveError(`Nonces can only be sent if secure communication is set up!`, import_core.ZWaveErrorCodes.Driver_NoSecurity);
246
+ }
247
+ const receiverEI = securityManager.generateNonce(this.endpoint.nodeId);
248
+ const cc = new Security2CCNonceReport({
249
+ nodeId: this.endpoint.nodeId,
250
+ endpointIndex: this.endpoint.index,
251
+ SOS: true,
252
+ MOS: false,
253
+ receiverEI
254
+ });
255
+ try {
256
+ await this.host.sendCommand(cc, {
257
+ ...this.commandOptions,
258
+ // Seems we need these options or some nodes won't accept the nonce
259
+ transmitOptions: import_core.TransmitOptions.ACK | import_core.TransmitOptions.AutoRoute,
260
+ // Only try sending a nonce once
261
+ maxSendAttempts: 1,
262
+ // Nonce requests must be handled immediately
263
+ priority: import_core.MessagePriority.Immediate,
264
+ // We don't want failures causing us to treat the node as asleep or dead
265
+ changeNodeStatusOnMissingACK: false
266
+ // And we need to react to
267
+ });
268
+ } catch (e) {
269
+ if ((0, import_core.isTransmissionError)(e)) {
270
+ securityManager.deleteNonce(this.endpoint.nodeId);
271
+ return false;
272
+ } else {
273
+ throw e;
274
+ }
275
+ }
276
+ return true;
277
+ }
278
+ /** Notifies the target node that the MPAN state is out of sync */
279
+ async sendMOS() {
280
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.NonceReport);
281
+ this.assertPhysicalEndpoint(this.endpoint);
282
+ const cc = new Security2CCNonceReport({
283
+ nodeId: this.endpoint.nodeId,
284
+ endpointIndex: this.endpoint.index,
285
+ SOS: false,
286
+ MOS: true
287
+ });
288
+ try {
289
+ await this.host.sendCommand(cc, {
290
+ ...this.commandOptions,
291
+ // Seems we need these options or some nodes won't accept the nonce
292
+ transmitOptions: import_core.TransmitOptions.ACK | import_core.TransmitOptions.AutoRoute,
293
+ // Only try sending a nonce once
294
+ maxSendAttempts: 1,
295
+ // Nonce requests must be handled immediately
296
+ priority: import_core.MessagePriority.Immediate,
297
+ // We don't want failures causing us to treat the node as asleep or dead
298
+ changeNodeStatusOnMissingACK: false
299
+ });
300
+ } catch (e) {
301
+ if ((0, import_core.isTransmissionError)(e)) {
302
+ return false;
303
+ } else {
304
+ throw e;
305
+ }
306
+ }
307
+ return true;
308
+ }
309
+ /** Sends the given MPAN to the node */
310
+ async sendMPAN(groupId, innerMPANState) {
311
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.MessageEncapsulation);
312
+ this.assertPhysicalEndpoint(this.endpoint);
313
+ const cc = new Security2CCMessageEncapsulation({
314
+ nodeId: this.endpoint.nodeId,
315
+ endpointIndex: this.endpoint.index,
316
+ extensions: [
317
+ new import_Extension.MPANExtension({
318
+ groupId,
319
+ innerMPANState
320
+ })
321
+ ]
322
+ });
323
+ try {
324
+ await this.host.sendCommand(cc, {
325
+ ...this.commandOptions,
326
+ // Seems we need these options or some nodes won't accept the nonce
327
+ transmitOptions: import_core.TransmitOptions.ACK | import_core.TransmitOptions.AutoRoute,
328
+ // Only try sending a nonce once
329
+ maxSendAttempts: 1,
330
+ // Nonce requests must be handled immediately
331
+ priority: import_core.MessagePriority.Immediate,
332
+ // We don't want failures causing us to treat the node as asleep or dead
333
+ changeNodeStatusOnMissingACK: false
334
+ });
335
+ } catch (e) {
336
+ if ((0, import_core.isTransmissionError)(e)) {
337
+ return false;
338
+ } else {
339
+ throw e;
340
+ }
341
+ }
342
+ return true;
343
+ }
344
+ /**
345
+ * Queries the securely supported commands for the current security class
346
+ * @param securityClass Can be used to overwrite the security class to use. If this doesn't match the current one, new nonces will need to be exchanged.
347
+ */
348
+ async getSupportedCommands(securityClass) {
349
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.CommandsSupportedGet);
350
+ let cc = new Security2CCCommandsSupportedGet({
351
+ nodeId: this.endpoint.nodeId,
352
+ endpointIndex: this.endpoint.index
353
+ });
354
+ if (import_MultiChannelCC.MultiChannelCC.requiresEncapsulation(cc)) {
355
+ const multiChannelCCVersion = this.host.getSupportedCCVersion(import_core.CommandClasses["Multi Channel"], this.endpoint.nodeId);
356
+ cc = multiChannelCCVersion === 1 ? import_MultiChannelCC.MultiChannelCC.encapsulateV1(cc) : import_MultiChannelCC.MultiChannelCC.encapsulate(cc);
357
+ }
358
+ cc = Security2CC.encapsulate(cc, this.host.ownNodeId, this.host, { securityClass });
359
+ const response = await this.host.sendCommand(cc, {
360
+ ...this.commandOptions,
361
+ autoEncapsulate: false
362
+ });
363
+ return response?.supportedCCs;
364
+ }
365
+ async reportSupportedCommands(supportedCCs) {
366
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.CommandsSupportedReport);
367
+ const cc = new Security2CCCommandsSupportedReport({
368
+ nodeId: this.endpoint.nodeId,
369
+ endpointIndex: this.endpoint.index,
370
+ supportedCCs
371
+ });
372
+ await this.host.sendCommand(cc, this.commandOptions);
373
+ }
374
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
375
+ async getKeyExchangeParameters() {
376
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.KEXGet);
377
+ const cc = new Security2CCKEXGet({
378
+ nodeId: this.endpoint.nodeId,
379
+ endpointIndex: this.endpoint.index
380
+ });
381
+ const response = await this.host.sendCommand(cc, this.commandOptions);
382
+ if (response) {
383
+ return (0, import_safe3.pick)(response, [
384
+ "requestCSA",
385
+ "echo",
386
+ "supportedKEXSchemes",
387
+ "supportedECDHProfiles",
388
+ "requestedKeys",
389
+ "_reserved"
390
+ ]);
391
+ }
392
+ }
393
+ /** Requests the given keys from an including node */
394
+ async requestKeys(params) {
395
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.KEXReport);
396
+ const cc = new Security2CCKEXReport({
397
+ nodeId: this.endpoint.nodeId,
398
+ endpointIndex: this.endpoint.index,
399
+ ...params,
400
+ echo: false
401
+ });
402
+ await this.host.sendCommand(cc, this.commandOptions);
403
+ }
404
+ /** Grants the joining node the given keys */
405
+ async grantKeys(params) {
406
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.KEXSet);
407
+ const cc = new Security2CCKEXSet({
408
+ nodeId: this.endpoint.nodeId,
409
+ endpointIndex: this.endpoint.index,
410
+ ...params,
411
+ echo: false
412
+ });
413
+ await this.host.sendCommand(cc, this.commandOptions);
414
+ }
415
+ /** Confirms the keys that were requested by a node */
416
+ async confirmRequestedKeys(params) {
417
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.KEXReport);
418
+ const cc = new Security2CCKEXReport({
419
+ nodeId: this.endpoint.nodeId,
420
+ endpointIndex: this.endpoint.index,
421
+ ...params,
422
+ echo: true
423
+ });
424
+ await this.host.sendCommand(cc, this.commandOptions);
425
+ }
426
+ /** Confirms the keys that were granted by the including node */
427
+ async confirmGrantedKeys(params) {
428
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.KEXSet);
429
+ const cc = new Security2CCKEXSet({
430
+ nodeId: this.endpoint.nodeId,
431
+ endpointIndex: this.endpoint.index,
432
+ ...params,
433
+ echo: true
434
+ });
435
+ return this.host.sendCommand(cc, this.commandOptions);
436
+ }
437
+ /** Notifies the other node that the ongoing key exchange was aborted */
438
+ async abortKeyExchange(failType) {
439
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.KEXFail);
440
+ const cc = new Security2CCKEXFail({
441
+ nodeId: this.endpoint.nodeId,
442
+ endpointIndex: this.endpoint.index,
443
+ failType
444
+ });
445
+ await this.host.sendCommand(cc, this.commandOptions);
446
+ }
447
+ async sendPublicKey(publicKey, includingNode = true) {
448
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.PublicKeyReport);
449
+ const cc = new Security2CCPublicKeyReport({
450
+ nodeId: this.endpoint.nodeId,
451
+ endpointIndex: this.endpoint.index,
452
+ includingNode,
453
+ publicKey
454
+ });
455
+ await this.host.sendCommand(cc, this.commandOptions);
456
+ }
457
+ async requestNetworkKey(securityClass) {
458
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.NetworkKeyGet);
459
+ const cc = new Security2CCNetworkKeyGet({
460
+ nodeId: this.endpoint.nodeId,
461
+ endpointIndex: this.endpoint.index,
462
+ requestedKey: securityClass
463
+ });
464
+ await this.host.sendCommand(cc, this.commandOptions);
465
+ }
466
+ async sendNetworkKey(securityClass, networkKey) {
467
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.NetworkKeyReport);
468
+ const cc = new Security2CCNetworkKeyReport({
469
+ nodeId: this.endpoint.nodeId,
470
+ endpointIndex: this.endpoint.index,
471
+ grantedKey: securityClass,
472
+ networkKey
473
+ });
474
+ await this.host.sendCommand(cc, this.commandOptions);
475
+ }
476
+ async verifyNetworkKey() {
477
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.NetworkKeyVerify);
478
+ const cc = new Security2CCNetworkKeyVerify({
479
+ nodeId: this.endpoint.nodeId,
480
+ endpointIndex: this.endpoint.index
481
+ });
482
+ await this.host.sendCommand(cc, this.commandOptions);
483
+ }
484
+ async confirmKeyVerification() {
485
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.TransferEnd);
486
+ const cc = new Security2CCTransferEnd({
487
+ nodeId: this.endpoint.nodeId,
488
+ endpointIndex: this.endpoint.index,
489
+ keyVerified: true,
490
+ keyRequestComplete: false
491
+ });
492
+ await this.host.sendCommand(cc, {
493
+ ...this.commandOptions,
494
+ // Don't wait for an ACK from the node
495
+ transmitOptions: import_core.TransmitOptions.DEFAULT & ~import_core.TransmitOptions.ACK
496
+ });
497
+ }
498
+ async endKeyExchange() {
499
+ this.assertSupportsCommand(import_Types.Security2Command, import_Types.Security2Command.TransferEnd);
500
+ const cc = new Security2CCTransferEnd({
501
+ nodeId: this.endpoint.nodeId,
502
+ endpointIndex: this.endpoint.index,
503
+ keyVerified: false,
504
+ keyRequestComplete: true
505
+ });
506
+ await this.host.sendCommand(cc, this.commandOptions);
507
+ }
508
+ };
509
+ Security2CCAPI = __decorate([
510
+ (0, import_CommandClassDecorators.API)(import_core.CommandClasses["Security 2"])
511
+ ], Security2CCAPI);
512
+ let Security2CC = Security2CC_1 = class Security2CC2 extends import_CommandClass.CommandClass {
513
+ async interview(ctx) {
514
+ const securityManager = getSecurityManager(ctx.ownNodeId, ctx, this.nodeId);
515
+ const node = this.getNode(ctx);
516
+ const endpoint = this.getEndpoint(ctx);
517
+ const api = import_API.CCAPI.create(import_core.CommandClasses["Security 2"], ctx, endpoint).withOptions({
518
+ priority: import_core.MessagePriority.NodeQuery
519
+ });
520
+ const secClass = node.getHighestSecurityClass();
521
+ let hasReceivedSecureCommands = false;
522
+ let possibleSecurityClasses;
523
+ if ((0, import_core.securityClassIsS2)(secClass)) {
524
+ possibleSecurityClasses = [secClass];
525
+ } else if (endpoint.index === 0) {
526
+ possibleSecurityClasses = [
527
+ import_core.SecurityClass.S2_Unauthenticated,
528
+ import_core.SecurityClass.S2_Authenticated,
529
+ import_core.SecurityClass.S2_AccessControl
530
+ ];
531
+ } else {
532
+ ctx.logNode(node.id, {
533
+ endpoint: endpoint.index,
534
+ message: `Cannot query securely supported commands for endpoint because the node's security class isn't known...`,
535
+ level: "error"
536
+ });
537
+ return;
538
+ }
539
+ for (const secClass2 of possibleSecurityClasses) {
540
+ if (node.hasSecurityClass(secClass2) === false)
541
+ continue;
542
+ if (!securityManager?.hasKeysForSecurityClass(secClass2)) {
543
+ ctx.logNode(node.id, {
544
+ endpoint: endpoint.index,
545
+ message: `Cannot query securely supported commands (${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)}) - network key is not configured...`,
546
+ level: "warn"
547
+ });
548
+ continue;
549
+ }
550
+ ctx.logNode(node.id, {
551
+ endpoint: endpoint.index,
552
+ message: `Querying securely supported commands (${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)})...`,
553
+ direction: "outbound"
554
+ });
555
+ let supportedCCs;
556
+ const MAX_ATTEMPTS = this.endpointIndex === 0 ? 3 : 1;
557
+ for (let attempts = 1; attempts <= MAX_ATTEMPTS; attempts++) {
558
+ try {
559
+ supportedCCs = await api.getSupportedCommands(secClass2);
560
+ } catch (e) {
561
+ if ((0, import_core.isZWaveError)(e) && e.code === import_core.ZWaveErrorCodes.Security2CC_CannotDecode) {
562
+ supportedCCs = void 0;
563
+ } else {
564
+ throw e;
565
+ }
566
+ }
567
+ if (supportedCCs == void 0 && possibleSecurityClasses.length === 1) {
568
+ if (attempts < MAX_ATTEMPTS) {
569
+ ctx.logNode(node.id, {
570
+ endpoint: endpoint.index,
571
+ message: `Querying securely supported commands (${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)}), attempt ${attempts}/${MAX_ATTEMPTS} failed. Retrying in 500ms...`,
572
+ level: "warn"
573
+ });
574
+ await (0, import_async.wait)(500);
575
+ continue;
576
+ } else if (endpoint.index > 0) {
577
+ ctx.logNode(node.id, {
578
+ endpoint: endpoint.index,
579
+ message: `Querying securely supported commands (${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)}) failed. Assuming the endpoint supports all its mandatory CCs securely...`,
580
+ level: "warn"
581
+ });
582
+ for (const [ccId] of endpoint.getCCs()) {
583
+ endpoint.addCC(ccId, { secure: true });
584
+ }
585
+ break;
586
+ } else {
587
+ ctx.logNode(node.id, {
588
+ endpoint: endpoint.index,
589
+ message: `Querying securely supported commands (${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)}) failed. Let's hope for the best...`,
590
+ level: "warn"
591
+ });
592
+ break;
593
+ }
594
+ } else {
595
+ break;
596
+ }
597
+ }
598
+ if (supportedCCs == void 0) {
599
+ if (endpoint.index === 0 && possibleSecurityClasses.length > 1) {
600
+ node.setSecurityClass(secClass2, false);
601
+ ctx.logNode(node.id, {
602
+ message: `The node was NOT granted the security class ${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)}`,
603
+ direction: "inbound"
604
+ });
605
+ }
606
+ continue;
607
+ }
608
+ if (endpoint.index === 0 && possibleSecurityClasses.length > 1) {
609
+ node.setSecurityClass(secClass2, true);
610
+ ctx.logNode(node.id, {
611
+ message: `The node was granted the security class ${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)}`,
612
+ direction: "inbound"
613
+ });
614
+ }
615
+ if (!hasReceivedSecureCommands && supportedCCs.length > 0) {
616
+ hasReceivedSecureCommands = true;
617
+ const logLines = [
618
+ `received secure commands (${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, secClass2)})`,
619
+ "supported CCs:"
620
+ ];
621
+ for (const cc of supportedCCs) {
622
+ logLines.push(`\xB7 ${(0, import_core.getCCName)(cc)}`);
623
+ }
624
+ ctx.logNode(node.id, {
625
+ endpoint: endpoint.index,
626
+ message: logLines.join("\n"),
627
+ direction: "inbound"
628
+ });
629
+ for (const cc of supportedCCs) {
630
+ if (cc === import_core.CommandClasses.Basic) {
631
+ endpoint.addCC(cc, { secure: true });
632
+ } else {
633
+ endpoint.addCC(cc, {
634
+ isSupported: true,
635
+ secure: true
636
+ });
637
+ }
638
+ }
639
+ }
640
+ }
641
+ this.setInterviewComplete(ctx, true);
642
+ }
643
+ /** Tests if a command should be sent secure and thus requires encapsulation */
644
+ static requiresEncapsulation(cc) {
645
+ if (!(cc.encapsulationFlags & import_safe.EncapsulationFlags.Security)) {
646
+ return false;
647
+ }
648
+ if (cc instanceof import_SecurityCC.SecurityCC || cc instanceof import_CRC16CC.CRC16CC || cc instanceof import_TransportServiceCC.TransportServiceCC) {
649
+ return false;
650
+ }
651
+ if (cc instanceof Security2CC_1) {
652
+ switch (cc.ccCommand) {
653
+ case import_Types.Security2Command.CommandsSupportedGet:
654
+ case import_Types.Security2Command.CommandsSupportedReport:
655
+ case import_Types.Security2Command.NetworkKeyGet:
656
+ case import_Types.Security2Command.NetworkKeyReport:
657
+ case import_Types.Security2Command.NetworkKeyVerify:
658
+ case import_Types.Security2Command.TransferEnd:
659
+ return true;
660
+ case import_Types.Security2Command.KEXSet:
661
+ case import_Types.Security2Command.KEXReport:
662
+ return cc.echo;
663
+ case import_Types.Security2Command.KEXFail: {
664
+ switch (cc.failType) {
665
+ case import_shared.KEXFailType.Decrypt:
666
+ case import_shared.KEXFailType.WrongSecurityLevel:
667
+ case import_shared.KEXFailType.KeyNotGranted:
668
+ case import_shared.KEXFailType.NoVerify:
669
+ return true;
670
+ default:
671
+ return false;
672
+ }
673
+ }
674
+ }
675
+ return false;
676
+ }
677
+ return true;
678
+ }
679
+ /** Encapsulates a command that should be sent encrypted */
680
+ static encapsulate(cc, ownNodeId, securityManagers, options) {
681
+ const extensions = [];
682
+ if (options?.multicastOutOfSync) {
683
+ extensions.push(new import_Extension.MOSExtension());
684
+ }
685
+ if (options?.multicastGroupId != void 0) {
686
+ extensions.push(new import_Extension.MGRPExtension({ groupId: options.multicastGroupId }));
687
+ }
688
+ let nodeId;
689
+ if (cc.isMulticast()) {
690
+ if (cc.nodeId.some((nodeId2) => (0, import_core.isLongRangeNodeId)(nodeId2))) {
691
+ nodeId = import_safe.NODE_ID_BROADCAST_LR;
692
+ } else {
693
+ nodeId = import_safe.NODE_ID_BROADCAST;
694
+ }
695
+ } else {
696
+ nodeId = cc.nodeId;
697
+ }
698
+ const ret = new Security2CCMessageEncapsulation({
699
+ nodeId,
700
+ encapsulated: cc,
701
+ securityClass: options?.securityClass,
702
+ extensions,
703
+ verifyDelivery: options?.verifyDelivery
704
+ });
705
+ ret.encapsulationFlags = cc.encapsulationFlags & ~import_safe.EncapsulationFlags.Security;
706
+ return ret;
707
+ }
708
+ };
709
+ Security2CC = Security2CC_1 = __decorate([
710
+ (0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Security 2"]),
711
+ (0, import_CommandClassDecorators.implementedVersion)(1)
712
+ ], Security2CC);
713
+ function failNoSPAN() {
714
+ import_core.validatePayload.fail(import_core.ZWaveErrorCodes.Security2CC_NoSPAN);
715
+ }
716
+ function failNoMPAN() {
717
+ import_core.validatePayload.fail(import_core.ZWaveErrorCodes.Security2CC_NoMPAN);
718
+ }
719
+ function getCCResponseForMessageEncapsulation(sent) {
720
+ if (sent.encapsulated?.expectsCCResponse()) {
721
+ const ret = [
722
+ Security2CCMessageEncapsulation,
723
+ Security2CCNonceReport
724
+ ];
725
+ if (sent.encapsulated instanceof Security2CCKEXSet || sent.encapsulated instanceof Security2CCKEXReport || sent.encapsulated instanceof Security2CCNetworkKeyGet || sent.encapsulated instanceof Security2CCNetworkKeyReport || sent.encapsulated instanceof Security2CCNetworkKeyVerify) {
726
+ ret.push(Security2CCKEXFail);
727
+ }
728
+ return ret;
729
+ }
730
+ }
731
+ function testCCResponseForMessageEncapsulation(sent, received) {
732
+ if (received instanceof Security2CCMessageEncapsulation) {
733
+ return "checkEncapsulated";
734
+ } else if (received instanceof Security2CCKEXFail) {
735
+ return true;
736
+ } else {
737
+ return received.SOS && !!received.receiverEI;
738
+ }
739
+ }
740
+ let Security2CCMessageEncapsulation = Security2CCMessageEncapsulation_1 = class Security2CCMessageEncapsulation2 extends Security2CC {
741
+ constructor(options) {
742
+ super(options);
743
+ if (!options.encapsulated && !options.extensions?.length) {
744
+ throw new import_core.ZWaveError("Security S2 encapsulation requires an encapsulated CC and/or extensions", import_core.ZWaveErrorCodes.Argument_Invalid);
745
+ }
746
+ this.sequenceNumber = options.sequenceNumber;
747
+ this.securityClass = options.securityClass;
748
+ if (options.encapsulated) {
749
+ this.encapsulated = options.encapsulated;
750
+ options.encapsulated.encapsulatingCC = this;
751
+ }
752
+ this.verifyDelivery = options.verifyDelivery !== false;
753
+ this.extensions = options.extensions ?? [];
754
+ if (typeof this.nodeId !== "number" && !this.extensions.some((e) => e instanceof import_Extension.MGRPExtension)) {
755
+ throw new import_core.ZWaveError("Multicast Security S2 encapsulation requires the MGRP extension", import_core.ZWaveErrorCodes.Security2CC_MissingExtension);
756
+ }
757
+ }
758
+ static from(raw, ctx) {
759
+ const securityManager = assertSecurityRX(ctx);
760
+ (0, import_core.validatePayload)(raw.payload.length >= 2);
761
+ const sequenceNumber = raw.payload[0];
762
+ import_core.validatePayload.withReason("No security class granted")(ctx.getHighestSecurityClass(ctx.sourceNodeId) !== import_core.SecurityClass.None);
763
+ const hasExtensions = !!(raw.payload[1] & 1);
764
+ const hasEncryptedExtensions = !!(raw.payload[1] & 2);
765
+ let offset = 2;
766
+ const extensions = [];
767
+ let mustDiscardCommand = false;
768
+ const parseExtensions = (buffer, wasEncrypted) => {
769
+ while (true) {
770
+ if (buffer.length < offset + 2) {
771
+ mustDiscardCommand = true;
772
+ return;
773
+ }
774
+ const { actual: actualLength, expected: expectedLength } = import_Extension.Security2Extension.getExtensionLength(buffer.subarray(offset));
775
+ const extensionLength = expectedLength ?? actualLength;
776
+ if (extensionLength < 2) {
777
+ mustDiscardCommand = true;
778
+ return;
779
+ } else if (extensionLength > buffer.length - offset - (wasEncrypted ? 0 : import_core.SECURITY_S2_AUTH_TAG_LENGTH)) {
780
+ mustDiscardCommand = true;
781
+ return;
782
+ }
783
+ const extensionData = buffer.subarray(offset, offset + extensionLength);
784
+ offset += extensionLength;
785
+ const ext = import_Extension.Security2Extension.parse(extensionData);
786
+ switch ((0, import_Extension.validateS2Extension)(ext, wasEncrypted)) {
787
+ case import_Extension.ValidateS2ExtensionResult.OK:
788
+ if (expectedLength != void 0 && actualLength !== expectedLength) {
789
+ } else {
790
+ extensions.push(ext);
791
+ }
792
+ break;
793
+ case import_Extension.ValidateS2ExtensionResult.DiscardExtension:
794
+ break;
795
+ case import_Extension.ValidateS2ExtensionResult.DiscardCommand:
796
+ mustDiscardCommand = true;
797
+ break;
798
+ }
799
+ if (!ext.moreToFollow)
800
+ break;
801
+ }
802
+ };
803
+ if (hasExtensions)
804
+ parseExtensions(raw.payload, false);
805
+ const mcctx = (() => {
806
+ const multicastGroupId = getMulticastGroupId(extensions);
807
+ if (ctx.frameType === "multicast" || ctx.frameType === "broadcast") {
808
+ if (multicastGroupId == void 0) {
809
+ import_core.validatePayload.fail("Multicast frames without MGRP extension");
810
+ }
811
+ return {
812
+ isMulticast: true,
813
+ groupId: multicastGroupId
814
+ };
815
+ } else {
816
+ return { isMulticast: false, groupId: multicastGroupId };
817
+ }
818
+ })();
819
+ if (mustDiscardCommand) {
820
+ if (mcctx.isMulticast) {
821
+ securityManager.nextPeerMPAN(ctx.sourceNodeId, mcctx.groupId);
822
+ } else {
823
+ securityManager.nextNonce(ctx.sourceNodeId);
824
+ }
825
+ import_core.validatePayload.fail("Invalid S2 extension");
826
+ }
827
+ let prevSequenceNumber;
828
+ let mpanState;
829
+ if (mcctx.isMulticast) {
830
+ mpanState = securityManager.getPeerMPAN(ctx.sourceNodeId, mcctx.groupId);
831
+ } else {
832
+ prevSequenceNumber = validateSequenceNumber(securityManager, ctx.sourceNodeId, sequenceNumber);
833
+ if (mcctx.groupId == void 0) {
834
+ securityManager.resetOutOfSyncMPANs(ctx.sourceNodeId);
835
+ }
836
+ }
837
+ const unencryptedPayload = raw.payload.subarray(0, offset);
838
+ const ciphertext = raw.payload.subarray(offset, -import_core.SECURITY_S2_AUTH_TAG_LENGTH);
839
+ const authTag = raw.payload.subarray(-import_core.SECURITY_S2_AUTH_TAG_LENGTH);
840
+ const messageLength = 2 + raw.payload.length;
841
+ const authData = getAuthenticationData(ctx.sourceNodeId, getDestinationIDRX(ctx, extensions), ctx.homeId, messageLength, unencryptedPayload);
842
+ let decrypt;
843
+ if (mcctx.isMulticast) {
844
+ if (mpanState?.type !== import_core.MPANState.MPAN) {
845
+ securityManager.storePeerMPAN(ctx.sourceNodeId, mcctx.groupId, { type: import_core.MPANState.OutOfSync });
846
+ failNoMPAN();
847
+ }
848
+ decrypt = () => decryptMulticast(ctx.sourceNodeId, securityManager, mcctx.groupId, ciphertext, authData, authTag);
849
+ } else {
850
+ const spanState = securityManager.getSPANState(ctx.sourceNodeId);
851
+ if (spanState.type === import_core.SPANState.None) {
852
+ failNoSPAN();
853
+ } else if (spanState.type === import_core.SPANState.RemoteEI) {
854
+ failNoSPAN();
855
+ }
856
+ decrypt = () => decryptSinglecast(ctx, securityManager, ctx.sourceNodeId, sequenceNumber, prevSequenceNumber, ciphertext, authData, authTag, spanState, extensions);
857
+ }
858
+ let plaintext;
859
+ let authOK = false;
860
+ let key;
861
+ let iv;
862
+ let decryptionSecurityClass;
863
+ const decryptAttempts = mcctx.isMulticast ? MAX_DECRYPT_ATTEMPTS_MULTICAST : mcctx.groupId != void 0 ? MAX_DECRYPT_ATTEMPTS_SC_FOLLOWUP : MAX_DECRYPT_ATTEMPTS_SINGLECAST;
864
+ for (let i = 0; i < decryptAttempts; i++) {
865
+ ({
866
+ plaintext,
867
+ authOK,
868
+ key,
869
+ iv,
870
+ securityClass: decryptionSecurityClass
871
+ } = decrypt());
872
+ if (!!authOK && !!plaintext)
873
+ break;
874
+ if (!!getSenderEI(extensions))
875
+ break;
876
+ }
877
+ if (!authOK || !plaintext) {
878
+ if (mcctx.isMulticast) {
879
+ securityManager.storePeerMPAN(ctx.sourceNodeId, mcctx.groupId, { type: import_core.MPANState.OutOfSync });
880
+ import_core.validatePayload.fail(import_core.ZWaveErrorCodes.Security2CC_CannotDecodeMulticast);
881
+ } else {
882
+ import_core.validatePayload.fail(import_core.ZWaveErrorCodes.Security2CC_CannotDecode);
883
+ }
884
+ } else if (!mcctx.isMulticast && mcctx.groupId != void 0) {
885
+ securityManager.tryIncrementPeerMPAN(ctx.sourceNodeId, mcctx.groupId);
886
+ }
887
+ const securityClass = decryptionSecurityClass;
888
+ offset = 0;
889
+ if (hasEncryptedExtensions)
890
+ parseExtensions(plaintext, true);
891
+ if (mustDiscardCommand) {
892
+ import_core.validatePayload.fail("Invalid extension");
893
+ }
894
+ if (!mcctx.isMulticast) {
895
+ const mpanExtension = extensions.find((e) => e instanceof import_Extension.MPANExtension);
896
+ if (mpanExtension) {
897
+ securityManager.storePeerMPAN(ctx.sourceNodeId, mpanExtension.groupId, {
898
+ type: import_core.MPANState.MPAN,
899
+ currentMPAN: mpanExtension.innerMPANState
900
+ });
901
+ }
902
+ }
903
+ const decryptedCCBytes = plaintext.subarray(offset);
904
+ let encapsulated;
905
+ if (decryptedCCBytes.length > 0) {
906
+ (0, import_core.validatePayload)(decryptedCCBytes.length >= 2);
907
+ encapsulated = import_CommandClass.CommandClass.parse(decryptedCCBytes, ctx);
908
+ }
909
+ const ret = new Security2CCMessageEncapsulation_1({
910
+ nodeId: ctx.sourceNodeId,
911
+ sequenceNumber,
912
+ securityClass,
913
+ extensions,
914
+ encapsulated
915
+ });
916
+ ret.key = key;
917
+ ret.iv = iv;
918
+ ret.authData = authData;
919
+ ret.authTag = authTag;
920
+ ret.plaintext = decryptedCCBytes;
921
+ return ret;
922
+ }
923
+ securityClass;
924
+ // Only used for testing/debugging purposes
925
+ key;
926
+ iv;
927
+ authData;
928
+ authTag;
929
+ ciphertext;
930
+ plaintext;
931
+ verifyDelivery = true;
932
+ sequenceNumber;
933
+ ensureSequenceNumber(securityManager) {
934
+ if (this.sequenceNumber == void 0) {
935
+ if (this.isSinglecast()) {
936
+ this.sequenceNumber = securityManager.nextSequenceNumber(this.nodeId);
937
+ } else {
938
+ const groupId = getDestinationIDTX.call(this);
939
+ this.sequenceNumber = securityManager.nextMulticastSequenceNumber(groupId);
940
+ }
941
+ }
942
+ }
943
+ encapsulated;
944
+ extensions;
945
+ prepareRetransmission() {
946
+ super.prepareRetransmission();
947
+ this.sequenceNumber = void 0;
948
+ }
949
+ hasMOSExtension() {
950
+ return this.extensions.some((e) => e instanceof import_Extension.MOSExtension);
951
+ }
952
+ /** Returns the Sender's Entropy Input if this command contains an SPAN extension */
953
+ getSenderEI() {
954
+ return getSenderEI(this.extensions);
955
+ }
956
+ /** Returns the multicast group ID if this command contains an MGRP extension */
957
+ getMulticastGroupId() {
958
+ return getMulticastGroupId(this.extensions);
959
+ }
960
+ maybeAddSPANExtension(ctx, securityManager) {
961
+ if (!this.isSinglecast())
962
+ return;
963
+ const receiverNodeId = this.nodeId;
964
+ const spanState = securityManager.getSPANState(receiverNodeId);
965
+ if (spanState.type === import_core.SPANState.None || spanState.type === import_core.SPANState.LocalEI) {
966
+ throw new import_core.ZWaveError(`Security S2 CC requires the receiver's nonce to be sent!`, import_core.ZWaveErrorCodes.Security2CC_NoSPAN);
967
+ } else if (spanState.type === import_core.SPANState.RemoteEI) {
968
+ const senderEI = securityManager.generateNonce(void 0);
969
+ const receiverEI = spanState.receiverEI;
970
+ if (this.securityClass == void 0 && securityManager.tempKeys.has(receiverNodeId)) {
971
+ securityManager.initializeTempSPAN(receiverNodeId, senderEI, receiverEI);
972
+ } else {
973
+ const securityClass = this.securityClass ?? ctx.getHighestSecurityClass(receiverNodeId);
974
+ if (securityClass == void 0) {
975
+ throw new import_core.ZWaveError("No security class defined for this command!", import_core.ZWaveErrorCodes.Security2CC_NoSPAN);
976
+ }
977
+ securityManager.initializeSPAN(receiverNodeId, securityClass, senderEI, receiverEI);
978
+ }
979
+ let spanExtension = this.extensions.find((e) => e instanceof import_Extension.SPANExtension);
980
+ if (spanExtension) {
981
+ spanExtension.senderEI = senderEI;
982
+ } else {
983
+ spanExtension = new import_Extension.SPANExtension({ senderEI });
984
+ this.extensions.push(spanExtension);
985
+ }
986
+ }
987
+ }
988
+ serialize(ctx) {
989
+ const securityManager = assertSecurityTX(ctx, this.nodeId);
990
+ this.ensureSequenceNumber(securityManager);
991
+ this.maybeAddSPANExtension(ctx, securityManager);
992
+ const unencryptedExtensions = this.extensions.filter((e) => !e.isEncrypted());
993
+ const encryptedExtensions = this.extensions.filter((e) => e.isEncrypted());
994
+ const unencryptedPayload = import_safe2.Bytes.concat([
995
+ import_safe2.Bytes.from([
996
+ this.sequenceNumber,
997
+ (encryptedExtensions.length > 0 ? 2 : 0) | (unencryptedExtensions.length > 0 ? 1 : 0)
998
+ ]),
999
+ ...unencryptedExtensions.map((e, index) => e.serialize(index < unencryptedExtensions.length - 1))
1000
+ ]);
1001
+ const serializedCC = this.encapsulated?.serialize(ctx) ?? new import_safe2.Bytes();
1002
+ const plaintextPayload = import_safe2.Bytes.concat([
1003
+ ...encryptedExtensions.map((e, index) => e.serialize(index < encryptedExtensions.length - 1)),
1004
+ serializedCC
1005
+ ]);
1006
+ const destinationTag = getDestinationIDTX.call(this);
1007
+ const messageLength = this.computeEncapsulationOverhead() + serializedCC.length;
1008
+ const authData = getAuthenticationData(ctx.ownNodeId, destinationTag, ctx.homeId, messageLength, unencryptedPayload);
1009
+ let key;
1010
+ let iv;
1011
+ if (this.isSinglecast()) {
1012
+ iv = securityManager.nextNonce(this.nodeId, true);
1013
+ const { keyCCM } = (
1014
+ // Prefer the overridden security class if it was given
1015
+ this.securityClass != void 0 ? securityManager.getKeysForSecurityClass(this.securityClass) : securityManager.getKeysForNode(this.nodeId)
1016
+ );
1017
+ key = keyCCM;
1018
+ } else {
1019
+ const keyAndIV = securityManager.getMulticastKeyAndIV(destinationTag);
1020
+ key = keyAndIV.key;
1021
+ iv = keyAndIV.iv;
1022
+ }
1023
+ const { ciphertext: ciphertextPayload, authTag } = (0, import_core.encryptAES128CCM)(key, iv, plaintextPayload, authData, import_core.SECURITY_S2_AUTH_TAG_LENGTH);
1024
+ this.key = key;
1025
+ this.iv = iv;
1026
+ this.authData = authData;
1027
+ this.authTag = authTag;
1028
+ this.ciphertext = ciphertextPayload;
1029
+ this.payload = import_safe2.Bytes.concat([
1030
+ unencryptedPayload,
1031
+ ciphertextPayload,
1032
+ authTag
1033
+ ]);
1034
+ return super.serialize(ctx);
1035
+ }
1036
+ computeEncapsulationOverhead() {
1037
+ const extensionBytes = this.extensions.map((e) => e.computeLength()).reduce((a, b) => a + b, 0);
1038
+ return super.computeEncapsulationOverhead() + 2 + import_core.SECURITY_S2_AUTH_TAG_LENGTH + extensionBytes;
1039
+ }
1040
+ toLogEntry(ctx) {
1041
+ const message = {
1042
+ "sequence number": this.sequenceNumber ?? "(not set)"
1043
+ };
1044
+ if (this.extensions.length > 0) {
1045
+ message.extensions = this.extensions.map((e) => e.toLogEntry()).join("");
1046
+ }
1047
+ if (process.env.NODE_ENV === "test" || process.env.NODE_ENV === "development") {
1048
+ if (this.key) {
1049
+ message.key = (0, import_safe3.buffer2hex)(this.key);
1050
+ }
1051
+ if (this.iv) {
1052
+ message.IV = (0, import_safe3.buffer2hex)(this.iv);
1053
+ }
1054
+ if (this.ciphertext) {
1055
+ message.ciphertext = (0, import_safe3.buffer2hex)(this.ciphertext);
1056
+ } else if (this.plaintext) {
1057
+ message.plaintext = (0, import_safe3.buffer2hex)(this.plaintext);
1058
+ }
1059
+ if (this.authData) {
1060
+ message["auth data"] = (0, import_safe3.buffer2hex)(this.authData);
1061
+ }
1062
+ if (this.authTag) {
1063
+ message["auth tag"] = (0, import_safe3.buffer2hex)(this.authTag);
1064
+ }
1065
+ }
1066
+ if (this.securityClass != void 0) {
1067
+ message["security class"] = (0, import_safe3.getEnumMemberName)(import_core.SecurityClass, this.securityClass);
1068
+ }
1069
+ return {
1070
+ ...super.toLogEntry(ctx),
1071
+ message
1072
+ };
1073
+ }
1074
+ };
1075
+ Security2CCMessageEncapsulation = Security2CCMessageEncapsulation_1 = __decorate([
1076
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.MessageEncapsulation),
1077
+ (0, import_CommandClassDecorators.expectedCCResponse)(getCCResponseForMessageEncapsulation, testCCResponseForMessageEncapsulation)
1078
+ ], Security2CCMessageEncapsulation);
1079
+ let Security2CCNonceReport = Security2CCNonceReport_1 = class Security2CCNonceReport2 extends Security2CC {
1080
+ constructor(options) {
1081
+ super(options);
1082
+ this.SOS = options.SOS;
1083
+ this.MOS = options.MOS;
1084
+ this.sequenceNumber = options.sequenceNumber;
1085
+ if (options.SOS)
1086
+ this.receiverEI = options.receiverEI;
1087
+ }
1088
+ static from(raw, ctx) {
1089
+ const securityManager = assertSecurityRX(ctx);
1090
+ (0, import_core.validatePayload)(raw.payload.length >= 2);
1091
+ const sequenceNumber = raw.payload[0];
1092
+ validateSequenceNumber(securityManager, ctx.sourceNodeId, sequenceNumber);
1093
+ const MOS = !!(raw.payload[1] & 2);
1094
+ const SOS = !!(raw.payload[1] & 1);
1095
+ if (SOS) {
1096
+ (0, import_core.validatePayload)(raw.payload.length >= 18);
1097
+ const receiverEI = raw.payload.subarray(2, 18);
1098
+ securityManager.storeRemoteEI(ctx.sourceNodeId, receiverEI);
1099
+ return new Security2CCNonceReport_1({
1100
+ nodeId: ctx.sourceNodeId,
1101
+ sequenceNumber,
1102
+ MOS,
1103
+ SOS,
1104
+ receiverEI
1105
+ });
1106
+ } else if (MOS) {
1107
+ return new Security2CCNonceReport_1({
1108
+ nodeId: ctx.sourceNodeId,
1109
+ sequenceNumber,
1110
+ MOS,
1111
+ SOS: false
1112
+ });
1113
+ } else {
1114
+ import_core.validatePayload.fail("Either MOS or SOS must be set");
1115
+ }
1116
+ }
1117
+ sequenceNumber;
1118
+ ensureSequenceNumber(securityManager) {
1119
+ if (this.sequenceNumber == void 0) {
1120
+ this.sequenceNumber = securityManager.nextSequenceNumber(this.nodeId);
1121
+ }
1122
+ }
1123
+ SOS;
1124
+ MOS;
1125
+ receiverEI;
1126
+ serialize(ctx) {
1127
+ const securityManager = assertSecurityTX(ctx, this.nodeId);
1128
+ this.ensureSequenceNumber(securityManager);
1129
+ this.payload = import_safe2.Bytes.from([
1130
+ this.sequenceNumber,
1131
+ (this.MOS ? 2 : 0) + (this.SOS ? 1 : 0)
1132
+ ]);
1133
+ if (this.SOS) {
1134
+ this.payload = import_safe2.Bytes.concat([this.payload, this.receiverEI]);
1135
+ }
1136
+ return super.serialize(ctx);
1137
+ }
1138
+ toLogEntry(ctx) {
1139
+ const message = {
1140
+ "sequence number": this.sequenceNumber ?? "(not set)",
1141
+ SOS: this.SOS,
1142
+ MOS: this.MOS
1143
+ };
1144
+ if (this.receiverEI) {
1145
+ message["receiver entropy"] = (0, import_safe3.buffer2hex)(this.receiverEI);
1146
+ }
1147
+ return {
1148
+ ...super.toLogEntry(ctx),
1149
+ message
1150
+ };
1151
+ }
1152
+ };
1153
+ Security2CCNonceReport = Security2CCNonceReport_1 = __decorate([
1154
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.NonceReport)
1155
+ ], Security2CCNonceReport);
1156
+ let Security2CCNonceGet = Security2CCNonceGet_1 = class Security2CCNonceGet2 extends Security2CC {
1157
+ // TODO: A node sending this command MUST accept a delay up to <Previous Round-trip-time to peer node> +
1158
+ // 250 ms before receiving the Security 2 Nonce Report Command.
1159
+ constructor(options) {
1160
+ super(options);
1161
+ this.sequenceNumber = options.sequenceNumber;
1162
+ }
1163
+ static from(raw, ctx) {
1164
+ const securityManager = assertSecurityRX(ctx);
1165
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
1166
+ const sequenceNumber = raw.payload[0];
1167
+ validateSequenceNumber(securityManager, ctx.sourceNodeId, sequenceNumber);
1168
+ return new Security2CCNonceGet_1({
1169
+ nodeId: ctx.sourceNodeId,
1170
+ sequenceNumber
1171
+ });
1172
+ }
1173
+ sequenceNumber;
1174
+ ensureSequenceNumber(securityManager) {
1175
+ if (this.sequenceNumber == void 0) {
1176
+ this.sequenceNumber = securityManager.nextSequenceNumber(this.nodeId);
1177
+ }
1178
+ }
1179
+ serialize(ctx) {
1180
+ const securityManager = assertSecurityTX(ctx, this.nodeId);
1181
+ this.ensureSequenceNumber(securityManager);
1182
+ this.payload = import_safe2.Bytes.from([this.sequenceNumber]);
1183
+ return super.serialize(ctx);
1184
+ }
1185
+ toLogEntry(ctx) {
1186
+ return {
1187
+ ...super.toLogEntry(ctx),
1188
+ message: {
1189
+ "sequence number": this.sequenceNumber ?? "(not set)"
1190
+ }
1191
+ };
1192
+ }
1193
+ };
1194
+ Security2CCNonceGet = Security2CCNonceGet_1 = __decorate([
1195
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.NonceGet),
1196
+ (0, import_CommandClassDecorators.expectedCCResponse)(Security2CCNonceReport)
1197
+ ], Security2CCNonceGet);
1198
+ let Security2CCKEXReport = Security2CCKEXReport_1 = class Security2CCKEXReport2 extends Security2CC {
1199
+ constructor(options) {
1200
+ super(options);
1201
+ this.requestCSA = options.requestCSA;
1202
+ this.echo = options.echo;
1203
+ this._reserved = options._reserved ?? 0;
1204
+ this.supportedKEXSchemes = options.supportedKEXSchemes;
1205
+ this.supportedECDHProfiles = options.supportedECDHProfiles;
1206
+ this.requestedKeys = options.requestedKeys;
1207
+ }
1208
+ static from(raw, ctx) {
1209
+ (0, import_core.validatePayload)(raw.payload.length >= 4);
1210
+ const requestCSA = !!(raw.payload[0] & 2);
1211
+ const echo = !!(raw.payload[0] & 1);
1212
+ const _reserved = raw.payload[0] & 252;
1213
+ const supportedKEXSchemes = (0, import_core.parseBitMask)(raw.payload.subarray(1, 2), 0).filter((s) => s !== 0);
1214
+ const supportedECDHProfiles = (0, import_core.parseBitMask)(raw.payload.subarray(2, 3), import_shared.ECDHProfiles.Curve25519);
1215
+ const requestedKeys = (0, import_core.parseBitMask)(raw.payload.subarray(3, 4), import_core.SecurityClass.S2_Unauthenticated);
1216
+ return new Security2CCKEXReport_1({
1217
+ nodeId: ctx.sourceNodeId,
1218
+ requestCSA,
1219
+ echo,
1220
+ _reserved,
1221
+ supportedKEXSchemes,
1222
+ supportedECDHProfiles,
1223
+ requestedKeys
1224
+ });
1225
+ }
1226
+ _reserved;
1227
+ requestCSA;
1228
+ echo;
1229
+ supportedKEXSchemes;
1230
+ supportedECDHProfiles;
1231
+ requestedKeys;
1232
+ serialize(ctx) {
1233
+ this.payload = import_safe2.Bytes.concat([
1234
+ import_safe2.Bytes.from([
1235
+ this._reserved + (this.requestCSA ? 2 : 0) + (this.echo ? 1 : 0)
1236
+ ]),
1237
+ // The bit mask starts at 0, but bit 0 is not used
1238
+ (0, import_core.encodeBitMask)(this.supportedKEXSchemes, 7, 0),
1239
+ (0, import_core.encodeBitMask)(this.supportedECDHProfiles, 7, import_shared.ECDHProfiles.Curve25519),
1240
+ (0, import_core.encodeBitMask)(this.requestedKeys, import_core.SecurityClass.S0_Legacy, import_core.SecurityClass.S2_Unauthenticated)
1241
+ ]);
1242
+ return super.serialize(ctx);
1243
+ }
1244
+ toLogEntry(ctx) {
1245
+ return {
1246
+ ...super.toLogEntry(ctx),
1247
+ message: {
1248
+ echo: this.echo,
1249
+ "supported schemes": this.supportedKEXSchemes.map((s) => `
1250
+ \xB7 ${(0, import_safe3.getEnumMemberName)(import_shared.KEXSchemes, s)}`).join(""),
1251
+ "supported ECDH profiles": this.supportedECDHProfiles.map((s) => `
1252
+ \xB7 ${(0, import_safe3.getEnumMemberName)(import_shared.ECDHProfiles, s)}`).join(""),
1253
+ "CSA requested": this.requestCSA,
1254
+ "requested security classes": this.requestedKeys.map((s) => `
1255
+ \xB7 ${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, s)}`).join("")
1256
+ }
1257
+ };
1258
+ }
1259
+ };
1260
+ Security2CCKEXReport = Security2CCKEXReport_1 = __decorate([
1261
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.KEXReport)
1262
+ ], Security2CCKEXReport);
1263
+ let Security2CCKEXGet = class Security2CCKEXGet2 extends Security2CC {
1264
+ };
1265
+ Security2CCKEXGet = __decorate([
1266
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.KEXGet),
1267
+ (0, import_CommandClassDecorators.expectedCCResponse)(Security2CCKEXReport)
1268
+ ], Security2CCKEXGet);
1269
+ function getExpectedResponseForKEXSet(sent) {
1270
+ if (sent.echo) {
1271
+ return [Security2CCKEXReport, Security2CCKEXFail];
1272
+ } else {
1273
+ return void 0;
1274
+ }
1275
+ }
1276
+ function testExpectedResponseForKEXSet(sent, received) {
1277
+ if (sent.echo) {
1278
+ if (received instanceof Security2CCKEXReport) {
1279
+ return received.echo;
1280
+ } else if (received instanceof Security2CCKEXFail) {
1281
+ return true;
1282
+ }
1283
+ }
1284
+ return false;
1285
+ }
1286
+ let Security2CCKEXSet = Security2CCKEXSet_1 = class Security2CCKEXSet2 extends Security2CC {
1287
+ constructor(options) {
1288
+ super(options);
1289
+ this.permitCSA = options.permitCSA;
1290
+ this.echo = options.echo;
1291
+ this._reserved = options._reserved ?? 0;
1292
+ this.selectedKEXScheme = options.selectedKEXScheme;
1293
+ this.selectedECDHProfile = options.selectedECDHProfile;
1294
+ this.grantedKeys = options.grantedKeys;
1295
+ }
1296
+ static from(raw, ctx) {
1297
+ (0, import_core.validatePayload)(raw.payload.length >= 4);
1298
+ const _reserved = raw.payload[0] & 252;
1299
+ const permitCSA = !!(raw.payload[0] & 2);
1300
+ const echo = !!(raw.payload[0] & 1);
1301
+ const selectedKEXSchemes = (0, import_core.parseBitMask)(raw.payload.subarray(1, 2), 0).filter((s) => s !== 0);
1302
+ (0, import_core.validatePayload)(selectedKEXSchemes.length === 1);
1303
+ const selectedKEXScheme = selectedKEXSchemes[0];
1304
+ const selectedECDHProfiles = (0, import_core.parseBitMask)(raw.payload.subarray(2, 3), import_shared.ECDHProfiles.Curve25519);
1305
+ (0, import_core.validatePayload)(selectedECDHProfiles.length === 1);
1306
+ const selectedECDHProfile = selectedECDHProfiles[0];
1307
+ const grantedKeys = (0, import_core.parseBitMask)(raw.payload.subarray(3, 4), import_core.SecurityClass.S2_Unauthenticated);
1308
+ return new Security2CCKEXSet_1({
1309
+ nodeId: ctx.sourceNodeId,
1310
+ _reserved,
1311
+ permitCSA,
1312
+ echo,
1313
+ selectedKEXScheme,
1314
+ selectedECDHProfile,
1315
+ grantedKeys
1316
+ });
1317
+ }
1318
+ _reserved;
1319
+ permitCSA;
1320
+ echo;
1321
+ selectedKEXScheme;
1322
+ selectedECDHProfile;
1323
+ grantedKeys;
1324
+ serialize(ctx) {
1325
+ this.payload = import_safe2.Bytes.concat([
1326
+ import_safe2.Bytes.from([
1327
+ this._reserved + (this.permitCSA ? 2 : 0) + (this.echo ? 1 : 0)
1328
+ ]),
1329
+ // The bit mask starts at 0, but bit 0 is not used
1330
+ (0, import_core.encodeBitMask)([this.selectedKEXScheme], 7, 0),
1331
+ (0, import_core.encodeBitMask)([this.selectedECDHProfile], 7, import_shared.ECDHProfiles.Curve25519),
1332
+ (0, import_core.encodeBitMask)(this.grantedKeys, import_core.SecurityClass.S0_Legacy, import_core.SecurityClass.S2_Unauthenticated)
1333
+ ]);
1334
+ return super.serialize(ctx);
1335
+ }
1336
+ toLogEntry(ctx) {
1337
+ return {
1338
+ ...super.toLogEntry(ctx),
1339
+ message: {
1340
+ echo: this.echo,
1341
+ "selected scheme": (0, import_safe3.getEnumMemberName)(import_shared.KEXSchemes, this.selectedKEXScheme),
1342
+ "selected ECDH profile": (0, import_safe3.getEnumMemberName)(import_shared.ECDHProfiles, this.selectedECDHProfile),
1343
+ "CSA permitted": this.permitCSA,
1344
+ "granted security classes": this.grantedKeys.map((s) => `
1345
+ \xB7 ${(0, import_safe3.getEnumMemberName)(import_core.SecurityClass, s)}`).join("")
1346
+ }
1347
+ };
1348
+ }
1349
+ };
1350
+ Security2CCKEXSet = Security2CCKEXSet_1 = __decorate([
1351
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.KEXSet),
1352
+ (0, import_CommandClassDecorators.expectedCCResponse)(getExpectedResponseForKEXSet, testExpectedResponseForKEXSet)
1353
+ ], Security2CCKEXSet);
1354
+ let Security2CCKEXFail = Security2CCKEXFail_1 = class Security2CCKEXFail2 extends Security2CC {
1355
+ constructor(options) {
1356
+ super(options);
1357
+ this.failType = options.failType;
1358
+ }
1359
+ static from(raw, ctx) {
1360
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
1361
+ const failType = raw.payload[0];
1362
+ return new Security2CCKEXFail_1({
1363
+ nodeId: ctx.sourceNodeId,
1364
+ failType
1365
+ });
1366
+ }
1367
+ failType;
1368
+ serialize(ctx) {
1369
+ this.payload = import_safe2.Bytes.from([this.failType]);
1370
+ return super.serialize(ctx);
1371
+ }
1372
+ toLogEntry(ctx) {
1373
+ return {
1374
+ ...super.toLogEntry(ctx),
1375
+ message: { reason: (0, import_safe3.getEnumMemberName)(import_shared.KEXFailType, this.failType) }
1376
+ };
1377
+ }
1378
+ };
1379
+ Security2CCKEXFail = Security2CCKEXFail_1 = __decorate([
1380
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.KEXFail)
1381
+ ], Security2CCKEXFail);
1382
+ let Security2CCPublicKeyReport = Security2CCPublicKeyReport_1 = class Security2CCPublicKeyReport2 extends Security2CC {
1383
+ constructor(options) {
1384
+ super(options);
1385
+ this.includingNode = options.includingNode;
1386
+ this.publicKey = options.publicKey;
1387
+ }
1388
+ static from(raw, ctx) {
1389
+ (0, import_core.validatePayload)(raw.payload.length >= 17);
1390
+ const includingNode = !!(raw.payload[0] & 1);
1391
+ const publicKey = raw.payload.subarray(1);
1392
+ return new Security2CCPublicKeyReport_1({
1393
+ nodeId: ctx.sourceNodeId,
1394
+ includingNode,
1395
+ publicKey
1396
+ });
1397
+ }
1398
+ includingNode;
1399
+ publicKey;
1400
+ serialize(ctx) {
1401
+ this.payload = import_safe2.Bytes.concat([
1402
+ import_safe2.Bytes.from([this.includingNode ? 1 : 0]),
1403
+ this.publicKey
1404
+ ]);
1405
+ return super.serialize(ctx);
1406
+ }
1407
+ toLogEntry(ctx) {
1408
+ return {
1409
+ ...super.toLogEntry(ctx),
1410
+ message: {
1411
+ "is including node": this.includingNode,
1412
+ "public key": (0, import_safe3.buffer2hex)(this.publicKey)
1413
+ }
1414
+ };
1415
+ }
1416
+ };
1417
+ Security2CCPublicKeyReport = Security2CCPublicKeyReport_1 = __decorate([
1418
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.PublicKeyReport)
1419
+ ], Security2CCPublicKeyReport);
1420
+ let Security2CCNetworkKeyReport = Security2CCNetworkKeyReport_1 = class Security2CCNetworkKeyReport2 extends Security2CC {
1421
+ constructor(options) {
1422
+ super(options);
1423
+ this.grantedKey = options.grantedKey;
1424
+ this.networkKey = options.networkKey;
1425
+ }
1426
+ static from(raw, ctx) {
1427
+ (0, import_core.validatePayload)(raw.payload.length >= 17);
1428
+ const grantedKey = bitMaskToSecurityClass(raw.payload, 0);
1429
+ const networkKey = raw.payload.subarray(1, 17);
1430
+ return new Security2CCNetworkKeyReport_1({
1431
+ nodeId: ctx.sourceNodeId,
1432
+ grantedKey,
1433
+ networkKey
1434
+ });
1435
+ }
1436
+ grantedKey;
1437
+ networkKey;
1438
+ serialize(ctx) {
1439
+ this.payload = import_safe2.Bytes.concat([
1440
+ securityClassToBitMask(this.grantedKey),
1441
+ this.networkKey
1442
+ ]);
1443
+ return super.serialize(ctx);
1444
+ }
1445
+ toLogEntry(ctx) {
1446
+ return {
1447
+ ...super.toLogEntry(ctx),
1448
+ message: {
1449
+ "security class": (0, import_safe3.getEnumMemberName)(import_core.SecurityClass, this.grantedKey)
1450
+ // This shouldn't be logged, so users can safely post their logs online
1451
+ // "network key": buffer2hex(this.networkKey),
1452
+ }
1453
+ };
1454
+ }
1455
+ };
1456
+ Security2CCNetworkKeyReport = Security2CCNetworkKeyReport_1 = __decorate([
1457
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.NetworkKeyReport)
1458
+ ], Security2CCNetworkKeyReport);
1459
+ let Security2CCNetworkKeyGet = Security2CCNetworkKeyGet_1 = class Security2CCNetworkKeyGet2 extends Security2CC {
1460
+ constructor(options) {
1461
+ super(options);
1462
+ this.requestedKey = options.requestedKey;
1463
+ }
1464
+ static from(raw, ctx) {
1465
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
1466
+ const requestedKey = bitMaskToSecurityClass(raw.payload, 0);
1467
+ return new Security2CCNetworkKeyGet_1({
1468
+ nodeId: ctx.sourceNodeId,
1469
+ requestedKey
1470
+ });
1471
+ }
1472
+ requestedKey;
1473
+ serialize(ctx) {
1474
+ this.payload = securityClassToBitMask(this.requestedKey);
1475
+ return super.serialize(ctx);
1476
+ }
1477
+ toLogEntry(ctx) {
1478
+ return {
1479
+ ...super.toLogEntry(ctx),
1480
+ message: {
1481
+ "security class": (0, import_safe3.getEnumMemberName)(import_core.SecurityClass, this.requestedKey)
1482
+ }
1483
+ };
1484
+ }
1485
+ };
1486
+ Security2CCNetworkKeyGet = Security2CCNetworkKeyGet_1 = __decorate([
1487
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.NetworkKeyGet)
1488
+ // Don't expect a response - we need to distinguish between Report and Fail
1489
+ // FIXME: maybe use the dynamic @expectedCCResponse instead?
1490
+ ], Security2CCNetworkKeyGet);
1491
+ let Security2CCNetworkKeyVerify = class Security2CCNetworkKeyVerify2 extends Security2CC {
1492
+ };
1493
+ Security2CCNetworkKeyVerify = __decorate([
1494
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.NetworkKeyVerify)
1495
+ ], Security2CCNetworkKeyVerify);
1496
+ let Security2CCTransferEnd = Security2CCTransferEnd_1 = class Security2CCTransferEnd2 extends Security2CC {
1497
+ constructor(options) {
1498
+ super(options);
1499
+ this.keyVerified = options.keyVerified;
1500
+ this.keyRequestComplete = options.keyRequestComplete;
1501
+ }
1502
+ static from(raw, ctx) {
1503
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
1504
+ const keyVerified = !!(raw.payload[0] & 2);
1505
+ const keyRequestComplete = !!(raw.payload[0] & 1);
1506
+ return new Security2CCTransferEnd_1({
1507
+ nodeId: ctx.sourceNodeId,
1508
+ keyVerified,
1509
+ keyRequestComplete
1510
+ });
1511
+ }
1512
+ keyVerified;
1513
+ keyRequestComplete;
1514
+ serialize(ctx) {
1515
+ this.payload = import_safe2.Bytes.from([
1516
+ (this.keyVerified ? 2 : 0) + (this.keyRequestComplete ? 1 : 0)
1517
+ ]);
1518
+ return super.serialize(ctx);
1519
+ }
1520
+ toLogEntry(ctx) {
1521
+ return {
1522
+ ...super.toLogEntry(ctx),
1523
+ message: {
1524
+ "key verified": this.keyVerified,
1525
+ "request complete": this.keyRequestComplete
1526
+ }
1527
+ };
1528
+ }
1529
+ };
1530
+ Security2CCTransferEnd = Security2CCTransferEnd_1 = __decorate([
1531
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.TransferEnd)
1532
+ ], Security2CCTransferEnd);
1533
+ let Security2CCCommandsSupportedReport = Security2CCCommandsSupportedReport_1 = class Security2CCCommandsSupportedReport2 extends Security2CC {
1534
+ constructor(options) {
1535
+ super(options);
1536
+ this.supportedCCs = options.supportedCCs;
1537
+ }
1538
+ static from(raw, ctx) {
1539
+ const CCs = (0, import_core.parseCCList)(raw.payload);
1540
+ const supportedCCs = CCs.supportedCCs;
1541
+ return new Security2CCCommandsSupportedReport_1({
1542
+ nodeId: ctx.sourceNodeId,
1543
+ supportedCCs
1544
+ });
1545
+ }
1546
+ supportedCCs;
1547
+ serialize(ctx) {
1548
+ this.payload = (0, import_safe.encodeCCList)(this.supportedCCs, []);
1549
+ return super.serialize(ctx);
1550
+ }
1551
+ toLogEntry(ctx) {
1552
+ return {
1553
+ ...super.toLogEntry(ctx),
1554
+ message: {
1555
+ "supported CCs": this.supportedCCs.map((cc) => (0, import_core.getCCName)(cc)).map((cc) => `
1556
+ \xB7 ${cc}`).join("")
1557
+ }
1558
+ };
1559
+ }
1560
+ };
1561
+ Security2CCCommandsSupportedReport = Security2CCCommandsSupportedReport_1 = __decorate([
1562
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.CommandsSupportedReport)
1563
+ ], Security2CCCommandsSupportedReport);
1564
+ let Security2CCCommandsSupportedGet = class Security2CCCommandsSupportedGet2 extends Security2CC {
1565
+ };
1566
+ Security2CCCommandsSupportedGet = __decorate([
1567
+ (0, import_CommandClassDecorators.CCCommand)(import_Types.Security2Command.CommandsSupportedGet),
1568
+ (0, import_CommandClassDecorators.expectedCCResponse)(Security2CCCommandsSupportedReport)
1569
+ ], Security2CCCommandsSupportedGet);
1570
+ // Annotate the CommonJS export names for ESM import in node:
1571
+ 0 && (module.exports = {
1572
+ Security2CC,
1573
+ Security2CCAPI,
1574
+ Security2CCCommandsSupportedGet,
1575
+ Security2CCCommandsSupportedReport,
1576
+ Security2CCKEXFail,
1577
+ Security2CCKEXGet,
1578
+ Security2CCKEXReport,
1579
+ Security2CCKEXSet,
1580
+ Security2CCMessageEncapsulation,
1581
+ Security2CCNetworkKeyGet,
1582
+ Security2CCNetworkKeyReport,
1583
+ Security2CCNetworkKeyVerify,
1584
+ Security2CCNonceGet,
1585
+ Security2CCNonceReport,
1586
+ Security2CCPublicKeyReport,
1587
+ Security2CCTransferEnd
1588
+ });
1589
+ //# sourceMappingURL=Security2CC.js.map