@matter/protocol 0.16.0-alpha.0-20251217-038f88085 → 0.16.0-alpha.0-20251221-21acf226d

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 (472) hide show
  1. package/dist/cjs/action/client/ClientBdx.d.ts +17 -0
  2. package/dist/cjs/action/client/ClientBdx.d.ts.map +1 -0
  3. package/dist/cjs/action/client/ClientBdx.js +22 -0
  4. package/dist/cjs/action/client/ClientBdx.js.map +6 -0
  5. package/dist/cjs/action/client/ClientInteraction.d.ts +10 -1
  6. package/dist/cjs/action/client/ClientInteraction.d.ts.map +1 -1
  7. package/dist/cjs/action/client/ClientInteraction.js +25 -2
  8. package/dist/cjs/action/client/ClientInteraction.js.map +1 -1
  9. package/dist/cjs/action/client/QueuedClientInteraction.d.ts +11 -3
  10. package/dist/cjs/action/client/QueuedClientInteraction.d.ts.map +1 -1
  11. package/dist/cjs/action/client/QueuedClientInteraction.js +6 -2
  12. package/dist/cjs/action/client/QueuedClientInteraction.js.map +1 -1
  13. package/dist/cjs/action/client/index.d.ts +1 -0
  14. package/dist/cjs/action/client/index.d.ts.map +1 -1
  15. package/dist/cjs/action/client/index.js +1 -0
  16. package/dist/cjs/action/client/index.js.map +1 -1
  17. package/dist/cjs/action/request/Read.d.ts.map +1 -1
  18. package/dist/cjs/action/request/Read.js +2 -2
  19. package/dist/cjs/action/request/Read.js.map +1 -1
  20. package/dist/cjs/action/request/Write.js +4 -3
  21. package/dist/cjs/action/request/Write.js.map +1 -1
  22. package/dist/cjs/advertisement/ble/BleAdvertisement.d.ts +1 -1
  23. package/dist/cjs/advertisement/ble/BleAdvertisement.d.ts.map +1 -1
  24. package/dist/cjs/advertisement/ble/BleAdvertisement.js +2 -2
  25. package/dist/cjs/advertisement/ble/BleAdvertisement.js.map +1 -1
  26. package/dist/cjs/advertisement/mdns/CommissionableMdnsAdvertisement.d.ts +1 -1
  27. package/dist/cjs/advertisement/mdns/CommissionableMdnsAdvertisement.js +1 -1
  28. package/dist/cjs/advertisement/mdns/CommissionableMdnsAdvertisement.js.map +1 -1
  29. package/dist/cjs/advertisement/mdns/OperationalMdnsAdvertisement.d.ts.map +1 -1
  30. package/dist/cjs/advertisement/mdns/OperationalMdnsAdvertisement.js +3 -5
  31. package/dist/cjs/advertisement/mdns/OperationalMdnsAdvertisement.js.map +1 -1
  32. package/dist/cjs/bdx/BdxClient.d.ts +2 -0
  33. package/dist/cjs/bdx/BdxClient.d.ts.map +1 -1
  34. package/dist/cjs/bdx/BdxClient.js +6 -0
  35. package/dist/cjs/bdx/BdxClient.js.map +1 -1
  36. package/dist/cjs/bdx/BdxError.d.ts +2 -0
  37. package/dist/cjs/bdx/BdxError.d.ts.map +1 -1
  38. package/dist/cjs/bdx/BdxError.js +2 -0
  39. package/dist/cjs/bdx/BdxError.js.map +1 -1
  40. package/dist/cjs/bdx/BdxMessenger.d.ts +5 -1
  41. package/dist/cjs/bdx/BdxMessenger.d.ts.map +1 -1
  42. package/dist/cjs/bdx/BdxMessenger.js +12 -4
  43. package/dist/cjs/bdx/BdxMessenger.js.map +1 -1
  44. package/dist/cjs/bdx/BdxProtocol.d.ts +14 -7
  45. package/dist/cjs/bdx/BdxProtocol.d.ts.map +1 -1
  46. package/dist/cjs/bdx/BdxProtocol.js +81 -19
  47. package/dist/cjs/bdx/BdxProtocol.js.map +1 -1
  48. package/dist/cjs/bdx/BdxSession.d.ts +10 -3
  49. package/dist/cjs/bdx/BdxSession.d.ts.map +1 -1
  50. package/dist/cjs/bdx/BdxSession.js +33 -8
  51. package/dist/cjs/bdx/BdxSession.js.map +1 -1
  52. package/dist/cjs/bdx/BdxSessionConfiguration.d.ts +16 -1
  53. package/dist/cjs/bdx/BdxSessionConfiguration.d.ts.map +1 -1
  54. package/dist/cjs/bdx/BdxSessionConfiguration.js +6 -1
  55. package/dist/cjs/bdx/BdxSessionConfiguration.js.map +1 -1
  56. package/dist/cjs/bdx/FileDesignator.d.ts +15 -1
  57. package/dist/cjs/bdx/FileDesignator.d.ts.map +1 -1
  58. package/dist/cjs/bdx/FileDesignator.js +28 -2
  59. package/dist/cjs/bdx/FileDesignator.js.map +1 -1
  60. package/dist/cjs/bdx/PersistedFileDesignator.d.ts +10 -2
  61. package/dist/cjs/bdx/PersistedFileDesignator.d.ts.map +1 -1
  62. package/dist/cjs/bdx/PersistedFileDesignator.js +23 -5
  63. package/dist/cjs/bdx/PersistedFileDesignator.js.map +1 -1
  64. package/dist/cjs/bdx/ScopedStorage.d.ts +18 -0
  65. package/dist/cjs/bdx/ScopedStorage.d.ts.map +1 -0
  66. package/dist/cjs/bdx/ScopedStorage.js +36 -0
  67. package/dist/cjs/bdx/ScopedStorage.js.map +6 -0
  68. package/dist/cjs/bdx/bdx-session-initiator.d.ts.map +1 -1
  69. package/dist/cjs/bdx/bdx-session-initiator.js +10 -2
  70. package/dist/cjs/bdx/bdx-session-initiator.js.map +1 -1
  71. package/dist/cjs/bdx/flow/DrivenSendingFlow.d.ts.map +1 -1
  72. package/dist/cjs/bdx/flow/DrivenSendingFlow.js +2 -0
  73. package/dist/cjs/bdx/flow/DrivenSendingFlow.js.map +1 -1
  74. package/dist/cjs/bdx/flow/DrivingReceivingFlow.d.ts.map +1 -1
  75. package/dist/cjs/bdx/flow/DrivingReceivingFlow.js +1 -0
  76. package/dist/cjs/bdx/flow/DrivingReceivingFlow.js.map +1 -1
  77. package/dist/cjs/bdx/flow/Flow.d.ts +7 -0
  78. package/dist/cjs/bdx/flow/Flow.d.ts.map +1 -1
  79. package/dist/cjs/bdx/flow/Flow.js +22 -1
  80. package/dist/cjs/bdx/flow/Flow.js.map +1 -1
  81. package/dist/cjs/bdx/flow/FollowingReceivingFlow.d.ts.map +1 -1
  82. package/dist/cjs/bdx/flow/FollowingReceivingFlow.js +3 -0
  83. package/dist/cjs/bdx/flow/FollowingReceivingFlow.js.map +1 -1
  84. package/dist/cjs/bdx/flow/FollowingSendingFlow.d.ts.map +1 -1
  85. package/dist/cjs/bdx/flow/FollowingSendingFlow.js +1 -0
  86. package/dist/cjs/bdx/flow/FollowingSendingFlow.js.map +1 -1
  87. package/dist/cjs/bdx/flow/OutboundFlow.d.ts.map +1 -1
  88. package/dist/cjs/bdx/flow/OutboundFlow.js +1 -0
  89. package/dist/cjs/bdx/flow/OutboundFlow.js.map +1 -1
  90. package/dist/cjs/bdx/index.d.ts +1 -0
  91. package/dist/cjs/bdx/index.d.ts.map +1 -1
  92. package/dist/cjs/bdx/index.js +1 -0
  93. package/dist/cjs/bdx/index.js.map +1 -1
  94. package/dist/cjs/certificate/kinds/Icac.d.ts.map +1 -1
  95. package/dist/cjs/certificate/kinds/Icac.js +1 -7
  96. package/dist/cjs/certificate/kinds/Icac.js.map +1 -1
  97. package/dist/cjs/certificate/kinds/Rcac.d.ts +1 -0
  98. package/dist/cjs/certificate/kinds/Rcac.d.ts.map +1 -1
  99. package/dist/cjs/certificate/kinds/Rcac.js +3 -0
  100. package/dist/cjs/certificate/kinds/Rcac.js.map +1 -1
  101. package/dist/cjs/certificate/kinds/definitions/operational.d.ts +1 -1
  102. package/dist/cjs/certificate/kinds/definitions/operational.js +1 -1
  103. package/dist/cjs/certificate/kinds/definitions/operational.js.map +1 -1
  104. package/dist/cjs/common/FailsafeContext.js +2 -2
  105. package/dist/cjs/common/FailsafeContext.js.map +1 -1
  106. package/dist/cjs/dcl/DclClient.d.ts.map +1 -1
  107. package/dist/cjs/dcl/DclClient.js +1 -2
  108. package/dist/cjs/dcl/DclClient.js.map +1 -1
  109. package/dist/cjs/dcl/DclOtaUpdateService.d.ts +30 -31
  110. package/dist/cjs/dcl/DclOtaUpdateService.d.ts.map +1 -1
  111. package/dist/cjs/dcl/DclOtaUpdateService.js +191 -92
  112. package/dist/cjs/dcl/DclOtaUpdateService.js.map +2 -2
  113. package/dist/cjs/dcl/index.d.ts +0 -3
  114. package/dist/cjs/dcl/index.d.ts.map +1 -1
  115. package/dist/cjs/dcl/index.js +0 -3
  116. package/dist/cjs/dcl/index.js.map +1 -1
  117. package/dist/cjs/fabric/Fabric.d.ts +53 -9
  118. package/dist/cjs/fabric/Fabric.d.ts.map +1 -1
  119. package/dist/cjs/fabric/Fabric.js +59 -32
  120. package/dist/cjs/fabric/Fabric.js.map +1 -1
  121. package/dist/cjs/fabric/FabricAuthority.js +1 -1
  122. package/dist/cjs/fabric/FabricAuthority.js.map +1 -1
  123. package/dist/cjs/fabric/FabricManager.d.ts +14 -5
  124. package/dist/cjs/fabric/FabricManager.d.ts.map +1 -1
  125. package/dist/cjs/fabric/FabricManager.js +63 -42
  126. package/dist/cjs/fabric/FabricManager.js.map +1 -1
  127. package/dist/cjs/groups/FabricGroups.d.ts.map +1 -1
  128. package/dist/cjs/groups/FabricGroups.js +4 -8
  129. package/dist/cjs/groups/FabricGroups.js.map +1 -1
  130. package/dist/cjs/index.d.ts +1 -0
  131. package/dist/cjs/index.d.ts.map +1 -1
  132. package/dist/cjs/index.js +1 -0
  133. package/dist/cjs/index.js.map +1 -1
  134. package/dist/cjs/interaction/InteractionMessenger.d.ts +1 -106
  135. package/dist/cjs/interaction/InteractionMessenger.d.ts.map +1 -1
  136. package/dist/cjs/interaction/InteractionMessenger.js +2 -143
  137. package/dist/cjs/interaction/InteractionMessenger.js.map +2 -2
  138. package/dist/cjs/interaction/index.d.ts +0 -1
  139. package/dist/cjs/interaction/index.d.ts.map +1 -1
  140. package/dist/cjs/interaction/index.js +0 -1
  141. package/dist/cjs/interaction/index.js.map +1 -1
  142. package/dist/cjs/mdns/MdnsClient.d.ts +4 -4
  143. package/dist/cjs/mdns/MdnsClient.d.ts.map +1 -1
  144. package/dist/cjs/mdns/MdnsClient.js +12 -15
  145. package/dist/cjs/mdns/MdnsClient.js.map +1 -1
  146. package/dist/cjs/mdns/MdnsConsts.d.ts +3 -3
  147. package/dist/cjs/mdns/MdnsConsts.d.ts.map +1 -1
  148. package/dist/cjs/mdns/MdnsConsts.js +3 -2
  149. package/dist/cjs/mdns/MdnsConsts.js.map +1 -1
  150. package/dist/{esm/dcl → cjs/ota}/OtaImageHeader.d.ts.map +1 -1
  151. package/dist/cjs/{dcl → ota}/OtaImageHeader.js.map +1 -1
  152. package/dist/cjs/{dcl → ota}/OtaImageReader.d.ts.map +1 -1
  153. package/dist/cjs/{dcl → ota}/OtaImageReader.js +0 -2
  154. package/dist/cjs/ota/OtaImageReader.js.map +6 -0
  155. package/dist/{esm/dcl → cjs/ota}/OtaImageWriter.d.ts +1 -1
  156. package/dist/cjs/{dcl → ota}/OtaImageWriter.d.ts.map +1 -1
  157. package/dist/cjs/{dcl → ota}/OtaImageWriter.js.map +1 -1
  158. package/dist/cjs/ota/index.d.ts +9 -0
  159. package/dist/cjs/ota/index.d.ts.map +1 -0
  160. package/dist/cjs/ota/index.js +26 -0
  161. package/dist/cjs/ota/index.js.map +6 -0
  162. package/dist/cjs/peer/ControllerCommissioner.d.ts.map +1 -1
  163. package/dist/cjs/peer/ControllerCommissioner.js +5 -0
  164. package/dist/cjs/peer/ControllerCommissioner.js.map +1 -1
  165. package/dist/cjs/peer/ControllerCommissioningFlow.d.ts +11 -3
  166. package/dist/cjs/peer/ControllerCommissioningFlow.d.ts.map +1 -1
  167. package/dist/cjs/peer/ControllerCommissioningFlow.js +119 -40
  168. package/dist/cjs/peer/ControllerCommissioningFlow.js.map +1 -1
  169. package/dist/cjs/peer/PeerSet.d.ts.map +1 -1
  170. package/dist/cjs/peer/PeerSet.js +17 -10
  171. package/dist/cjs/peer/PeerSet.js.map +1 -1
  172. package/dist/cjs/protocol/DeviceAdvertiser.js +3 -3
  173. package/dist/cjs/protocol/DeviceAdvertiser.js.map +1 -1
  174. package/dist/cjs/protocol/ExchangeProvider.d.ts +2 -2
  175. package/dist/cjs/protocol/ExchangeProvider.d.ts.map +1 -1
  176. package/dist/cjs/protocol/ExchangeProvider.js +2 -2
  177. package/dist/cjs/protocol/ExchangeProvider.js.map +1 -1
  178. package/dist/cjs/protocol/MessageExchange.js +3 -3
  179. package/dist/cjs/protocol/MessageExchange.js.map +1 -1
  180. package/dist/cjs/protocol/ProtocolMocks.d.ts +2 -2
  181. package/dist/cjs/protocol/ProtocolMocks.d.ts.map +1 -1
  182. package/dist/cjs/protocol/ProtocolMocks.js +1 -1
  183. package/dist/cjs/protocol/ProtocolMocks.js.map +1 -1
  184. package/dist/cjs/session/NodeSession.d.ts.map +1 -1
  185. package/dist/cjs/session/NodeSession.js +2 -2
  186. package/dist/cjs/session/NodeSession.js.map +1 -1
  187. package/dist/cjs/session/Session.d.ts.map +1 -1
  188. package/dist/cjs/session/Session.js +1 -0
  189. package/dist/cjs/session/Session.js.map +1 -1
  190. package/dist/cjs/session/SessionManager.js +2 -2
  191. package/dist/cjs/session/SessionManager.js.map +1 -1
  192. package/dist/cjs/session/SessionParameters.d.ts.map +1 -1
  193. package/dist/cjs/session/SessionParameters.js +7 -1
  194. package/dist/cjs/session/SessionParameters.js.map +1 -1
  195. package/dist/cjs/session/pase/PaseServer.d.ts.map +1 -1
  196. package/dist/cjs/session/pase/PaseServer.js +1 -0
  197. package/dist/cjs/session/pase/PaseServer.js.map +1 -1
  198. package/dist/esm/action/client/ClientBdx.d.ts +17 -0
  199. package/dist/esm/action/client/ClientBdx.d.ts.map +1 -0
  200. package/dist/esm/action/client/ClientBdx.js +6 -0
  201. package/dist/esm/action/client/ClientBdx.js.map +6 -0
  202. package/dist/esm/action/client/ClientInteraction.d.ts +10 -1
  203. package/dist/esm/action/client/ClientInteraction.d.ts.map +1 -1
  204. package/dist/esm/action/client/ClientInteraction.js +24 -1
  205. package/dist/esm/action/client/ClientInteraction.js.map +1 -1
  206. package/dist/esm/action/client/QueuedClientInteraction.d.ts +11 -3
  207. package/dist/esm/action/client/QueuedClientInteraction.d.ts.map +1 -1
  208. package/dist/esm/action/client/QueuedClientInteraction.js +5 -1
  209. package/dist/esm/action/client/QueuedClientInteraction.js.map +1 -1
  210. package/dist/esm/action/client/index.d.ts +1 -0
  211. package/dist/esm/action/client/index.d.ts.map +1 -1
  212. package/dist/esm/action/client/index.js +1 -0
  213. package/dist/esm/action/client/index.js.map +1 -1
  214. package/dist/esm/action/request/Read.d.ts.map +1 -1
  215. package/dist/esm/action/request/Read.js +2 -2
  216. package/dist/esm/action/request/Read.js.map +1 -1
  217. package/dist/esm/action/request/Write.js +4 -3
  218. package/dist/esm/action/request/Write.js.map +1 -1
  219. package/dist/esm/advertisement/ble/BleAdvertisement.d.ts +1 -1
  220. package/dist/esm/advertisement/ble/BleAdvertisement.d.ts.map +1 -1
  221. package/dist/esm/advertisement/ble/BleAdvertisement.js +2 -2
  222. package/dist/esm/advertisement/ble/BleAdvertisement.js.map +1 -1
  223. package/dist/esm/advertisement/mdns/CommissionableMdnsAdvertisement.d.ts +1 -1
  224. package/dist/esm/advertisement/mdns/CommissionableMdnsAdvertisement.js +1 -1
  225. package/dist/esm/advertisement/mdns/CommissionableMdnsAdvertisement.js.map +1 -1
  226. package/dist/esm/advertisement/mdns/OperationalMdnsAdvertisement.d.ts.map +1 -1
  227. package/dist/esm/advertisement/mdns/OperationalMdnsAdvertisement.js +4 -6
  228. package/dist/esm/advertisement/mdns/OperationalMdnsAdvertisement.js.map +1 -1
  229. package/dist/esm/bdx/BdxClient.d.ts +2 -0
  230. package/dist/esm/bdx/BdxClient.d.ts.map +1 -1
  231. package/dist/esm/bdx/BdxClient.js +6 -0
  232. package/dist/esm/bdx/BdxClient.js.map +1 -1
  233. package/dist/esm/bdx/BdxError.d.ts +2 -0
  234. package/dist/esm/bdx/BdxError.d.ts.map +1 -1
  235. package/dist/esm/bdx/BdxError.js +2 -0
  236. package/dist/esm/bdx/BdxError.js.map +1 -1
  237. package/dist/esm/bdx/BdxMessenger.d.ts +5 -1
  238. package/dist/esm/bdx/BdxMessenger.d.ts.map +1 -1
  239. package/dist/esm/bdx/BdxMessenger.js +14 -5
  240. package/dist/esm/bdx/BdxMessenger.js.map +1 -1
  241. package/dist/esm/bdx/BdxProtocol.d.ts +14 -7
  242. package/dist/esm/bdx/BdxProtocol.d.ts.map +1 -1
  243. package/dist/esm/bdx/BdxProtocol.js +82 -20
  244. package/dist/esm/bdx/BdxProtocol.js.map +1 -1
  245. package/dist/esm/bdx/BdxSession.d.ts +10 -3
  246. package/dist/esm/bdx/BdxSession.d.ts.map +1 -1
  247. package/dist/esm/bdx/BdxSession.js +34 -9
  248. package/dist/esm/bdx/BdxSession.js.map +1 -1
  249. package/dist/esm/bdx/BdxSessionConfiguration.d.ts +16 -1
  250. package/dist/esm/bdx/BdxSessionConfiguration.d.ts.map +1 -1
  251. package/dist/esm/bdx/BdxSessionConfiguration.js +6 -1
  252. package/dist/esm/bdx/BdxSessionConfiguration.js.map +1 -1
  253. package/dist/esm/bdx/FileDesignator.d.ts +15 -1
  254. package/dist/esm/bdx/FileDesignator.d.ts.map +1 -1
  255. package/dist/esm/bdx/FileDesignator.js +29 -3
  256. package/dist/esm/bdx/FileDesignator.js.map +1 -1
  257. package/dist/esm/bdx/PersistedFileDesignator.d.ts +10 -2
  258. package/dist/esm/bdx/PersistedFileDesignator.d.ts.map +1 -1
  259. package/dist/esm/bdx/PersistedFileDesignator.js +24 -6
  260. package/dist/esm/bdx/PersistedFileDesignator.js.map +1 -1
  261. package/dist/esm/bdx/ScopedStorage.d.ts +18 -0
  262. package/dist/esm/bdx/ScopedStorage.d.ts.map +1 -0
  263. package/dist/esm/bdx/ScopedStorage.js +16 -0
  264. package/dist/esm/bdx/ScopedStorage.js.map +6 -0
  265. package/dist/esm/bdx/bdx-session-initiator.d.ts.map +1 -1
  266. package/dist/esm/bdx/bdx-session-initiator.js +10 -2
  267. package/dist/esm/bdx/bdx-session-initiator.js.map +1 -1
  268. package/dist/esm/bdx/flow/DrivenSendingFlow.d.ts.map +1 -1
  269. package/dist/esm/bdx/flow/DrivenSendingFlow.js +2 -0
  270. package/dist/esm/bdx/flow/DrivenSendingFlow.js.map +1 -1
  271. package/dist/esm/bdx/flow/DrivingReceivingFlow.d.ts.map +1 -1
  272. package/dist/esm/bdx/flow/DrivingReceivingFlow.js +1 -0
  273. package/dist/esm/bdx/flow/DrivingReceivingFlow.js.map +1 -1
  274. package/dist/esm/bdx/flow/Flow.d.ts +7 -0
  275. package/dist/esm/bdx/flow/Flow.d.ts.map +1 -1
  276. package/dist/esm/bdx/flow/Flow.js +23 -2
  277. package/dist/esm/bdx/flow/Flow.js.map +1 -1
  278. package/dist/esm/bdx/flow/FollowingReceivingFlow.d.ts.map +1 -1
  279. package/dist/esm/bdx/flow/FollowingReceivingFlow.js +3 -0
  280. package/dist/esm/bdx/flow/FollowingReceivingFlow.js.map +1 -1
  281. package/dist/esm/bdx/flow/FollowingSendingFlow.d.ts.map +1 -1
  282. package/dist/esm/bdx/flow/FollowingSendingFlow.js +1 -0
  283. package/dist/esm/bdx/flow/FollowingSendingFlow.js.map +1 -1
  284. package/dist/esm/bdx/flow/OutboundFlow.d.ts.map +1 -1
  285. package/dist/esm/bdx/flow/OutboundFlow.js +1 -0
  286. package/dist/esm/bdx/flow/OutboundFlow.js.map +1 -1
  287. package/dist/esm/bdx/index.d.ts +1 -0
  288. package/dist/esm/bdx/index.d.ts.map +1 -1
  289. package/dist/esm/bdx/index.js +1 -0
  290. package/dist/esm/bdx/index.js.map +1 -1
  291. package/dist/esm/certificate/kinds/Icac.d.ts.map +1 -1
  292. package/dist/esm/certificate/kinds/Icac.js +1 -7
  293. package/dist/esm/certificate/kinds/Icac.js.map +1 -1
  294. package/dist/esm/certificate/kinds/Rcac.d.ts +1 -0
  295. package/dist/esm/certificate/kinds/Rcac.d.ts.map +1 -1
  296. package/dist/esm/certificate/kinds/Rcac.js +3 -0
  297. package/dist/esm/certificate/kinds/Rcac.js.map +1 -1
  298. package/dist/esm/certificate/kinds/definitions/operational.d.ts +1 -1
  299. package/dist/esm/certificate/kinds/definitions/operational.js +1 -1
  300. package/dist/esm/certificate/kinds/definitions/operational.js.map +1 -1
  301. package/dist/esm/common/FailsafeContext.js +2 -2
  302. package/dist/esm/common/FailsafeContext.js.map +1 -1
  303. package/dist/esm/dcl/DclClient.d.ts.map +1 -1
  304. package/dist/esm/dcl/DclClient.js +1 -2
  305. package/dist/esm/dcl/DclClient.js.map +1 -1
  306. package/dist/esm/dcl/DclOtaUpdateService.d.ts +30 -31
  307. package/dist/esm/dcl/DclOtaUpdateService.d.ts.map +1 -1
  308. package/dist/esm/dcl/DclOtaUpdateService.js +191 -93
  309. package/dist/esm/dcl/DclOtaUpdateService.js.map +2 -2
  310. package/dist/esm/dcl/index.d.ts +0 -3
  311. package/dist/esm/dcl/index.d.ts.map +1 -1
  312. package/dist/esm/dcl/index.js +0 -3
  313. package/dist/esm/dcl/index.js.map +1 -1
  314. package/dist/esm/fabric/Fabric.d.ts +53 -9
  315. package/dist/esm/fabric/Fabric.d.ts.map +1 -1
  316. package/dist/esm/fabric/Fabric.js +67 -33
  317. package/dist/esm/fabric/Fabric.js.map +1 -1
  318. package/dist/esm/fabric/FabricAuthority.js +1 -1
  319. package/dist/esm/fabric/FabricAuthority.js.map +1 -1
  320. package/dist/esm/fabric/FabricManager.d.ts +14 -5
  321. package/dist/esm/fabric/FabricManager.d.ts.map +1 -1
  322. package/dist/esm/fabric/FabricManager.js +66 -43
  323. package/dist/esm/fabric/FabricManager.js.map +1 -1
  324. package/dist/esm/groups/FabricGroups.d.ts.map +1 -1
  325. package/dist/esm/groups/FabricGroups.js +5 -9
  326. package/dist/esm/groups/FabricGroups.js.map +1 -1
  327. package/dist/esm/index.d.ts +1 -0
  328. package/dist/esm/index.d.ts.map +1 -1
  329. package/dist/esm/index.js +1 -0
  330. package/dist/esm/index.js.map +1 -1
  331. package/dist/esm/interaction/InteractionMessenger.d.ts +1 -106
  332. package/dist/esm/interaction/InteractionMessenger.d.ts.map +1 -1
  333. package/dist/esm/interaction/InteractionMessenger.js +2 -144
  334. package/dist/esm/interaction/InteractionMessenger.js.map +2 -2
  335. package/dist/esm/interaction/index.d.ts +0 -1
  336. package/dist/esm/interaction/index.d.ts.map +1 -1
  337. package/dist/esm/interaction/index.js +0 -1
  338. package/dist/esm/interaction/index.js.map +1 -1
  339. package/dist/esm/mdns/MdnsClient.d.ts +4 -4
  340. package/dist/esm/mdns/MdnsClient.d.ts.map +1 -1
  341. package/dist/esm/mdns/MdnsClient.js +13 -17
  342. package/dist/esm/mdns/MdnsClient.js.map +1 -1
  343. package/dist/esm/mdns/MdnsConsts.d.ts +3 -3
  344. package/dist/esm/mdns/MdnsConsts.d.ts.map +1 -1
  345. package/dist/esm/mdns/MdnsConsts.js +3 -2
  346. package/dist/esm/mdns/MdnsConsts.js.map +1 -1
  347. package/dist/{cjs/dcl → esm/ota}/OtaImageHeader.d.ts.map +1 -1
  348. package/dist/esm/{dcl → ota}/OtaImageHeader.js.map +1 -1
  349. package/dist/esm/{dcl → ota}/OtaImageReader.d.ts.map +1 -1
  350. package/dist/esm/{dcl → ota}/OtaImageReader.js +0 -3
  351. package/dist/esm/ota/OtaImageReader.js.map +6 -0
  352. package/dist/{cjs/dcl → esm/ota}/OtaImageWriter.d.ts +1 -1
  353. package/dist/esm/{dcl → ota}/OtaImageWriter.d.ts.map +1 -1
  354. package/dist/esm/{dcl → ota}/OtaImageWriter.js.map +1 -1
  355. package/dist/esm/ota/index.d.ts +9 -0
  356. package/dist/esm/ota/index.d.ts.map +1 -0
  357. package/dist/esm/ota/index.js +9 -0
  358. package/dist/esm/ota/index.js.map +6 -0
  359. package/dist/esm/peer/ControllerCommissioner.d.ts.map +1 -1
  360. package/dist/esm/peer/ControllerCommissioner.js +5 -0
  361. package/dist/esm/peer/ControllerCommissioner.js.map +1 -1
  362. package/dist/esm/peer/ControllerCommissioningFlow.d.ts +11 -3
  363. package/dist/esm/peer/ControllerCommissioningFlow.d.ts.map +1 -1
  364. package/dist/esm/peer/ControllerCommissioningFlow.js +119 -41
  365. package/dist/esm/peer/ControllerCommissioningFlow.js.map +1 -1
  366. package/dist/esm/peer/PeerSet.d.ts.map +1 -1
  367. package/dist/esm/peer/PeerSet.js +17 -10
  368. package/dist/esm/peer/PeerSet.js.map +1 -1
  369. package/dist/esm/protocol/DeviceAdvertiser.js +3 -3
  370. package/dist/esm/protocol/DeviceAdvertiser.js.map +1 -1
  371. package/dist/esm/protocol/ExchangeProvider.d.ts +2 -2
  372. package/dist/esm/protocol/ExchangeProvider.d.ts.map +1 -1
  373. package/dist/esm/protocol/ExchangeProvider.js +2 -2
  374. package/dist/esm/protocol/ExchangeProvider.js.map +1 -1
  375. package/dist/esm/protocol/MessageExchange.js +3 -3
  376. package/dist/esm/protocol/MessageExchange.js.map +1 -1
  377. package/dist/esm/protocol/ProtocolMocks.d.ts +2 -2
  378. package/dist/esm/protocol/ProtocolMocks.d.ts.map +1 -1
  379. package/dist/esm/protocol/ProtocolMocks.js +11 -2
  380. package/dist/esm/protocol/ProtocolMocks.js.map +1 -1
  381. package/dist/esm/session/NodeSession.d.ts.map +1 -1
  382. package/dist/esm/session/NodeSession.js +3 -3
  383. package/dist/esm/session/NodeSession.js.map +1 -1
  384. package/dist/esm/session/Session.d.ts.map +1 -1
  385. package/dist/esm/session/Session.js +1 -0
  386. package/dist/esm/session/Session.js.map +1 -1
  387. package/dist/esm/session/SessionManager.js +2 -2
  388. package/dist/esm/session/SessionManager.js.map +1 -1
  389. package/dist/esm/session/SessionParameters.d.ts.map +1 -1
  390. package/dist/esm/session/SessionParameters.js +7 -1
  391. package/dist/esm/session/SessionParameters.js.map +1 -1
  392. package/dist/esm/session/pase/PaseServer.d.ts.map +1 -1
  393. package/dist/esm/session/pase/PaseServer.js +1 -0
  394. package/dist/esm/session/pase/PaseServer.js.map +1 -1
  395. package/package.json +6 -6
  396. package/src/action/client/ClientBdx.ts +19 -0
  397. package/src/action/client/ClientInteraction.ts +34 -4
  398. package/src/action/client/QueuedClientInteraction.ts +16 -12
  399. package/src/action/client/index.ts +1 -0
  400. package/src/action/request/Read.ts +8 -2
  401. package/src/action/request/Write.ts +3 -3
  402. package/src/advertisement/ble/BleAdvertisement.ts +4 -4
  403. package/src/advertisement/mdns/CommissionableMdnsAdvertisement.ts +1 -1
  404. package/src/advertisement/mdns/OperationalMdnsAdvertisement.ts +4 -6
  405. package/src/bdx/BdxClient.ts +8 -0
  406. package/src/bdx/BdxError.ts +2 -0
  407. package/src/bdx/BdxMessenger.ts +16 -5
  408. package/src/bdx/BdxProtocol.ts +104 -22
  409. package/src/bdx/BdxSession.ts +38 -16
  410. package/src/bdx/BdxSessionConfiguration.ts +24 -2
  411. package/src/bdx/FileDesignator.ts +31 -2
  412. package/src/bdx/PersistedFileDesignator.ts +35 -8
  413. package/src/bdx/ScopedStorage.ts +25 -0
  414. package/src/bdx/bdx-session-initiator.ts +11 -2
  415. package/src/bdx/flow/DrivenSendingFlow.ts +3 -0
  416. package/src/bdx/flow/DrivingReceivingFlow.ts +1 -0
  417. package/src/bdx/flow/Flow.ts +29 -2
  418. package/src/bdx/flow/FollowingReceivingFlow.ts +3 -0
  419. package/src/bdx/flow/FollowingSendingFlow.ts +2 -0
  420. package/src/bdx/flow/OutboundFlow.ts +1 -0
  421. package/src/bdx/index.ts +1 -0
  422. package/src/certificate/kinds/Icac.ts +4 -1
  423. package/src/certificate/kinds/Rcac.ts +4 -0
  424. package/src/certificate/kinds/definitions/operational.ts +1 -1
  425. package/src/common/FailsafeContext.ts +2 -2
  426. package/src/dcl/DclClient.ts +1 -2
  427. package/src/dcl/DclOtaUpdateService.ts +266 -125
  428. package/src/dcl/index.ts +0 -3
  429. package/src/fabric/Fabric.ts +118 -39
  430. package/src/fabric/FabricAuthority.ts +1 -1
  431. package/src/fabric/FabricManager.ts +76 -49
  432. package/src/groups/FabricGroups.ts +5 -9
  433. package/src/index.ts +1 -0
  434. package/src/interaction/InteractionMessenger.ts +2 -186
  435. package/src/interaction/index.ts +0 -1
  436. package/src/mdns/MdnsClient.ts +14 -19
  437. package/src/mdns/MdnsConsts.ts +5 -4
  438. package/src/{dcl → ota}/OtaImageReader.ts +1 -5
  439. package/src/{dcl → ota}/OtaImageWriter.ts +1 -1
  440. package/src/ota/index.ts +9 -0
  441. package/src/peer/ControllerCommissioner.ts +7 -0
  442. package/src/peer/ControllerCommissioningFlow.ts +161 -54
  443. package/src/peer/PeerSet.ts +25 -12
  444. package/src/protocol/DeviceAdvertiser.ts +5 -5
  445. package/src/protocol/ExchangeProvider.ts +3 -3
  446. package/src/protocol/MessageExchange.ts +3 -3
  447. package/src/protocol/ProtocolMocks.ts +13 -4
  448. package/src/session/NodeSession.ts +3 -3
  449. package/src/session/Session.ts +1 -0
  450. package/src/session/SessionManager.ts +2 -2
  451. package/src/session/SessionParameters.ts +10 -2
  452. package/src/session/pase/PaseServer.ts +2 -1
  453. package/dist/cjs/dcl/OtaImageReader.js.map +0 -6
  454. package/dist/cjs/interaction/SubscriptionClient.d.ts +0 -39
  455. package/dist/cjs/interaction/SubscriptionClient.d.ts.map +0 -1
  456. package/dist/cjs/interaction/SubscriptionClient.js +0 -93
  457. package/dist/cjs/interaction/SubscriptionClient.js.map +0 -6
  458. package/dist/esm/dcl/OtaImageReader.js.map +0 -6
  459. package/dist/esm/interaction/SubscriptionClient.d.ts +0 -39
  460. package/dist/esm/interaction/SubscriptionClient.d.ts.map +0 -1
  461. package/dist/esm/interaction/SubscriptionClient.js +0 -73
  462. package/dist/esm/interaction/SubscriptionClient.js.map +0 -6
  463. package/src/interaction/SubscriptionClient.ts +0 -104
  464. /package/dist/cjs/{dcl → ota}/OtaImageHeader.d.ts +0 -0
  465. /package/dist/cjs/{dcl → ota}/OtaImageHeader.js +0 -0
  466. /package/dist/cjs/{dcl → ota}/OtaImageReader.d.ts +0 -0
  467. /package/dist/cjs/{dcl → ota}/OtaImageWriter.js +0 -0
  468. /package/dist/esm/{dcl → ota}/OtaImageHeader.d.ts +0 -0
  469. /package/dist/esm/{dcl → ota}/OtaImageHeader.js +0 -0
  470. /package/dist/esm/{dcl → ota}/OtaImageReader.d.ts +0 -0
  471. /package/dist/esm/{dcl → ota}/OtaImageWriter.js +0 -0
  472. /package/src/{dcl → ota}/OtaImageHeader.ts +0 -0
