-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathOperationalCredentialsOverrides.ts
More file actions
45 lines (40 loc) · 1.19 KB
/
OperationalCredentialsOverrides.ts
File metadata and controls
45 lines (40 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* @license
* Copyright 2022-2026 Matter.js Authors
* SPDX-License-Identifier: Apache-2.0
*/
import { LocalMatter } from "../local.js";
LocalMatter.children.push({
tag: "cluster",
name: "OperationalCredentials",
children: [
// Spec-Wise it is an uint8 becauae 0 is officially no valid FabricIndex.
// Our FabricIndex type allows that
{
tag: "attribute",
id: 0x5,
name: "CurrentFabricIndex",
type: "fabric-idx",
},
// Spec helpfully defines max length as RESP_MAX for these guys;
// hard-coding as a constant
{
tag: "command",
name: "AttestationResponse",
id: 0x1,
children: [{ tag: "field", id: 0x0, name: "AttestationElements", constraint: { max: 900 } }],
},
{
tag: "command",
name: "CsrResponse",
id: 0x5,
children: [{ tag: "field", id: 0x0, name: "NocsrElements", constraint: { max: 900 } }],
},
// Specs seems to have a weird name, we use a better one
{
tag: "attribute",
id: 0,
name: "Nocs",
},
],
});