@matter/protocol 0.15.1 → 0.15.2-alpha.0-20250704-2715344f0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/action/Val.d.ts +4 -0
- package/dist/cjs/action/Val.d.ts.map +1 -1
- package/dist/cjs/action/Val.js.map +1 -1
- package/dist/cjs/action/client/ClientInteraction.d.ts +10 -8
- package/dist/cjs/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/cjs/action/client/ClientInteraction.js +152 -80
- package/dist/cjs/action/client/ClientInteraction.js.map +1 -1
- package/dist/cjs/action/client/ClientSubscription.d.ts +17 -0
- package/dist/cjs/action/client/ClientSubscription.d.ts.map +1 -0
- package/dist/cjs/action/client/ClientSubscription.js +22 -0
- package/dist/cjs/action/client/ClientSubscription.js.map +6 -0
- package/dist/cjs/action/client/ClientSubscriptionHandler.d.ts +20 -0
- package/dist/cjs/action/client/ClientSubscriptionHandler.d.ts.map +1 -0
- package/dist/cjs/action/client/ClientSubscriptionHandler.js +117 -0
- package/dist/cjs/action/client/ClientSubscriptionHandler.js.map +6 -0
- package/dist/cjs/action/client/ClientSubscriptions.d.ts +45 -0
- package/dist/cjs/action/client/ClientSubscriptions.d.ts.map +1 -0
- package/dist/cjs/action/client/ClientSubscriptions.js +141 -0
- package/dist/cjs/action/client/ClientSubscriptions.js.map +6 -0
- package/dist/cjs/action/client/InputChunk.d.ts +12 -0
- package/dist/cjs/action/client/InputChunk.d.ts.map +1 -0
- package/dist/cjs/action/client/InputChunk.js +89 -0
- package/dist/cjs/action/client/InputChunk.js.map +6 -0
- package/dist/cjs/action/client/ReadScope.d.ts +26 -0
- package/dist/cjs/action/client/ReadScope.d.ts.map +1 -0
- package/dist/cjs/action/client/ReadScope.js +87 -0
- package/dist/cjs/action/client/ReadScope.js.map +6 -0
- package/dist/cjs/action/client/index.d.ts +5 -0
- package/dist/cjs/action/client/index.d.ts.map +1 -1
- package/dist/cjs/action/client/index.js +5 -0
- package/dist/cjs/action/client/index.js.map +1 -1
- package/dist/cjs/action/request/Invoke.d.ts.map +1 -1
- package/dist/cjs/action/request/Invoke.js +8 -2
- package/dist/cjs/action/request/Invoke.js.map +1 -1
- package/dist/cjs/action/request/Read.d.ts +0 -4
- package/dist/cjs/action/request/Read.d.ts.map +1 -1
- package/dist/cjs/action/request/Read.js.map +1 -1
- package/dist/cjs/action/request/Subscribe.d.ts +14 -1
- package/dist/cjs/action/request/Subscribe.d.ts.map +1 -1
- package/dist/cjs/action/request/Subscribe.js +2 -2
- package/dist/cjs/action/request/Subscribe.js.map +1 -1
- package/dist/cjs/action/response/SubscribeResult.d.ts +3 -5
- package/dist/cjs/action/response/SubscribeResult.d.ts.map +1 -1
- package/dist/cjs/action/server/AttributeReadResponse.d.ts +1 -1
- package/dist/cjs/action/server/AttributeReadResponse.d.ts.map +1 -1
- package/dist/cjs/action/server/AttributeSubscriptionResponse.d.ts +1 -1
- package/dist/cjs/action/server/AttributeSubscriptionResponse.d.ts.map +1 -1
- package/dist/cjs/action/server/AttributeSubscriptionResponse.js.map +1 -1
- package/dist/cjs/action/server/CommandInvokeResponse.d.ts +2 -1
- package/dist/cjs/action/server/CommandInvokeResponse.d.ts.map +1 -1
- package/dist/cjs/action/server/CommandInvokeResponse.js +3 -3
- package/dist/cjs/action/server/CommandInvokeResponse.js.map +1 -1
- package/dist/cjs/action/server/EventReadResponse.d.ts +1 -1
- package/dist/cjs/action/server/EventReadResponse.d.ts.map +1 -1
- package/dist/cjs/codec/MessageCodec.d.ts +1 -1
- package/dist/cjs/codec/MessageCodec.d.ts.map +1 -1
- package/dist/cjs/common/FailsafeContext.d.ts.map +1 -1
- package/dist/cjs/common/FailsafeContext.js +0 -1
- package/dist/cjs/common/FailsafeContext.js.map +1 -1
- package/dist/cjs/fabric/Fabric.d.ts.map +1 -1
- package/dist/cjs/fabric/Fabric.js +13 -10
- package/dist/cjs/fabric/Fabric.js.map +1 -1
- package/dist/cjs/fabric/FabricAuthority.d.ts +6 -1
- package/dist/cjs/fabric/FabricAuthority.d.ts.map +1 -1
- package/dist/cjs/fabric/FabricAuthority.js +16 -0
- package/dist/cjs/fabric/FabricAuthority.js.map +1 -1
- package/dist/cjs/groups/FabricGroups.d.ts +1 -1
- package/dist/cjs/groups/FabricGroups.d.ts.map +1 -1
- package/dist/cjs/groups/Groups.d.ts +2 -2
- package/dist/cjs/groups/Groups.d.ts.map +1 -1
- package/dist/cjs/groups/Groups.js +2 -2
- package/dist/cjs/groups/Groups.js.map +1 -1
- package/dist/cjs/interaction/AttributeDataEncoder.d.ts +1 -1
- package/dist/cjs/interaction/FabricAccessControl.d.ts +1 -1
- package/dist/cjs/interaction/FabricAccessControl.d.ts.map +1 -1
- package/dist/cjs/interaction/InteractionClient.d.ts.map +1 -1
- package/dist/cjs/interaction/InteractionClient.js +8 -4
- package/dist/cjs/interaction/InteractionClient.js.map +1 -1
- package/dist/cjs/interaction/InteractionMessenger.d.ts +21 -17
- package/dist/cjs/interaction/InteractionMessenger.d.ts.map +1 -1
- package/dist/cjs/interaction/InteractionMessenger.js +20 -12
- package/dist/cjs/interaction/InteractionMessenger.js.map +1 -1
- package/dist/cjs/mdns/MdnsScanner.d.ts +5 -6
- package/dist/cjs/mdns/MdnsScanner.d.ts.map +1 -1
- package/dist/cjs/mdns/MdnsScanner.js.map +1 -1
- package/dist/cjs/peer/ControllerCommissioner.js +4 -4
- package/dist/cjs/peer/ControllerCommissioner.js.map +1 -1
- package/dist/cjs/peer/ControllerCommissioningFlow.js +2 -2
- package/dist/cjs/peer/ControllerCommissioningFlow.js.map +1 -1
- package/dist/cjs/peer/OperationalPeer.d.ts +1 -1
- package/dist/cjs/peer/OperationalPeer.d.ts.map +1 -1
- package/dist/cjs/peer/PeerAddress.d.ts.map +1 -1
- package/dist/cjs/peer/PeerAddress.js +1 -1
- package/dist/cjs/peer/PeerAddress.js.map +1 -1
- package/dist/cjs/peer/PeerAddressStore.d.ts +1 -1
- package/dist/cjs/peer/PeerAddressStore.d.ts.map +1 -1
- package/dist/cjs/peer/PeerSet.d.ts.map +1 -1
- package/dist/cjs/peer/PeerSet.js +5 -5
- package/dist/cjs/peer/PeerSet.js.map +1 -1
- package/dist/cjs/protocol/ChannelManager.d.ts +1 -3
- package/dist/cjs/protocol/ChannelManager.d.ts.map +1 -1
- package/dist/cjs/protocol/ChannelManager.js +3 -6
- package/dist/cjs/protocol/ChannelManager.js.map +1 -1
- package/dist/cjs/protocol/DeviceCommissioner.d.ts +3 -2
- package/dist/cjs/protocol/DeviceCommissioner.d.ts.map +1 -1
- package/dist/cjs/protocol/DeviceCommissioner.js +6 -8
- package/dist/cjs/protocol/DeviceCommissioner.js.map +1 -1
- package/dist/cjs/protocol/ExchangeManager.d.ts +1 -3
- package/dist/cjs/protocol/ExchangeManager.d.ts.map +1 -1
- package/dist/cjs/protocol/ExchangeManager.js +7 -9
- package/dist/cjs/protocol/ExchangeManager.js.map +1 -1
- package/dist/cjs/protocol/ExchangeProvider.d.ts.map +1 -1
- package/dist/cjs/protocol/ExchangeProvider.js +7 -8
- package/dist/cjs/protocol/ExchangeProvider.js.map +1 -1
- package/dist/cjs/protocol/MessageChannel.d.ts +17 -4
- package/dist/cjs/protocol/MessageChannel.d.ts.map +1 -1
- package/dist/cjs/protocol/MessageChannel.js +15 -6
- package/dist/cjs/protocol/MessageChannel.js.map +1 -1
- package/dist/cjs/protocol/MessageExchange.d.ts +0 -6
- package/dist/cjs/protocol/MessageExchange.d.ts.map +1 -1
- package/dist/cjs/protocol/MessageExchange.js +5 -9
- package/dist/cjs/protocol/MessageExchange.js.map +1 -1
- package/dist/cjs/securechannel/SecureChannelMessenger.d.ts +3 -0
- package/dist/cjs/securechannel/SecureChannelMessenger.d.ts.map +1 -1
- package/dist/cjs/securechannel/SecureChannelMessenger.js +4 -0
- package/dist/cjs/securechannel/SecureChannelMessenger.js.map +1 -1
- package/dist/cjs/securechannel/SecureChannelProtocol.d.ts +0 -1
- package/dist/cjs/securechannel/SecureChannelProtocol.d.ts.map +1 -1
- package/dist/cjs/securechannel/SecureChannelProtocol.js +0 -3
- package/dist/cjs/securechannel/SecureChannelProtocol.js.map +1 -1
- package/dist/cjs/session/GroupSession.d.ts +1 -1
- package/dist/cjs/session/GroupSession.d.ts.map +1 -1
- package/dist/cjs/session/GroupSession.js +6 -6
- package/dist/cjs/session/GroupSession.js.map +1 -1
- package/dist/cjs/session/InsecureSession.d.ts +2 -1
- package/dist/cjs/session/InsecureSession.d.ts.map +1 -1
- package/dist/cjs/session/InsecureSession.js +5 -4
- package/dist/cjs/session/InsecureSession.js.map +1 -1
- package/dist/cjs/session/NodeSession.d.ts +5 -3
- package/dist/cjs/session/NodeSession.d.ts.map +1 -1
- package/dist/cjs/session/NodeSession.js +4 -2
- package/dist/cjs/session/NodeSession.js.map +1 -1
- package/dist/cjs/session/SessionManager.d.ts +2 -3
- package/dist/cjs/session/SessionManager.d.ts.map +1 -1
- package/dist/cjs/session/SessionManager.js +1 -3
- package/dist/cjs/session/SessionManager.js.map +1 -1
- package/dist/cjs/session/case/CaseClient.d.ts.map +1 -1
- package/dist/cjs/session/case/CaseClient.js +6 -5
- package/dist/cjs/session/case/CaseClient.js.map +1 -1
- package/dist/cjs/session/case/CaseServer.js +2 -2
- package/dist/cjs/session/case/CaseServer.js.map +1 -1
- package/dist/cjs/session/pase/PaseMessages.js +2 -2
- package/dist/cjs/session/pase/PaseMessages.js.map +1 -1
- package/dist/esm/action/Val.d.ts +4 -0
- package/dist/esm/action/Val.d.ts.map +1 -1
- package/dist/esm/action/Val.js.map +1 -1
- package/dist/esm/action/client/ClientInteraction.d.ts +10 -8
- package/dist/esm/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/esm/action/client/ClientInteraction.js +154 -82
- package/dist/esm/action/client/ClientInteraction.js.map +1 -1
- package/dist/esm/action/client/ClientSubscription.d.ts +17 -0
- package/dist/esm/action/client/ClientSubscription.d.ts.map +1 -0
- package/dist/esm/action/client/ClientSubscription.js +6 -0
- package/dist/esm/action/client/ClientSubscription.js.map +6 -0
- package/dist/esm/action/client/ClientSubscriptionHandler.d.ts +20 -0
- package/dist/esm/action/client/ClientSubscriptionHandler.d.ts.map +1 -0
- package/dist/esm/action/client/ClientSubscriptionHandler.js +97 -0
- package/dist/esm/action/client/ClientSubscriptionHandler.js.map +6 -0
- package/dist/esm/action/client/ClientSubscriptions.d.ts +45 -0
- package/dist/esm/action/client/ClientSubscriptions.d.ts.map +1 -0
- package/dist/esm/action/client/ClientSubscriptions.js +129 -0
- package/dist/esm/action/client/ClientSubscriptions.js.map +6 -0
- package/dist/esm/action/client/InputChunk.d.ts +12 -0
- package/dist/esm/action/client/InputChunk.d.ts.map +1 -0
- package/dist/esm/action/client/InputChunk.js +69 -0
- package/dist/esm/action/client/InputChunk.js.map +6 -0
- package/dist/esm/action/client/ReadScope.d.ts +26 -0
- package/dist/esm/action/client/ReadScope.d.ts.map +1 -0
- package/dist/esm/action/client/ReadScope.js +67 -0
- package/dist/esm/action/client/ReadScope.js.map +6 -0
- package/dist/esm/action/client/index.d.ts +5 -0
- package/dist/esm/action/client/index.d.ts.map +1 -1
- package/dist/esm/action/client/index.js +5 -0
- package/dist/esm/action/client/index.js.map +1 -1
- package/dist/esm/action/request/Invoke.d.ts.map +1 -1
- package/dist/esm/action/request/Invoke.js +8 -2
- package/dist/esm/action/request/Invoke.js.map +1 -1
- package/dist/esm/action/request/Read.d.ts +0 -4
- package/dist/esm/action/request/Read.d.ts.map +1 -1
- package/dist/esm/action/request/Read.js.map +1 -1
- package/dist/esm/action/request/Subscribe.d.ts +14 -1
- package/dist/esm/action/request/Subscribe.d.ts.map +1 -1
- package/dist/esm/action/request/Subscribe.js +2 -2
- package/dist/esm/action/request/Subscribe.js.map +1 -1
- package/dist/esm/action/response/SubscribeResult.d.ts +3 -5
- package/dist/esm/action/response/SubscribeResult.d.ts.map +1 -1
- package/dist/esm/action/server/AttributeReadResponse.d.ts +1 -1
- package/dist/esm/action/server/AttributeReadResponse.d.ts.map +1 -1
- package/dist/esm/action/server/AttributeSubscriptionResponse.d.ts +1 -1
- package/dist/esm/action/server/AttributeSubscriptionResponse.d.ts.map +1 -1
- package/dist/esm/action/server/AttributeSubscriptionResponse.js.map +1 -1
- package/dist/esm/action/server/CommandInvokeResponse.d.ts +2 -1
- package/dist/esm/action/server/CommandInvokeResponse.d.ts.map +1 -1
- package/dist/esm/action/server/CommandInvokeResponse.js +1 -1
- package/dist/esm/action/server/CommandInvokeResponse.js.map +1 -1
- package/dist/esm/action/server/EventReadResponse.d.ts +1 -1
- package/dist/esm/action/server/EventReadResponse.d.ts.map +1 -1
- package/dist/esm/codec/MessageCodec.d.ts +1 -1
- package/dist/esm/codec/MessageCodec.d.ts.map +1 -1
- package/dist/esm/common/FailsafeContext.d.ts.map +1 -1
- package/dist/esm/common/FailsafeContext.js +0 -1
- package/dist/esm/common/FailsafeContext.js.map +1 -1
- package/dist/esm/fabric/Fabric.d.ts.map +1 -1
- package/dist/esm/fabric/Fabric.js +4 -1
- package/dist/esm/fabric/Fabric.js.map +1 -1
- package/dist/esm/fabric/FabricAuthority.d.ts +6 -1
- package/dist/esm/fabric/FabricAuthority.d.ts.map +1 -1
- package/dist/esm/fabric/FabricAuthority.js +25 -1
- package/dist/esm/fabric/FabricAuthority.js.map +1 -1
- package/dist/esm/groups/FabricGroups.d.ts +1 -1
- package/dist/esm/groups/FabricGroups.d.ts.map +1 -1
- package/dist/esm/groups/Groups.d.ts +2 -2
- package/dist/esm/groups/Groups.d.ts.map +1 -1
- package/dist/esm/groups/Groups.js +1 -1
- package/dist/esm/groups/Groups.js.map +1 -1
- package/dist/esm/interaction/AttributeDataEncoder.d.ts +1 -1
- package/dist/esm/interaction/FabricAccessControl.d.ts +1 -1
- package/dist/esm/interaction/FabricAccessControl.d.ts.map +1 -1
- package/dist/esm/interaction/InteractionClient.d.ts.map +1 -1
- package/dist/esm/interaction/InteractionClient.js +8 -4
- package/dist/esm/interaction/InteractionClient.js.map +1 -1
- package/dist/esm/interaction/InteractionMessenger.d.ts +21 -17
- package/dist/esm/interaction/InteractionMessenger.d.ts.map +1 -1
- package/dist/esm/interaction/InteractionMessenger.js +19 -11
- package/dist/esm/interaction/InteractionMessenger.js.map +1 -1
- package/dist/esm/mdns/MdnsScanner.d.ts +5 -6
- package/dist/esm/mdns/MdnsScanner.d.ts.map +1 -1
- package/dist/esm/mdns/MdnsScanner.js.map +1 -1
- package/dist/esm/peer/ControllerCommissioner.js +2 -2
- package/dist/esm/peer/ControllerCommissioningFlow.js +1 -1
- package/dist/esm/peer/OperationalPeer.d.ts +1 -1
- package/dist/esm/peer/OperationalPeer.d.ts.map +1 -1
- package/dist/esm/peer/PeerAddress.d.ts.map +1 -1
- package/dist/esm/peer/PeerAddress.js +2 -2
- package/dist/esm/peer/PeerAddress.js.map +1 -1
- package/dist/esm/peer/PeerAddressStore.d.ts +1 -1
- package/dist/esm/peer/PeerAddressStore.d.ts.map +1 -1
- package/dist/esm/peer/PeerSet.d.ts.map +1 -1
- package/dist/esm/peer/PeerSet.js +4 -4
- package/dist/esm/peer/PeerSet.js.map +1 -1
- package/dist/esm/protocol/ChannelManager.d.ts +1 -3
- package/dist/esm/protocol/ChannelManager.d.ts.map +1 -1
- package/dist/esm/protocol/ChannelManager.js +3 -6
- package/dist/esm/protocol/ChannelManager.js.map +1 -1
- package/dist/esm/protocol/DeviceCommissioner.d.ts +3 -2
- package/dist/esm/protocol/DeviceCommissioner.d.ts.map +1 -1
- package/dist/esm/protocol/DeviceCommissioner.js +4 -6
- package/dist/esm/protocol/DeviceCommissioner.js.map +1 -1
- package/dist/esm/protocol/ExchangeManager.d.ts +1 -3
- package/dist/esm/protocol/ExchangeManager.d.ts.map +1 -1
- package/dist/esm/protocol/ExchangeManager.js +8 -7
- package/dist/esm/protocol/ExchangeManager.js.map +1 -1
- package/dist/esm/protocol/ExchangeProvider.d.ts.map +1 -1
- package/dist/esm/protocol/ExchangeProvider.js +4 -2
- package/dist/esm/protocol/ExchangeProvider.js.map +1 -1
- package/dist/esm/protocol/MessageChannel.d.ts +17 -4
- package/dist/esm/protocol/MessageChannel.d.ts.map +1 -1
- package/dist/esm/protocol/MessageChannel.js +12 -3
- package/dist/esm/protocol/MessageChannel.js.map +1 -1
- package/dist/esm/protocol/MessageExchange.d.ts +0 -6
- package/dist/esm/protocol/MessageExchange.d.ts.map +1 -1
- package/dist/esm/protocol/MessageExchange.js +7 -7
- package/dist/esm/protocol/MessageExchange.js.map +1 -1
- package/dist/esm/securechannel/SecureChannelMessenger.d.ts +3 -0
- package/dist/esm/securechannel/SecureChannelMessenger.d.ts.map +1 -1
- package/dist/esm/securechannel/SecureChannelMessenger.js +4 -0
- package/dist/esm/securechannel/SecureChannelMessenger.js.map +1 -1
- package/dist/esm/securechannel/SecureChannelProtocol.d.ts +0 -1
- package/dist/esm/securechannel/SecureChannelProtocol.d.ts.map +1 -1
- package/dist/esm/securechannel/SecureChannelProtocol.js +0 -3
- package/dist/esm/securechannel/SecureChannelProtocol.js.map +1 -1
- package/dist/esm/session/GroupSession.d.ts +1 -1
- package/dist/esm/session/GroupSession.d.ts.map +1 -1
- package/dist/esm/session/GroupSession.js +1 -1
- package/dist/esm/session/InsecureSession.d.ts +2 -1
- package/dist/esm/session/InsecureSession.d.ts.map +1 -1
- package/dist/esm/session/InsecureSession.js +3 -2
- package/dist/esm/session/InsecureSession.js.map +1 -1
- package/dist/esm/session/NodeSession.d.ts +5 -3
- package/dist/esm/session/NodeSession.d.ts.map +1 -1
- package/dist/esm/session/NodeSession.js +12 -2
- package/dist/esm/session/NodeSession.js.map +1 -1
- package/dist/esm/session/SessionManager.d.ts +2 -3
- package/dist/esm/session/SessionManager.d.ts.map +1 -1
- package/dist/esm/session/SessionManager.js +1 -3
- package/dist/esm/session/SessionManager.js.map +1 -1
- package/dist/esm/session/case/CaseClient.d.ts.map +1 -1
- package/dist/esm/session/case/CaseClient.js +3 -2
- package/dist/esm/session/case/CaseClient.js.map +1 -1
- package/dist/esm/session/case/CaseServer.js +1 -1
- package/dist/esm/session/pase/PaseMessages.js +1 -1
- package/package.json +6 -6
- package/src/action/Val.ts +5 -0
- package/src/action/client/ClientInteraction.ts +178 -90
- package/src/action/client/ClientSubscription.ts +18 -0
- package/src/action/client/ClientSubscriptionHandler.ts +137 -0
- package/src/action/client/ClientSubscriptions.ts +172 -0
- package/src/action/client/InputChunk.ts +79 -0
- package/src/action/client/ReadScope.ts +107 -0
- package/src/action/client/index.ts +5 -0
- package/src/action/request/Invoke.ts +11 -2
- package/src/action/request/Read.ts +0 -5
- package/src/action/request/Subscribe.ts +17 -3
- package/src/action/response/SubscribeResult.ts +3 -4
- package/src/action/server/AttributeReadResponse.ts +1 -1
- package/src/action/server/AttributeSubscriptionResponse.ts +2 -1
- package/src/action/server/CommandInvokeResponse.ts +4 -2
- package/src/action/server/EventReadResponse.ts +2 -2
- package/src/codec/MessageCodec.ts +1 -1
- package/src/common/FailsafeContext.ts +0 -1
- package/src/fabric/Fabric.ts +4 -1
- package/src/fabric/FabricAuthority.ts +29 -1
- package/src/groups/FabricGroups.ts +1 -1
- package/src/groups/Groups.ts +3 -2
- package/src/interaction/FabricAccessControl.ts +1 -1
- package/src/interaction/InteractionClient.ts +8 -4
- package/src/interaction/InteractionMessenger.ts +20 -13
- package/src/mdns/MdnsScanner.ts +5 -6
- package/src/peer/ControllerCommissioner.ts +2 -2
- package/src/peer/ControllerCommissioningFlow.ts +1 -1
- package/src/peer/OperationalPeer.ts +1 -1
- package/src/peer/PeerAddress.ts +2 -2
- package/src/peer/PeerAddressStore.ts +1 -1
- package/src/peer/PeerSet.ts +6 -4
- package/src/protocol/ChannelManager.ts +2 -4
- package/src/protocol/DeviceCommissioner.ts +4 -8
- package/src/protocol/ExchangeManager.ts +9 -7
- package/src/protocol/ExchangeProvider.ts +7 -3
- package/src/protocol/MessageChannel.ts +19 -4
- package/src/protocol/MessageExchange.ts +8 -12
- package/src/securechannel/SecureChannelMessenger.ts +4 -0
- package/src/securechannel/SecureChannelProtocol.ts +0 -4
- package/src/session/GroupSession.ts +1 -1
- package/src/session/InsecureSession.ts +3 -1
- package/src/session/NodeSession.ts +14 -4
- package/src/session/SessionManager.ts +1 -3
- package/src/session/case/CaseClient.ts +3 -2
- package/src/session/case/CaseServer.ts +1 -1
- package/src/session/pase/PaseMessages.ts +1 -1
package/src/mdns/MdnsScanner.ts
CHANGED
|
@@ -96,13 +96,12 @@ const START_ANNOUNCE_INTERVAL_SECONDS = 1.5;
|
|
|
96
96
|
/**
|
|
97
97
|
* Interface to add criteria for MDNS discovery a node is interested in
|
|
98
98
|
*
|
|
99
|
-
* This interface is used to define criteria for mDNS scanner targets.
|
|
100
|
-
*
|
|
101
|
-
* and
|
|
102
|
-
* and optional node IDs.
|
|
99
|
+
* This interface is used to define criteria for mDNS scanner targets. It includes the information if commissionable
|
|
100
|
+
* devices are relevant for the target and a list of operational targets. Operational targets can consist of operational
|
|
101
|
+
* IDs and optional node IDs.
|
|
103
102
|
*
|
|
104
|
-
* When no commissionable devices are relevant and no operational targets are defined, it is
|
|
105
|
-
*
|
|
103
|
+
* When no commissionable devices are relevant and no operational targets are defined, it is not required to add a
|
|
104
|
+
* criteria to the scanner.
|
|
106
105
|
*/
|
|
107
106
|
export interface MdnsScannerTargetCriteria {
|
|
108
107
|
/** Are commissionable MDNS records relevant? */
|
|
@@ -34,8 +34,8 @@ import { ControllerDiscovery, PairRetransmissionLimitReachedError } from "#peer/
|
|
|
34
34
|
import { ExchangeManager } from "#protocol/ExchangeManager.js";
|
|
35
35
|
import { DedicatedChannelExchangeProvider } from "#protocol/ExchangeProvider.js";
|
|
36
36
|
import { MessageChannel } from "#protocol/MessageChannel.js";
|
|
37
|
-
import { ChannelStatusResponseError } from "#securechannel/
|
|
38
|
-
import { PaseClient } from "#session/
|
|
37
|
+
import { ChannelStatusResponseError } from "#securechannel/SecureChannelMessenger.js";
|
|
38
|
+
import { PaseClient } from "#session/pase/PaseClient.js";
|
|
39
39
|
import { SessionManager } from "#session/SessionManager.js";
|
|
40
40
|
import { DiscoveryCapabilitiesBitmap, NodeId, SECURE_CHANNEL_PROTOCOL_ID, TypeFromPartialBitSchema } from "#types";
|
|
41
41
|
import { PeerAddress } from "./PeerAddress.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { X509Base } from "#certificate/
|
|
7
|
+
import { X509Base } from "#certificate/kinds/X509Base.js";
|
|
8
8
|
import { BasicInformation } from "#clusters/basic-information";
|
|
9
9
|
import { Descriptor } from "#clusters/descriptor";
|
|
10
10
|
import { GeneralCommissioning } from "#clusters/general-commissioning";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { DiscoveryData } from "#common/Scanner.js";
|
|
8
8
|
import { ServerAddressIp } from "#general";
|
|
9
|
-
import { PeerDataStore } from "#peer/PeerAddressStore.js";
|
|
9
|
+
import type { PeerDataStore } from "#peer/PeerAddressStore.js";
|
|
10
10
|
import { SessionParameters } from "#session/Session.js";
|
|
11
11
|
import { PeerAddress } from "./PeerAddress.js";
|
|
12
12
|
|
package/src/peer/PeerAddress.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { FabricIndex, NodeId } from "#types";
|
|
7
|
+
import { FabricIndex, GroupId, NodeId } from "#types";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This is the "logical" address of a peer node consisting of a fabric and node ID.
|
|
@@ -66,7 +66,7 @@ export namespace PeerAddress {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export function isGroup(address: PeerAddress): boolean {
|
|
69
|
-
return
|
|
69
|
+
return GroupId.isGroupNodeId(address.nodeId);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { Construction, MaybePromise } from "#general";
|
|
8
|
-
import { DecodedAttributeReportValue } from "#interaction/
|
|
8
|
+
import { DecodedAttributeReportValue } from "#interaction/AttributeDataDecoder.js";
|
|
9
9
|
import { AttributeId, ClusterId, EndpointNumber, EventNumber } from "#types";
|
|
10
10
|
import { OperationalPeer } from "./OperationalPeer.js";
|
|
11
11
|
import { PeerAddress } from "./PeerAddress.js";
|
package/src/peer/PeerSet.ts
CHANGED
|
@@ -33,12 +33,14 @@ import { SubscriptionClient } from "#interaction/SubscriptionClient.js";
|
|
|
33
33
|
import { MdnsScanner } from "#mdns/MdnsScanner.js";
|
|
34
34
|
import { PeerAddress, PeerAddressMap } from "#peer/PeerAddress.js";
|
|
35
35
|
import { ChannelManager } from "#protocol/ChannelManager.js";
|
|
36
|
-
import {
|
|
36
|
+
import { ExchangeManager } from "#protocol/ExchangeManager.js";
|
|
37
37
|
import { DedicatedChannelExchangeProvider, ReconnectableExchangeProvider } from "#protocol/ExchangeProvider.js";
|
|
38
|
-
import { MessageChannel } from "#protocol/MessageChannel.js";
|
|
38
|
+
import { ChannelNotConnectedError, MessageChannel } from "#protocol/MessageChannel.js";
|
|
39
39
|
import { MessageExchange, RetransmissionLimitReachedError } from "#protocol/MessageExchange.js";
|
|
40
|
-
import { ChannelStatusResponseError } from "#securechannel/
|
|
41
|
-
import { CaseClient
|
|
40
|
+
import { ChannelStatusResponseError } from "#securechannel/SecureChannelMessenger.js";
|
|
41
|
+
import { CaseClient } from "#session/case/CaseClient.js";
|
|
42
|
+
import { SecureSession } from "#session/SecureSession.js";
|
|
43
|
+
import { Session } from "#session/Session.js";
|
|
42
44
|
import { SessionManager } from "#session/SessionManager.js";
|
|
43
45
|
import { GroupId, NodeId, SECURE_CHANNEL_PROTOCOL_ID, SecureChannelStatusCode } from "#types";
|
|
44
46
|
import { ControllerDiscovery, DiscoveryError, PairRetransmissionLimitReachedError } from "./ControllerDiscovery.js";
|
|
@@ -4,16 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { AsyncObservable, Channel, Environment, Environmental, Logger
|
|
7
|
+
import { AsyncObservable, Channel, Environment, Environmental, Logger } from "#general";
|
|
8
8
|
import { PeerAddress, PeerAddressMap } from "#peer/PeerAddress.js";
|
|
9
9
|
import { MessageChannel } from "#protocol/MessageChannel.js";
|
|
10
|
-
import { NodeSession } from "#session/NodeSession.js";
|
|
10
|
+
import { NoChannelError, NodeSession } from "#session/NodeSession.js";
|
|
11
11
|
import { Session } from "#session/Session.js";
|
|
12
12
|
|
|
13
13
|
const logger = Logger.get("ChannelManager");
|
|
14
14
|
|
|
15
|
-
export class NoChannelError extends MatterError {}
|
|
16
|
-
|
|
17
15
|
export class ChannelManager {
|
|
18
16
|
readonly #channels = new PeerAddressMap<MessageChannel[]>();
|
|
19
17
|
readonly #paseChannels = new Map<Session, MessageChannel>();
|
|
@@ -20,7 +20,8 @@ import {
|
|
|
20
20
|
ObserverGroup,
|
|
21
21
|
} from "#general";
|
|
22
22
|
import { SecureChannelProtocol } from "#securechannel/SecureChannelProtocol.js";
|
|
23
|
-
import { PaseServer
|
|
23
|
+
import { PaseServer } from "#session/pase/PaseServer.js";
|
|
24
|
+
import { SessionManager } from "#session/SessionManager.js";
|
|
24
25
|
import { CommissioningOptions, StatusCode, StatusResponseError } from "#types";
|
|
25
26
|
import type { ControllerCommissioner } from "../peer/ControllerCommissioner.js";
|
|
26
27
|
import { DeviceAdvertiser } from "./DeviceAdvertiser.js";
|
|
@@ -162,9 +163,7 @@ export class DeviceCommissioner {
|
|
|
162
163
|
);
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
await failsafeContext.construction;
|
|
167
|
-
|
|
166
|
+
beginTimed(failsafeContext: FailsafeContext) {
|
|
168
167
|
this.#failsafeContext = failsafeContext;
|
|
169
168
|
|
|
170
169
|
this.#context.fabrics.events.added.on(fabric => {
|
|
@@ -246,10 +245,7 @@ export class DeviceCommissioner {
|
|
|
246
245
|
this.#activeDiscriminator = discriminator;
|
|
247
246
|
|
|
248
247
|
// MDNS is sent in parallel
|
|
249
|
-
|
|
250
|
-
this.#enterCommissioningMode(windowStatus, discriminator).catch(error =>
|
|
251
|
-
logger.warn("Error sending announcement:", error),
|
|
252
|
-
);
|
|
248
|
+
await this.#enterCommissioningMode(windowStatus, discriminator);
|
|
253
249
|
}
|
|
254
250
|
|
|
255
251
|
async endCommissioning() {
|
|
@@ -23,15 +23,19 @@ import {
|
|
|
23
23
|
UnexpectedDataError,
|
|
24
24
|
} from "#general";
|
|
25
25
|
import { PeerAddress } from "#peer/PeerAddress.js";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
ChannelNotConnectedError,
|
|
28
|
+
DEFAULT_EXPECTED_PROCESSING_TIME_MS,
|
|
29
|
+
MessageChannel,
|
|
30
|
+
} from "#protocol/MessageChannel.js";
|
|
27
31
|
import { SecureChannelMessenger } from "#securechannel/SecureChannelMessenger.js";
|
|
28
|
-
import {
|
|
32
|
+
import { UNICAST_UNSECURE_SESSION_ID } from "#session/InsecureSession.js";
|
|
29
33
|
import { NodeSession } from "#session/NodeSession.js";
|
|
30
34
|
import { Session } from "#session/Session.js";
|
|
31
|
-
import { SessionManager
|
|
35
|
+
import { SessionManager } from "#session/SessionManager.js";
|
|
32
36
|
import { NodeId, SECURE_CHANNEL_PROTOCOL_ID, SecureMessageType } from "#types";
|
|
33
37
|
import { ChannelManager } from "./ChannelManager.js";
|
|
34
|
-
import {
|
|
38
|
+
import { MessageExchange, MessageExchangeContext } from "./MessageExchange.js";
|
|
35
39
|
import { DuplicateMessageError } from "./MessageReceptionState.js";
|
|
36
40
|
import { ProtocolHandler } from "./ProtocolHandler.js";
|
|
37
41
|
|
|
@@ -39,8 +43,6 @@ const logger = Logger.get("ExchangeManager");
|
|
|
39
43
|
|
|
40
44
|
const MAXIMUM_CONCURRENT_EXCHANGES_PER_SESSION = 5;
|
|
41
45
|
|
|
42
|
-
export class ChannelNotConnectedError extends MatterError {}
|
|
43
|
-
|
|
44
46
|
/**
|
|
45
47
|
* Interfaces {@link ExchangeManager} with other components.
|
|
46
48
|
*/
|
|
@@ -217,7 +219,7 @@ export class ExchangeManager {
|
|
|
217
219
|
exchange = undefined;
|
|
218
220
|
}
|
|
219
221
|
|
|
220
|
-
const isStandaloneAck =
|
|
222
|
+
const isStandaloneAck = SecureMessageType.isStandaloneAck(
|
|
221
223
|
message.payloadHeader.protocolId,
|
|
222
224
|
message.payloadHeader.messageType,
|
|
223
225
|
);
|
|
@@ -6,9 +6,13 @@
|
|
|
6
6
|
import { ChannelType, Observable } from "#general";
|
|
7
7
|
import { PeerAddress } from "#peer/PeerAddress.js";
|
|
8
8
|
import { ChannelManager } from "#protocol/ChannelManager.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { ExchangeManager } from "#protocol/ExchangeManager.js";
|
|
10
|
+
import {
|
|
11
|
+
ChannelNotConnectedError,
|
|
12
|
+
DEFAULT_EXPECTED_PROCESSING_TIME_MS,
|
|
13
|
+
MessageChannel,
|
|
14
|
+
} from "#protocol/MessageChannel.js";
|
|
15
|
+
import { MessageExchange } from "#protocol/MessageExchange.js";
|
|
12
16
|
import { ProtocolHandler } from "#protocol/ProtocolHandler.js";
|
|
13
17
|
import { Session } from "#session/Session.js";
|
|
14
18
|
import { INTERACTION_PROTOCOL_ID } from "#types";
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Message, MessageCodec } from "#codec/MessageCodec.js";
|
|
8
|
+
import { Channel, Logger, MatterError, MatterFlowError } from "#general";
|
|
9
|
+
import type { ExchangeLogContext } from "#protocol/MessageExchange.js";
|
|
10
|
+
import { Session, SessionParameters } from "#session/Session.js";
|
|
5
11
|
|
|
6
12
|
const logger = new Logger("MessageChannel");
|
|
7
13
|
|
|
14
|
+
export class ChannelNotConnectedError extends MatterError {}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Default expected processing time for a messages in milliseconds. The value is derived from kExpectedIMProcessingTime
|
|
18
|
+
* from chip implementation. This is basically the default used with different names, also kExpectedLowProcessingTime or
|
|
19
|
+
* kExpectedSigma1ProcessingTime.
|
|
20
|
+
*/
|
|
21
|
+
export const DEFAULT_EXPECTED_PROCESSING_TIME_MS = 2000;
|
|
22
|
+
|
|
8
23
|
/**
|
|
9
24
|
* The buffer time in milliseconds to add to the peer response time to also consider network delays and other factors.
|
|
10
25
|
* TODO: This is a pure guess and should be adjusted in the future.
|
|
@@ -19,8 +19,12 @@ import {
|
|
|
19
19
|
Time,
|
|
20
20
|
Timer,
|
|
21
21
|
} from "#general";
|
|
22
|
-
import {
|
|
23
|
-
|
|
22
|
+
import {
|
|
23
|
+
ChannelNotConnectedError,
|
|
24
|
+
DEFAULT_EXPECTED_PROCESSING_TIME_MS,
|
|
25
|
+
MessageChannel,
|
|
26
|
+
MRP,
|
|
27
|
+
} from "#protocol/MessageChannel.js";
|
|
24
28
|
import { GroupSession } from "#session/GroupSession.js";
|
|
25
29
|
import {
|
|
26
30
|
SESSION_ACTIVE_INTERVAL_MS,
|
|
@@ -36,7 +40,6 @@ import {
|
|
|
36
40
|
StatusCode,
|
|
37
41
|
StatusResponseError,
|
|
38
42
|
} from "#types";
|
|
39
|
-
import { ChannelNotConnectedError } from "./ExchangeManager.js";
|
|
40
43
|
|
|
41
44
|
const logger = Logger.get("MessageExchange");
|
|
42
45
|
|
|
@@ -87,13 +90,6 @@ export type ExchangeSendOptions = {
|
|
|
87
90
|
logContext?: ExchangeLogContext;
|
|
88
91
|
};
|
|
89
92
|
|
|
90
|
-
/**
|
|
91
|
-
* Default expected processing time for a messages in milliseconds. The value is derived from kExpectedIMProcessingTime
|
|
92
|
-
* from chip implementation. This is basically the default used with different names, also kExpectedLowProcessingTime or
|
|
93
|
-
* kExpectedSigma1ProcessingTime.
|
|
94
|
-
*/
|
|
95
|
-
export const DEFAULT_EXPECTED_PROCESSING_TIME_MS = 2_000;
|
|
96
|
-
|
|
97
93
|
/**
|
|
98
94
|
* Message size overhead of a Matter message:
|
|
99
95
|
* 26 (Matter Message Header) + 12 (Matter Payload Header) taken from https://github.com/project-chip/connectedhomeip/blob/2d97cda23024e72f36216900ca667bf1a0d9499f/src/system/SystemConfig.h#L327
|
|
@@ -285,7 +281,7 @@ export class MessageExchange {
|
|
|
285
281
|
payloadHeader: { requiresAck, ackedMessageId, protocolId, messageType },
|
|
286
282
|
} = message;
|
|
287
283
|
|
|
288
|
-
const isStandaloneAck =
|
|
284
|
+
const isStandaloneAck = SecureMessageType.isStandaloneAck(protocolId, messageType);
|
|
289
285
|
if (protocolId !== this.#protocolId && !isStandaloneAck) {
|
|
290
286
|
throw new MatterFlowError(
|
|
291
287
|
`Drop received a message for an unexpected protocol. Expected: ${this.#protocolId}, received: ${protocolId}`,
|
|
@@ -468,7 +464,7 @@ export class MessageExchange {
|
|
|
468
464
|
const {
|
|
469
465
|
payloadHeader: { protocolId, messageType },
|
|
470
466
|
} = responseMessage;
|
|
471
|
-
if (expectAckOnly && !
|
|
467
|
+
if (expectAckOnly && !SecureMessageType.isStandaloneAck(protocolId, messageType)) {
|
|
472
468
|
throw new UnexpectedMessageError("Expected ack only", responseMessage);
|
|
473
469
|
}
|
|
474
470
|
}
|
|
@@ -60,6 +60,7 @@ export class SecureChannelMessenger {
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Waits for the next message and returns it.
|
|
63
|
+
*
|
|
63
64
|
* When no expectedProcessingTimeMs is provided, the default value of EXPECTED_CRYPTO_PROCESSING_TIME_MS is used.
|
|
64
65
|
*/
|
|
65
66
|
async #nextMessage(
|
|
@@ -82,6 +83,7 @@ export class SecureChannelMessenger {
|
|
|
82
83
|
|
|
83
84
|
/**
|
|
84
85
|
* Waits for the next message and decodes it.
|
|
86
|
+
*
|
|
85
87
|
* When no expectedProcessingTimeMs is provided, the default value of EXPECTED_CRYPTO_PROCESSING_TIME_MS is used.
|
|
86
88
|
*/
|
|
87
89
|
async nextMessageDecoded<T>(
|
|
@@ -94,6 +96,7 @@ export class SecureChannelMessenger {
|
|
|
94
96
|
|
|
95
97
|
/**
|
|
96
98
|
* Waits for the next message and returns it.
|
|
99
|
+
*
|
|
97
100
|
* When no expectedProcessingTimeMs is provided, the default value of EXPECTED_CRYPTO_PROCESSING_TIME_MS is used.
|
|
98
101
|
*/
|
|
99
102
|
async waitForSuccess(
|
|
@@ -106,6 +109,7 @@ export class SecureChannelMessenger {
|
|
|
106
109
|
|
|
107
110
|
/**
|
|
108
111
|
* Sends a message of the given type with the given payload.
|
|
112
|
+
*
|
|
109
113
|
* If no ExchangeSendOptions are provided, the expectedProcessingTimeMs will be set to
|
|
110
114
|
* EXPECTED_CRYPTO_PROCESSING_TIME_MS.
|
|
111
115
|
*/
|
|
@@ -150,8 +150,4 @@ export class SecureChannelProtocol extends StatusReportOnlySecureChannelProtocol
|
|
|
150
150
|
await super.onNewExchange(exchange, message);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
static isStandaloneAck(protocolId: number, messageType: number) {
|
|
155
|
-
return protocolId === SECURE_CHANNEL_PROTOCOL_ID && messageType === SecureMessageType.StandaloneAck;
|
|
156
|
-
}
|
|
157
153
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { Subject } from "#action/server/Subject.js";
|
|
7
|
-
import { DecodedMessage, DecodedPacket, Message, MessageCodec, Packet, SessionType } from "#codec/
|
|
7
|
+
import { DecodedMessage, DecodedPacket, Message, MessageCodec, Packet, SessionType } from "#codec/MessageCodec.js";
|
|
8
8
|
import { Fabric } from "#fabric/Fabric.js";
|
|
9
9
|
import { FabricManager } from "#fabric/FabricManager.js";
|
|
10
10
|
import {
|
|
@@ -12,10 +12,12 @@ import { MessageCounter } from "../protocol/MessageCounter.js";
|
|
|
12
12
|
import { MessageReceptionStateUnencryptedWithRollover } from "../protocol/MessageReceptionState.js";
|
|
13
13
|
import { NoAssociatedFabricError } from "./NodeSession.js";
|
|
14
14
|
import { Session, SessionParameterOptions } from "./Session.js";
|
|
15
|
-
import { SessionManager
|
|
15
|
+
import type { SessionManager } from "./SessionManager.js";
|
|
16
16
|
|
|
17
17
|
const logger = Logger.get("InsecureSession");
|
|
18
18
|
|
|
19
|
+
export const UNICAST_UNSECURE_SESSION_ID = 0x0000;
|
|
20
|
+
|
|
19
21
|
export class InsecureSession extends Session {
|
|
20
22
|
readonly #initiatorNodeId: NodeId;
|
|
21
23
|
readonly closingAfterExchangeFinished = false;
|
|
@@ -7,22 +7,32 @@
|
|
|
7
7
|
import { Subject } from "#action/server/Subject.js";
|
|
8
8
|
import { DecodedMessage, DecodedPacket, Message, MessageCodec, Packet, SessionType } from "#codec/MessageCodec.js";
|
|
9
9
|
import { Fabric } from "#fabric/Fabric.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
10
|
+
import {
|
|
11
|
+
BasicSet,
|
|
12
|
+
Bytes,
|
|
13
|
+
CRYPTO_SYMMETRIC_KEY_LENGTH,
|
|
14
|
+
Crypto,
|
|
15
|
+
Diagnostic,
|
|
16
|
+
Logger,
|
|
17
|
+
MatterError,
|
|
18
|
+
MatterFlowError,
|
|
19
|
+
} from "#general";
|
|
20
|
+
import type { Subscription } from "#interaction/Subscription.js";
|
|
12
21
|
import { PeerAddress } from "#peer/PeerAddress.js";
|
|
13
|
-
import { NoChannelError } from "#protocol/ChannelManager.js";
|
|
14
22
|
import { MessageCounter } from "#protocol/MessageCounter.js";
|
|
15
23
|
import { MessageReceptionStateEncryptedWithoutRollover } from "#protocol/MessageReceptionState.js";
|
|
16
24
|
import { CaseAuthenticatedTag, FabricIndex, NodeId, StatusCode, StatusResponseError } from "#types";
|
|
17
25
|
import { SecureSession } from "./SecureSession.js";
|
|
18
26
|
import { Session, SessionParameterOptions } from "./Session.js";
|
|
19
|
-
import {
|
|
27
|
+
import type { SessionManager } from "./SessionManager.js";
|
|
20
28
|
|
|
21
29
|
const logger = Logger.get("SecureSession");
|
|
22
30
|
|
|
23
31
|
const SESSION_KEYS_INFO = Bytes.fromString("SessionKeys");
|
|
24
32
|
const SESSION_RESUMPTION_KEYS_INFO = Bytes.fromString("SessionResumptionKeys");
|
|
25
33
|
|
|
34
|
+
export class NoChannelError extends MatterError {}
|
|
35
|
+
|
|
26
36
|
export class NoAssociatedFabricError extends StatusResponseError {
|
|
27
37
|
constructor(message: string) {
|
|
28
38
|
super(message, StatusCode.UnsupportedAccess);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { DecodedPacket } from "#codec/
|
|
7
|
+
import { DecodedPacket } from "#codec/MessageCodec.js";
|
|
8
8
|
import { FabricManager } from "#fabric/FabricManager.js";
|
|
9
9
|
import {
|
|
10
10
|
BasicSet,
|
|
@@ -62,8 +62,6 @@ const DEFAULT_SESSION_PARAMETERS = {
|
|
|
62
62
|
maxTcpMessageSize: FALLBACK_MAX_TCP_MESSAGE_SIZE,
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
export const UNICAST_UNSECURE_SESSION_ID = 0x0000;
|
|
66
|
-
|
|
67
65
|
export interface ResumptionRecord {
|
|
68
66
|
sharedSecret: Uint8Array;
|
|
69
67
|
resumptionId: Uint8Array;
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Icac
|
|
7
|
+
import { Icac } from "#certificate/kinds/Icac.js";
|
|
8
|
+
import { Noc } from "#certificate/kinds/Noc.js";
|
|
8
9
|
import { Bytes, Logger, PublicKey, UnexpectedDataError } from "#general";
|
|
9
|
-
import { ChannelStatusResponseError } from "#securechannel/
|
|
10
|
+
import { ChannelStatusResponseError } from "#securechannel/SecureChannelMessenger.js";
|
|
10
11
|
import { SessionManager } from "#session/SessionManager.js";
|
|
11
12
|
import { NodeId, SecureChannelStatusCode } from "#types";
|
|
12
13
|
import { Fabric } from "../../fabric/Fabric.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Noc } from "#certificate/
|
|
7
|
+
import { Noc } from "#certificate/kinds/Noc.js";
|
|
8
8
|
import { Bytes, Crypto, CryptoDecryptError, Logger, PublicKey, UnexpectedDataError } from "#general";
|
|
9
9
|
import { TlvSessionParameters } from "#session/pase/PaseMessages.js";
|
|
10
10
|
import { ResumptionRecord, SessionManager } from "#session/SessionManager.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { SupportedTransportsBitmap } from "#common/
|
|
7
|
+
import { SupportedTransportsBitmap } from "#common/Scanner.js";
|
|
8
8
|
import { CRYPTO_HASH_LEN_BYTES, CRYPTO_PUBLIC_KEY_SIZE_BYTES } from "#general";
|
|
9
9
|
import {
|
|
10
10
|
TlvBitmap,
|