@@ -18,19 +18,13 @@ import {
18
18
  Time,
19
19
  UnexpectedDataError,
20
20
  } from "#general";
21
- import { DecodedAttributeReportValue } from "#interaction/AttributeDataDecoder.js";
22
- import { DecodedDataReport } from "#interaction/DecodedDataReport.js";
23
21
  import { Specification } from "#model";
24
22
  import { RetransmissionLimitReachedError, SessionClosedError, UnexpectedMessageError } from "#protocol/errors.js";
25
23
  import {
26
- AttributeId,
27
- ClusterId,
28
- EndpointNumber,
29
24
  ReceivedStatusResponseError,
30
25
  Status,
31
26
  StatusResponseError,
32
27
  TlvAny,
33
- TlvAttributeReport,
34
28
  TlvDataReport,
35
29
  TlvDataReportForSend,
36
30
  TlvDataVersionFilter,
@@ -825,162 +819,6 @@ export class IncomingInteractionClientMessenger extends InteractionMessenger {
825
819
  return message;
826
820
  }
827
821
 
828
- /**
829
- * Reads data report stream and aggregates them into a single report.
830
- * Additionally, a callback can be provided that is called for each cluster chunk received.
831
- */
832
- async readAggregateDataReport(
833
- chunkListener?: (chunk: DecodedAttributeReportValue<any>[]) => Promise<void>,
834
- expectedSubscriptionIds?: number[],
835
- ): Promise<DecodedDataReport> {
836
- let result: DecodedDataReport | undefined = undefined;
837
- let currentEndpointId: EndpointNumber | undefined = undefined;
838
- let currentClusterId: ClusterId | undefined = undefined;
839
- const currentClusterChunk = new Array<DecodedAttributeReportValue<any>>();
840
- let pendingAttributeReports: TypeFromSchema<typeof TlvAttributeReport>[] | undefined = undefined;
841
-
842
- const handleAttributeReportEntries = (
843
- attributeReports: TypeFromSchema<typeof TlvAttributeReport>[] | undefined,
844
- previousPendingAttributeReports: TypeFromSchema<typeof TlvAttributeReport>[] | undefined,
845
- ) => {
846
- if (previousPendingAttributeReports?.length) {
847
- attributeReports = attributeReports ?? [];
848
- attributeReports.unshift(...previousPendingAttributeReports);
849
- }
850
-
851
- let lastAttributeDataIndex = -1;
852
- if (attributeReports?.length) {
853
- let lastEndpointId: EndpointNumber | undefined = undefined;
854
- let lastClusterId: ClusterId | undefined = undefined;
855
- let lastAttributeId: AttributeId | undefined = undefined;
856
- for (let i = attributeReports.length - 1; i >= 0; i--) {
857
- const attributeReport = attributeReports[i];
858
- if (attributeReport.attributeData === undefined) {
859
- break; // No data report, so nothing more to search for
860
- }
861
- const {
862
- path: { endpointId, clusterId, attributeId },
863
- } = attributeReport.attributeData;
864
- if (lastEndpointId === undefined && lastClusterId === undefined && lastAttributeId === undefined) {
865
- // Remember path of the last attribute data entry and check if previous entries match
866
- lastEndpointId = endpointId;
867
- lastClusterId = clusterId;
868
- lastAttributeId = attributeId;
869
- }
870
- if (
871
- endpointId === lastEndpointId &&
872
- clusterId === lastClusterId &&
873
- attributeId === lastAttributeId
874
- ) {
875
- lastAttributeDataIndex = i;
876
- continue;
877
- }
878
- break; // We found an attribute that does not match the last one, so we are done
879
- }
880
-
881
- if (lastAttributeDataIndex > 0) {
882
- return attributeReports.splice(lastAttributeDataIndex);
883
- }
884
- }
885
- };
886
-
887
- const processDecodedReport = async (
888
- decodedReport: DecodedDataReport,
889
- result: DecodedDataReport | undefined,
890
- ) => {
891
- if (!result) {
892
- result = decodedReport;
893
- } else {
894
- if (!result.attributeReports) {
895
- result.attributeReports = decodedReport.attributeReports;
896
- } else {
897
- result.attributeReports.push(...decodedReport.attributeReports);
898
- }
899
- if (Array.isArray(decodedReport.eventReports)) {
900
- if (!result.eventReports) {
901
- result.eventReports = decodedReport.eventReports;
902
- } else {
903
- result.eventReports.push(...decodedReport.eventReports);
904
- }
905
- }
906
- }
907
-
908
- if (chunkListener !== undefined && decodedReport.attributeReports) {
909
- for (const data of decodedReport.attributeReports) {
910
- const {
911
- path: { endpointId, clusterId },
912
- } = data;
913
- if (currentEndpointId !== endpointId || currentClusterId !== clusterId) {
914
- // We switched the cluster, so we need to send the current chunk first
915
- if (currentClusterChunk.length > 0) {
916
- await chunkListener(currentClusterChunk);
917
- currentClusterChunk.length = 0;
918
- }
919
- currentEndpointId = endpointId;
920
- currentClusterId = clusterId;
921
- }
922
- currentClusterChunk.push(data);
923
- }
924
- }
925
- return result;
926
- };
927
-
928
- for await (const report of this.readDataReports()) {
929
- if (expectedSubscriptionIds !== undefined) {
930
- if (report.subscriptionId === undefined || !expectedSubscriptionIds.includes(report.subscriptionId)) {
931
- await this.sendStatus(Status.InvalidSubscription, {
932
- multipleMessageInteraction: true,
933
- logContext: Subscription.diagnosticOf(report),
934
- });
935
- throw new UnexpectedDataError(
936
- report.subscriptionId === undefined
937
- ? "Invalid Data report without Subscription ID"
938
- : `Invalid Data report with unexpected subscription ID ${Subscription.idStrOf(report)}`,
939
- );
940
- }
941
- }
942
-
943
- if (result?.subscriptionId !== undefined && report.subscriptionId !== result.subscriptionId) {
944
- throw new UnexpectedDataError(`Invalid subscription ID ${Subscription.idStrOf(report)} received`);
945
- }
946
-
947
- report.attributeReports = report.attributeReports ?? [];
948
- pendingAttributeReports = handleAttributeReportEntries(report.attributeReports, pendingAttributeReports);
949
-
950
- result = await processDecodedReport(DecodedDataReport(report), result);
951
- }
952
-
953
- if (pendingAttributeReports?.length && result !== undefined) {
954
- result = await processDecodedReport(
955
- DecodedDataReport({
956
- interactionModelRevision: result.interactionModelRevision,
957
- attributeReports: pendingAttributeReports,
958
- }),
959
- result,
960
- );
961
- }
962
-
963
- if (chunkListener !== undefined && currentClusterChunk.length > 0) {
964
- await chunkListener(currentClusterChunk);
965
- currentClusterChunk.length = 0;
966
- }
967
-
968
- if (result === undefined) {
969
- // readDataReports should have thrown
970
- throw new InternalError("No data reports loaded during read");
971
- }
972
-
973
- return result;
974
- }
975
-
976
- /**
977
- * Read a single data report.
978
- */
979
- async readDataReport() {
980
- const dataReportMessage = await this.waitFor("DataReport", MessageType.ReportData);
981
- return TlvDataReport.decode(dataReportMessage.payload);
982
- }
983
-
984
822
  /**
985
823
  * Read data reports as they come in on the wire.
986
824
  *
@@ -988,7 +826,8 @@ export class IncomingInteractionClientMessenger extends InteractionMessenger {
988
826
  */
989
827
  async *readDataReports() {
990
828
  while (true) {
991
- const report = await this.readDataReport();
829
+ const dataReportMessage = await this.waitFor("DataReport", MessageType.ReportData);
830
+ const report = TlvDataReport.decode(dataReportMessage.payload);
992
831
 
993
832
  yield report;
994
833
 
@@ -1133,29 +972,6 @@ export class InteractionClientMessenger extends IncomingInteractionClientMesseng
1133
972
  await this.send(MessageType.SubscribeRequest, request);
1134
973
  }
1135
974
 
1136
- async readAggregateSubscribeResponse(chunkListener?: (chunk: DecodedAttributeReportValue<any>[]) => Promise<void>) {
1137
- const report = await this.readAggregateDataReport(chunkListener);
1138
- const { subscriptionId } = report;
1139
-
1140
- if (subscriptionId === undefined) {
1141
- throw new UnexpectedDataError(`Subscription ID not provided in report`);
1142
- }
1143
-
1144
- const subscribeResponseMessage = await this.nextMessage(MessageType.SubscribeResponse);
1145
- const subscribeResponse = TlvSubscribeResponse.decode(subscribeResponseMessage.payload);
1146
-
1147
- if (subscribeResponse.subscriptionId !== subscriptionId) {
1148
- throw new MatterFlowError(
1149
- `Received subscription ID ${Subscription.idStrOf(subscribeResponse.subscriptionId)} instead of ${Subscription.idStrOf(subscriptionId)}`,
1150
- );
1151
- }
1152
-
1153
- return {
1154
- subscribeResponse,
1155
- report,
1156
- };
1157
- }
1158
-
1159
975
  async sendInvokeCommand(invokeRequest: InvokeRequest, expectedProcessingTime?: Duration) {
1160
976
  if (invokeRequest.suppressResponse) {
1161
977
  await this.requestWithSuppressedResponse(
@@ -11,4 +11,3 @@ export * from "./EventDataDecoder.js";
11
11
  export * from "./FabricAccessControl.js";
12
12
  export * from "./InteractionMessenger.js";
13
13
  export * from "./Subscription.js";
14
- export * from "./SubscriptionClient.js";
@@ -6,7 +6,6 @@
6
6
 
7
7
  import {
8
8
  BasicSet,
9
- Bytes,
10
9
  ChannelType,
11
10
  Diagnostic,
12
11
  DnsMessageType,
@@ -36,7 +35,7 @@ import {
36
35
  isIPv6,
37
36
  } from "#general";
38
37
  import { PeerAddress } from "#peer/PeerAddress.js";
39
- import { NodeId, VendorId } from "#types";
38
+ import { GlobalFabricId, NodeId, VendorId } from "#types";
40
39
  import {
41
40
  CommissionableDevice,
42
41
  CommissionableDeviceIdentifiers,
@@ -114,7 +113,7 @@ export interface MdnsScannerTargetCriteria {
114
113
 
115
114
  /** List of operational targets. */
116
115
  operationalTargets: {
117
- operationalId: Bytes;
116
+ fabricId: GlobalFabricId;
118
117
  nodeId?: NodeId;
119
118
  }[];
120
119
  }
@@ -209,12 +208,13 @@ export class MdnsClient implements Scanner {
209
208
  for (const criteria of this.#targetCriteriaProviders) {
210
209
  const { operationalTargets, commissionable } = criteria;
211
210
  cacheCommissionableDevices = cacheCommissionableDevices || commissionable;
212
- for (const { operationalId, nodeId } of operationalTargets) {
213
- const operationalIdString = Bytes.toHex(operationalId).toUpperCase();
211
+ for (const { fabricId, nodeId } of operationalTargets) {
214
212
  if (nodeId === undefined) {
215
- this.#operationalScanTargets.add(operationalIdString);
213
+ this.#operationalScanTargets.add(GlobalFabricId.strOf(fabricId));
216
214
  } else {
217
- this.#operationalScanTargets.add(`${operationalIdString}-${NodeId.toHexString(nodeId)}`);
215
+ this.#operationalScanTargets.add(
216
+ `${GlobalFabricId.strOf(fabricId)}-${NodeId.strOf(nodeId)}`.toUpperCase(),
217
+ );
218
218
  }
219
219
  }
220
220
  }
@@ -494,11 +494,6 @@ export class MdnsClient implements Scanner {
494
494
  return this.#recordWaiters.has(queryId);
495
495
  }
496
496
 
497
- #createOperationalMatterQName(operationalId: Bytes, nodeId: NodeId) {
498
- const operationalIdString = Bytes.toHex(operationalId).toUpperCase();
499
- return getOperationalDeviceQname(operationalIdString, NodeId.toHexString(nodeId));
500
- }
501
-
502
497
  /**
503
498
  * Method to find an operational device (already commissioned) and return a promise with the list of discovered
504
499
  * IP/ports or an empty array if not found.
@@ -512,7 +507,7 @@ export class MdnsClient implements Scanner {
512
507
  if (this.#closing) {
513
508
  throw new ImplementationError("Cannot discover operational device because scanner is closing.");
514
509
  }
515
- const deviceMatterQname = this.#createOperationalMatterQName(fabric.operationalId, nodeId);
510
+ const deviceMatterQname = getOperationalDeviceQname(fabric.globalId, nodeId);
516
511
 
517
512
  let storedDevice = ignoreExistingRecords ? undefined : this.#getOperationalDeviceRecords(deviceMatterQname);
518
513
  if (storedDevice === undefined) {
@@ -538,7 +533,7 @@ export class MdnsClient implements Scanner {
538
533
  }
539
534
 
540
535
  cancelOperationalDeviceDiscovery(fabric: Fabric, nodeId: NodeId, resolvePromise = true) {
541
- const deviceMatterQname = this.#createOperationalMatterQName(fabric.operationalId, nodeId);
536
+ const deviceMatterQname = getOperationalDeviceQname(fabric.globalId, nodeId);
542
537
  this.#finishWaiter(deviceMatterQname, resolvePromise);
543
538
  }
544
539
 
@@ -550,8 +545,8 @@ export class MdnsClient implements Scanner {
550
545
  this.#finishWaiter(queryId, resolvePromise);
551
546
  }
552
547
 
553
- getDiscoveredOperationalDevice({ operationalId }: Fabric, nodeId: NodeId) {
554
- return this.#getOperationalDeviceRecords(this.#createOperationalMatterQName(operationalId, nodeId));
548
+ getDiscoveredOperationalDevice({ globalId }: Fabric, nodeId: NodeId) {
549
+ return this.#getOperationalDeviceRecords(getOperationalDeviceQname(globalId, nodeId));
555
550
  }
556
551
 
557
552
  /**
@@ -1576,9 +1571,9 @@ export class MdnsClient implements Scanner {
1576
1571
  static discoveryDataDiagnostics(data: DiscoveryData, kind?: string) {
1577
1572
  return Diagnostic.dict({
1578
1573
  kind,
1579
- SII: Duration.format(data.SII),
1580
- SAI: Duration.format(data.SAI),
1581
- SAT: Duration.format(data.SAT),
1574
+ SII: data.SII !== undefined ? Duration.format(data.SII) : undefined,
1575
+ SAI: data.SAI !== undefined ? Duration.format(data.SAI) : undefined,
1576
+ SAT: data.SAT !== undefined ? Duration.format(data.SAT) : undefined,
1582
1577
  T: data.T,
1583
1578
  DT: data.DT,
1584
1579
  PH: data.PH,
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import { PairingHintBitmap } from "#advertisement/PairingHintBitmap.js";
8
- import { VendorId } from "#types";
8
+ import { GlobalFabricId, NodeId, VendorId } from "#types";
9
9
 
10
10
  export const MDNS_BROADCAST_IPV4 = "224.0.0.251";
11
11
  export const MDNS_BROADCAST_IPV6 = "ff02::fb";
@@ -35,9 +35,10 @@ export const PAIRING_HINTS_REQUIRING_INSTRUCTION = Array<keyof typeof PairingHin
35
35
  "pressSetupButtonNumberOfTimes",
36
36
  );
37
37
 
38
- export const getFabricQname = (operationalIdString: string) => `_I${operationalIdString}._sub.${MATTER_SERVICE_QNAME}`;
39
- export const getOperationalDeviceQname = (operationalIdString: string, nodeIdString: string) =>
40
- `${operationalIdString}-${nodeIdString}.${MATTER_SERVICE_QNAME}`;
38
+ export const getFabricQname = (fabric: GlobalFabricId) =>
39
+ `_I${GlobalFabricId.strOf(fabric).toUpperCase()}._sub.${MATTER_SERVICE_QNAME}`;
40
+ export const getOperationalDeviceQname = (fabric: GlobalFabricId, node: NodeId) =>
41
+ `${GlobalFabricId.strOf(fabric).toUpperCase()}-${NodeId.strOf(node).toUpperCase()}.${MATTER_SERVICE_QNAME}`;
41
42
  export const getVendorQname = (vendorId: VendorId) => `_V${vendorId}._sub.${MATTER_COMMISSION_SERVICE_QNAME}`;
42
43
  export const getDeviceTypeQname = (deviceType: number) => `_T${deviceType}._sub.${MATTER_COMMISSION_SERVICE_QNAME}`;
43
44
  export const getShortDiscriminatorQname = (shortDiscriminator: number) =>
@@ -12,13 +12,10 @@ import {
12
12
  HashAlgorithm,
13
13
  HashFipsAlgorithmId,
14
14
  InternalError,
15
- Logger,
16
15
  MatterError,
17
16
  } from "#general";
18
17
  import { OtaImageHeader, TlvOtaImageHeader } from "./OtaImageHeader.js";
19
18
 
20
- const logger = Logger.get("OtaImageReader");
21
-
22
19
  export class OtaImageError extends MatterError {
23
20
  constructor(message: string, options?: ErrorOptions) {
24
21
  super(message, options);
@@ -132,7 +129,7 @@ export class OtaImageReader {
132
129
  allHeaderBytes.push(value);
133
130
  }
134
131
 
135
- // We still need to get the header, so initialize or append to data reader
132
+ // We still need to get the header, so initialize or append to the data reader
136
133
  if (headerReader !== undefined) {
137
134
  headerReader = new DataReader(Bytes.concat(headerReader.remainingBytes, value), Endian.Little);
138
135
  } else {
@@ -161,7 +158,6 @@ export class OtaImageReader {
161
158
  headerReader.remainingBytesCount >= this.#headerSize
162
159
  ) {
163
160
  const data = headerReader.readByteArray(this.#headerSize);
164
- logger.debug(`OTA Header read, size=${this.#headerSize} bytes`, data);
165
161
  this.#headerData = TlvOtaImageHeader.decode(data);
166
162
  const remainingBytes = headerReader.remainingBytes;
167
163
 
@@ -26,7 +26,7 @@ export interface OtaImageWriterResult {
26
26
  * including file identifier, header encoding, and payload digest computation.
27
27
  *
28
28
  * The class can be used to convert raw firmware payloads into OTA image files suitable for distribution.
29
- * It does not use streaming approach, so it requires the entire payload to be available in memory what is ok for now.
29
+ * It does not use a streaming approach, so it requires the entire payload to be available in memory what is ok for now.
30
30
  */
31
31
  export class OtaImageWriter {
32
32
  /**
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ export * from "./OtaImageHeader.js";
8
+ export * from "./OtaImageReader.js";
9
+ export * from "./OtaImageWriter.js";
@@ -459,6 +459,12 @@ export class ControllerCommissioner {
459
459
  Commissionee SHALL exit Commissioning Mode after 20 failed attempts.
460
460
  */
461
461
 
462
+ // The pase session has actual negotiated parameters from the device. Use them over the discoveryData
463
+ discoveryData = discoveryData ?? {};
464
+ discoveryData.SII = paseSession.parameters.idleInterval;
465
+ discoveryData.SAI = paseSession.parameters.activeInterval;
466
+ discoveryData.SAT = paseSession.parameters.activeThreshold;
467
+
462
468
  const address = this.#determineAddress(fabric, commissioningOptions.nodeId);
463
469
  logger.info(
464
470
  `Start commissioning of node ${address.nodeId} into fabric ${fabric.fabricId} (index ${address.fabricIndex})`,
@@ -515,6 +521,7 @@ export class ControllerCommissioner {
515
521
  await this.#context.peers.get(address)?.delete();
516
522
  throw error;
517
523
  } finally {
524
+ commissioningManager.close();
518
525
  /*
519
526
  In concurrent connection commissioning flow the commissioning channel SHALL terminate after
520
527
  successful step 15 (CommissioningComplete command invocation).