@matter/types 0.16.0-alpha.0-20250809-ee8375bcb → 0.16.0-alpha.0-20250812-285b75d83
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/commissioning/CommissioningConstants.d.ts +2 -3
- package/dist/cjs/commissioning/CommissioningConstants.d.ts.map +1 -1
- package/dist/cjs/commissioning/CommissioningConstants.js +4 -6
- package/dist/cjs/commissioning/CommissioningConstants.js.map +1 -1
- package/dist/cjs/commissioning/CommissioningOptions.d.ts +6 -0
- package/dist/cjs/commissioning/CommissioningOptions.d.ts.map +1 -1
- package/dist/cjs/protocol/definitions/bdx.d.ts +87 -0
- package/dist/cjs/protocol/definitions/bdx.d.ts.map +1 -0
- package/dist/cjs/protocol/definitions/bdx.js +64 -0
- package/dist/cjs/protocol/definitions/bdx.js.map +6 -0
- package/dist/cjs/protocol/definitions/index.d.ts +1 -0
- package/dist/cjs/protocol/definitions/index.d.ts.map +1 -1
- package/dist/cjs/protocol/definitions/index.js +1 -0
- package/dist/cjs/protocol/definitions/index.js.map +1 -1
- package/dist/esm/commissioning/CommissioningConstants.d.ts +2 -3
- package/dist/esm/commissioning/CommissioningConstants.d.ts.map +1 -1
- package/dist/esm/commissioning/CommissioningConstants.js +4 -6
- package/dist/esm/commissioning/CommissioningConstants.js.map +1 -1
- package/dist/esm/commissioning/CommissioningOptions.d.ts +6 -0
- package/dist/esm/commissioning/CommissioningOptions.d.ts.map +1 -1
- package/dist/esm/protocol/definitions/bdx.d.ts +87 -0
- package/dist/esm/protocol/definitions/bdx.d.ts.map +1 -0
- package/dist/esm/protocol/definitions/bdx.js +44 -0
- package/dist/esm/protocol/definitions/bdx.js.map +6 -0
- package/dist/esm/protocol/definitions/index.d.ts +1 -0
- package/dist/esm/protocol/definitions/index.d.ts.map +1 -1
- package/dist/esm/protocol/definitions/index.js +1 -0
- package/dist/esm/protocol/definitions/index.js.map +1 -1
- package/package.json +5 -5
- package/src/commissioning/CommissioningConstants.ts +3 -4
- package/src/commissioning/CommissioningOptions.ts +7 -0
- package/src/protocol/definitions/bdx.ts +104 -0
- package/src/protocol/definitions/index.ts +1 -0
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright 2022-2025 Matter.js Authors
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export declare const MAXIMUM_COMMISSIONING_TIMEOUT_S: number;
|
|
7
6
|
export declare const MINIMUM_COMMISSIONING_TIMEOUT_S: number;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
7
|
+
export declare const STANDARD_COMMISSIONING_TIMEOUT_S: number;
|
|
8
|
+
export declare const MAXIMUM_COMMISSIONING_TIMEOUT_S: number;
|
|
10
9
|
export declare const PAKE_PASSCODE_VERIFIER_LENGTH: number;
|
|
11
10
|
//# sourceMappingURL=CommissioningConstants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommissioningConstants.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningConstants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"CommissioningConstants.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningConstants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,+BAA+B,QAAS,CAAC;AACtD,eAAO,MAAM,gCAAgC,QAAU,CAAC;AACxD,eAAO,MAAM,+BAA+B,QAAe,CAAC;AAE5D,eAAO,MAAM,6BAA6B,QAAyD,CAAC"}
|
|
@@ -18,11 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var CommissioningConstants_exports = {};
|
|
20
20
|
__export(CommissioningConstants_exports, {
|
|
21
|
-
DEVICE_ANNOUNCEMENT_DURATION_MS: () => DEVICE_ANNOUNCEMENT_DURATION_MS,
|
|
22
|
-
DEVICE_ANNOUNCEMENT_INTERVAL_MS: () => DEVICE_ANNOUNCEMENT_INTERVAL_MS,
|
|
23
21
|
MAXIMUM_COMMISSIONING_TIMEOUT_S: () => MAXIMUM_COMMISSIONING_TIMEOUT_S,
|
|
24
22
|
MINIMUM_COMMISSIONING_TIMEOUT_S: () => MINIMUM_COMMISSIONING_TIMEOUT_S,
|
|
25
|
-
PAKE_PASSCODE_VERIFIER_LENGTH: () => PAKE_PASSCODE_VERIFIER_LENGTH
|
|
23
|
+
PAKE_PASSCODE_VERIFIER_LENGTH: () => PAKE_PASSCODE_VERIFIER_LENGTH,
|
|
24
|
+
STANDARD_COMMISSIONING_TIMEOUT_S: () => STANDARD_COMMISSIONING_TIMEOUT_S
|
|
26
25
|
});
|
|
27
26
|
module.exports = __toCommonJS(CommissioningConstants_exports);
|
|
28
27
|
var import_general = require("#general");
|
|
@@ -31,9 +30,8 @@ var import_general = require("#general");
|
|
|
31
30
|
* Copyright 2022-2025 Matter.js Authors
|
|
32
31
|
* SPDX-License-Identifier: Apache-2.0
|
|
33
32
|
*/
|
|
34
|
-
const MAXIMUM_COMMISSIONING_TIMEOUT_S = 15 * 60;
|
|
35
33
|
const MINIMUM_COMMISSIONING_TIMEOUT_S = 3 * 60;
|
|
36
|
-
const
|
|
37
|
-
const
|
|
34
|
+
const STANDARD_COMMISSIONING_TIMEOUT_S = 15 * 60;
|
|
35
|
+
const MAXIMUM_COMMISSIONING_TIMEOUT_S = 48 * 60 * 60;
|
|
38
36
|
const PAKE_PASSCODE_VERIFIER_LENGTH = import_general.CRYPTO_GROUP_SIZE_BYTES + import_general.CRYPTO_PUBLIC_KEY_SIZE_BYTES;
|
|
39
37
|
//# sourceMappingURL=CommissioningConstants.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/commissioning/CommissioningConstants.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,qBAAsE;AANtE;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,kCAAkC,IAAI;AAC5C,MAAM,mCAAmC,KAAK;AAC9C,MAAM,kCAAkC,KAAK,KAAK;AAElD,MAAM,gCAAgC,yCAA0B;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -39,6 +39,12 @@ export declare namespace CommissioningOptions {
|
|
|
39
39
|
* Vendor-specific BLE advertisement data.
|
|
40
40
|
*/
|
|
41
41
|
readonly additionalBleAdvertisementData?: Uint8Array;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum time to advdertise. Must be > 3 minutes and < 48 hours.
|
|
44
|
+
*
|
|
45
|
+
* Defaults to 15 minutes.
|
|
46
|
+
*/
|
|
47
|
+
readonly advertisementWindowS?: number;
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
//# sourceMappingURL=CommissioningOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommissioningOptions.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningOptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC;CAAG;AAE5F,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,mBAAmB,UAE/B,CAAC;IAEF,UAAiB,aAAa;QAC1B;;;;WAIG;QACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QAEhD;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAE/B;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;QAEzC;;WAEG;QACH,QAAQ,CAAC,8BAA8B,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"CommissioningOptions.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningOptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC;CAAG;AAE5F,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,mBAAmB,UAE/B,CAAC;IAEF,UAAiB,aAAa;QAC1B;;;;WAIG;QACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QAEhD;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAE/B;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;QAEzC;;WAEG;QACH,QAAQ,CAAC,8BAA8B,CAAC,EAAE,UAAU,CAAC;QAErD;;;;WAIG;QACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC1C;CACJ"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const BDX_PROTOCOL_ID = 2;
|
|
7
|
+
export declare enum BdxMessageTypes {
|
|
8
|
+
SendInit = 1,
|
|
9
|
+
SendAccept = 2,
|
|
10
|
+
ReceiveInit = 4,
|
|
11
|
+
ReceiveAccept = 5,
|
|
12
|
+
BlockQuery = 16,
|
|
13
|
+
Block = 17,
|
|
14
|
+
BlockEof = 18,
|
|
15
|
+
BlockAck = 19,
|
|
16
|
+
BlockAckEof = 20,
|
|
17
|
+
BlockQueryWithSkip = 21
|
|
18
|
+
}
|
|
19
|
+
export declare enum BdxStatusCode {
|
|
20
|
+
/**
|
|
21
|
+
* Success.
|
|
22
|
+
*/
|
|
23
|
+
Success = 0,
|
|
24
|
+
/**
|
|
25
|
+
* Definite length too large to support.
|
|
26
|
+
* For example, trying to SendInit with too large of a file.
|
|
27
|
+
*/
|
|
28
|
+
LengthTooLarge = 18,
|
|
29
|
+
/**
|
|
30
|
+
* Definite length proposed for transfer is too short for the context based on the responder’s knowledge of
|
|
31
|
+
* expected size.
|
|
32
|
+
*/
|
|
33
|
+
LengthTooShort = 19,
|
|
34
|
+
/**
|
|
35
|
+
* Pre-negotiated size of transfer was not fulfilled prior to BlockAckEOF.
|
|
36
|
+
*/
|
|
37
|
+
LengthMismatch = 20,
|
|
38
|
+
/**
|
|
39
|
+
* Responder can only support proposed transfer if definite length is provided.
|
|
40
|
+
*/
|
|
41
|
+
LengthRequired = 21,
|
|
42
|
+
/**
|
|
43
|
+
* Received a malformed protocol message.
|
|
44
|
+
*/
|
|
45
|
+
BadMessageContent = 22,
|
|
46
|
+
/**
|
|
47
|
+
* Received block counter out of order from expectation.
|
|
48
|
+
*/
|
|
49
|
+
BadBlockCounter = 23,
|
|
50
|
+
/**
|
|
51
|
+
* Received a well-formed message that was contextually inappropriate for the current state of the transfer.
|
|
52
|
+
*/
|
|
53
|
+
UnexpectedMessage = 24,
|
|
54
|
+
/**
|
|
55
|
+
* Responder is too busy to proceed with a new transfer at this moment.
|
|
56
|
+
*/
|
|
57
|
+
ResponderBusy = 25,
|
|
58
|
+
/**
|
|
59
|
+
* Other error occurred, such as perhaps an input/output error occurring at one of the peers.
|
|
60
|
+
*/
|
|
61
|
+
TransferFailedUnknownError = 31,
|
|
62
|
+
/**
|
|
63
|
+
* Received a message that mismatches the current transfer mode.
|
|
64
|
+
*/
|
|
65
|
+
TransferMethodNotSupported = 80,
|
|
66
|
+
/**
|
|
67
|
+
* Attempted to request a file whose designator is unknown to the responder.
|
|
68
|
+
*/
|
|
69
|
+
FileDesignatorUnknown = 81,
|
|
70
|
+
/**
|
|
71
|
+
* Proposed transfer with explicit start offset is not supported in current context.
|
|
72
|
+
*/
|
|
73
|
+
StartOffsetNotSupported = 82,
|
|
74
|
+
/**
|
|
75
|
+
* Could not find a common supported version between initiator and responder.
|
|
76
|
+
*/
|
|
77
|
+
VersionNotSupported = 83,
|
|
78
|
+
/**
|
|
79
|
+
* Other unexpected error.
|
|
80
|
+
*/
|
|
81
|
+
Unknown = 95,
|
|
82
|
+
/**
|
|
83
|
+
* No additional error details available.
|
|
84
|
+
*/
|
|
85
|
+
GeneralError = 65535
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=bdx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bdx.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/bdx.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,oBAAY,eAAe;IACvB,QAAQ,IAAO;IACf,UAAU,IAAO;IACjB,WAAW,IAAO;IAClB,aAAa,IAAO;IACpB,UAAU,KAAO;IACjB,KAAK,KAAO;IACZ,QAAQ,KAAO;IACf,QAAQ,KAAO;IACf,WAAW,KAAO;IAClB,kBAAkB,KAAO;CAC5B;AAED,oBAAY,aAAa;IACrB;;OAEG;IACH,OAAO,IAAO;IAEd;;;OAGG;IACH,cAAc,KAAO;IAErB;;;OAGG;IACH,cAAc,KAAO;IAErB;;OAEG;IACH,cAAc,KAAO;IAErB;;OAEG;IACH,cAAc,KAAO;IAErB;;OAEG;IACH,iBAAiB,KAAO;IAExB;;OAEG;IACH,eAAe,KAAO;IAEtB;;OAEG;IACH,iBAAiB,KAAO;IAExB;;OAEG;IACH,aAAa,KAAO;IAEpB;;OAEG;IACH,0BAA0B,KAAO;IAEjC;;OAEG;IACH,0BAA0B,KAAO;IAEjC;;OAEG;IACH,qBAAqB,KAAO;IAE5B;;OAEG;IACH,uBAAuB,KAAO;IAE9B;;OAEG;IACH,mBAAmB,KAAO;IAE1B;;OAEG;IACH,OAAO,KAAO;IAEd;;OAEG;IACH,YAAY,QAAS;CACxB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 bdx_exports = {};
|
|
20
|
+
__export(bdx_exports, {
|
|
21
|
+
BDX_PROTOCOL_ID: () => BDX_PROTOCOL_ID,
|
|
22
|
+
BdxMessageTypes: () => BdxMessageTypes,
|
|
23
|
+
BdxStatusCode: () => BdxStatusCode
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(bdx_exports);
|
|
26
|
+
/**
|
|
27
|
+
* @license
|
|
28
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
29
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
30
|
+
*/
|
|
31
|
+
const BDX_PROTOCOL_ID = 2;
|
|
32
|
+
var BdxMessageTypes = /* @__PURE__ */ ((BdxMessageTypes2) => {
|
|
33
|
+
BdxMessageTypes2[BdxMessageTypes2["SendInit"] = 1] = "SendInit";
|
|
34
|
+
BdxMessageTypes2[BdxMessageTypes2["SendAccept"] = 2] = "SendAccept";
|
|
35
|
+
BdxMessageTypes2[BdxMessageTypes2["ReceiveInit"] = 4] = "ReceiveInit";
|
|
36
|
+
BdxMessageTypes2[BdxMessageTypes2["ReceiveAccept"] = 5] = "ReceiveAccept";
|
|
37
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockQuery"] = 16] = "BlockQuery";
|
|
38
|
+
BdxMessageTypes2[BdxMessageTypes2["Block"] = 17] = "Block";
|
|
39
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockEof"] = 18] = "BlockEof";
|
|
40
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockAck"] = 19] = "BlockAck";
|
|
41
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockAckEof"] = 20] = "BlockAckEof";
|
|
42
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockQueryWithSkip"] = 21] = "BlockQueryWithSkip";
|
|
43
|
+
return BdxMessageTypes2;
|
|
44
|
+
})(BdxMessageTypes || {});
|
|
45
|
+
var BdxStatusCode = /* @__PURE__ */ ((BdxStatusCode2) => {
|
|
46
|
+
BdxStatusCode2[BdxStatusCode2["Success"] = 0] = "Success";
|
|
47
|
+
BdxStatusCode2[BdxStatusCode2["LengthTooLarge"] = 18] = "LengthTooLarge";
|
|
48
|
+
BdxStatusCode2[BdxStatusCode2["LengthTooShort"] = 19] = "LengthTooShort";
|
|
49
|
+
BdxStatusCode2[BdxStatusCode2["LengthMismatch"] = 20] = "LengthMismatch";
|
|
50
|
+
BdxStatusCode2[BdxStatusCode2["LengthRequired"] = 21] = "LengthRequired";
|
|
51
|
+
BdxStatusCode2[BdxStatusCode2["BadMessageContent"] = 22] = "BadMessageContent";
|
|
52
|
+
BdxStatusCode2[BdxStatusCode2["BadBlockCounter"] = 23] = "BadBlockCounter";
|
|
53
|
+
BdxStatusCode2[BdxStatusCode2["UnexpectedMessage"] = 24] = "UnexpectedMessage";
|
|
54
|
+
BdxStatusCode2[BdxStatusCode2["ResponderBusy"] = 25] = "ResponderBusy";
|
|
55
|
+
BdxStatusCode2[BdxStatusCode2["TransferFailedUnknownError"] = 31] = "TransferFailedUnknownError";
|
|
56
|
+
BdxStatusCode2[BdxStatusCode2["TransferMethodNotSupported"] = 80] = "TransferMethodNotSupported";
|
|
57
|
+
BdxStatusCode2[BdxStatusCode2["FileDesignatorUnknown"] = 81] = "FileDesignatorUnknown";
|
|
58
|
+
BdxStatusCode2[BdxStatusCode2["StartOffsetNotSupported"] = 82] = "StartOffsetNotSupported";
|
|
59
|
+
BdxStatusCode2[BdxStatusCode2["VersionNotSupported"] = 83] = "VersionNotSupported";
|
|
60
|
+
BdxStatusCode2[BdxStatusCode2["Unknown"] = 95] = "Unknown";
|
|
61
|
+
BdxStatusCode2[BdxStatusCode2["GeneralError"] = 65535] = "GeneralError";
|
|
62
|
+
return BdxStatusCode2;
|
|
63
|
+
})(BdxStatusCode || {});
|
|
64
|
+
//# sourceMappingURL=bdx.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/protocol/definitions/bdx.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,kBAAkB;AAExB,IAAK,kBAAL,kBAAKA,qBAAL;AACH,EAAAA,kCAAA,cAAW,KAAX;AACA,EAAAA,kCAAA,gBAAa,KAAb;AACA,EAAAA,kCAAA,iBAAc,KAAd;AACA,EAAAA,kCAAA,mBAAgB,KAAhB;AACA,EAAAA,kCAAA,gBAAa,MAAb;AACA,EAAAA,kCAAA,WAAQ,MAAR;AACA,EAAAA,kCAAA,cAAW,MAAX;AACA,EAAAA,kCAAA,cAAW,MAAX;AACA,EAAAA,kCAAA,iBAAc,MAAd;AACA,EAAAA,kCAAA,wBAAqB,MAArB;AAVQ,SAAAA;AAAA,GAAA;AAaL,IAAK,gBAAL,kBAAKC,mBAAL;AAIH,EAAAA,8BAAA,aAAU,KAAV;AAMA,EAAAA,8BAAA,oBAAiB,MAAjB;AAMA,EAAAA,8BAAA,oBAAiB,MAAjB;AAKA,EAAAA,8BAAA,oBAAiB,MAAjB;AAKA,EAAAA,8BAAA,oBAAiB,MAAjB;AAKA,EAAAA,8BAAA,uBAAoB,MAApB;AAKA,EAAAA,8BAAA,qBAAkB,MAAlB;AAKA,EAAAA,8BAAA,uBAAoB,MAApB;AAKA,EAAAA,8BAAA,mBAAgB,MAAhB;AAKA,EAAAA,8BAAA,gCAA6B,MAA7B;AAKA,EAAAA,8BAAA,gCAA6B,MAA7B;AAKA,EAAAA,8BAAA,2BAAwB,MAAxB;AAKA,EAAAA,8BAAA,6BAA0B,MAA1B;AAKA,EAAAA,8BAAA,yBAAsB,MAAtB;AAKA,EAAAA,8BAAA,aAAU,MAAV;AAKA,EAAAA,8BAAA,kBAAe,SAAf;AAjFQ,SAAAA;AAAA,GAAA;",
|
|
5
|
+
"names": ["BdxMessageTypes", "BdxStatusCode"]
|
|
6
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -15,6 +15,7 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
15
15
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
16
|
var definitions_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(definitions_exports);
|
|
18
|
+
__reExport(definitions_exports, require("./bdx.js"), module.exports);
|
|
18
19
|
__reExport(definitions_exports, require("./general.js"), module.exports);
|
|
19
20
|
__reExport(definitions_exports, require("./interaction.js"), module.exports);
|
|
20
21
|
__reExport(definitions_exports, require("./secure-channel.js"), module.exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/protocol/definitions/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAMA,gCAAc,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAMA,gCAAc,qBANd;AAOA,gCAAc,yBAPd;AAQA,gCAAc,6BARd;AASA,gCAAc,gCATd;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright 2022-2025 Matter.js Authors
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export declare const MAXIMUM_COMMISSIONING_TIMEOUT_S: number;
|
|
7
6
|
export declare const MINIMUM_COMMISSIONING_TIMEOUT_S: number;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
7
|
+
export declare const STANDARD_COMMISSIONING_TIMEOUT_S: number;
|
|
8
|
+
export declare const MAXIMUM_COMMISSIONING_TIMEOUT_S: number;
|
|
10
9
|
export declare const PAKE_PASSCODE_VERIFIER_LENGTH: number;
|
|
11
10
|
//# sourceMappingURL=CommissioningConstants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommissioningConstants.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningConstants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"CommissioningConstants.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningConstants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,+BAA+B,QAAS,CAAC;AACtD,eAAO,MAAM,gCAAgC,QAAU,CAAC;AACxD,eAAO,MAAM,+BAA+B,QAAe,CAAC;AAE5D,eAAO,MAAM,6BAA6B,QAAyD,CAAC"}
|
|
@@ -4,16 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { CRYPTO_GROUP_SIZE_BYTES, CRYPTO_PUBLIC_KEY_SIZE_BYTES } from "#general";
|
|
7
|
-
const MAXIMUM_COMMISSIONING_TIMEOUT_S = 15 * 60;
|
|
8
7
|
const MINIMUM_COMMISSIONING_TIMEOUT_S = 3 * 60;
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const STANDARD_COMMISSIONING_TIMEOUT_S = 15 * 60;
|
|
9
|
+
const MAXIMUM_COMMISSIONING_TIMEOUT_S = 48 * 60 * 60;
|
|
11
10
|
const PAKE_PASSCODE_VERIFIER_LENGTH = CRYPTO_GROUP_SIZE_BYTES + CRYPTO_PUBLIC_KEY_SIZE_BYTES;
|
|
12
11
|
export {
|
|
13
|
-
DEVICE_ANNOUNCEMENT_DURATION_MS,
|
|
14
|
-
DEVICE_ANNOUNCEMENT_INTERVAL_MS,
|
|
15
12
|
MAXIMUM_COMMISSIONING_TIMEOUT_S,
|
|
16
13
|
MINIMUM_COMMISSIONING_TIMEOUT_S,
|
|
17
|
-
PAKE_PASSCODE_VERIFIER_LENGTH
|
|
14
|
+
PAKE_PASSCODE_VERIFIER_LENGTH,
|
|
15
|
+
STANDARD_COMMISSIONING_TIMEOUT_S
|
|
18
16
|
};
|
|
19
17
|
//# sourceMappingURL=CommissioningConstants.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/commissioning/CommissioningConstants.ts"],
|
|
4
|
-
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,yBAAyB,oCAAoC;AAE/D,MAAM,kCAAkC,
|
|
4
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,yBAAyB,oCAAoC;AAE/D,MAAM,kCAAkC,IAAI;AAC5C,MAAM,mCAAmC,KAAK;AAC9C,MAAM,kCAAkC,KAAK,KAAK;AAElD,MAAM,gCAAgC,0BAA0B;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -39,6 +39,12 @@ export declare namespace CommissioningOptions {
|
|
|
39
39
|
* Vendor-specific BLE advertisement data.
|
|
40
40
|
*/
|
|
41
41
|
readonly additionalBleAdvertisementData?: Uint8Array;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum time to advdertise. Must be > 3 minutes and < 48 hours.
|
|
44
|
+
*
|
|
45
|
+
* Defaults to 15 minutes.
|
|
46
|
+
*/
|
|
47
|
+
readonly advertisementWindowS?: number;
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
//# sourceMappingURL=CommissioningOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommissioningOptions.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningOptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC;CAAG;AAE5F,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,mBAAmB,UAE/B,CAAC;IAEF,UAAiB,aAAa;QAC1B;;;;WAIG;QACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QAEhD;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAE/B;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;QAEzC;;WAEG;QACH,QAAQ,CAAC,8BAA8B,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"CommissioningOptions.d.ts","sourceRoot":"","sources":["../../../src/commissioning/CommissioningOptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC;CAAG;AAE5F,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,mBAAmB,UAE/B,CAAC;IAEF,UAAiB,aAAa;QAC1B;;;;WAIG;QACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QAEhD;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAE/B;;WAEG;QACH,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;QAEzC;;WAEG;QACH,QAAQ,CAAC,8BAA8B,CAAC,EAAE,UAAU,CAAC;QAErD;;;;WAIG;QACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC1C;CACJ"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const BDX_PROTOCOL_ID = 2;
|
|
7
|
+
export declare enum BdxMessageTypes {
|
|
8
|
+
SendInit = 1,
|
|
9
|
+
SendAccept = 2,
|
|
10
|
+
ReceiveInit = 4,
|
|
11
|
+
ReceiveAccept = 5,
|
|
12
|
+
BlockQuery = 16,
|
|
13
|
+
Block = 17,
|
|
14
|
+
BlockEof = 18,
|
|
15
|
+
BlockAck = 19,
|
|
16
|
+
BlockAckEof = 20,
|
|
17
|
+
BlockQueryWithSkip = 21
|
|
18
|
+
}
|
|
19
|
+
export declare enum BdxStatusCode {
|
|
20
|
+
/**
|
|
21
|
+
* Success.
|
|
22
|
+
*/
|
|
23
|
+
Success = 0,
|
|
24
|
+
/**
|
|
25
|
+
* Definite length too large to support.
|
|
26
|
+
* For example, trying to SendInit with too large of a file.
|
|
27
|
+
*/
|
|
28
|
+
LengthTooLarge = 18,
|
|
29
|
+
/**
|
|
30
|
+
* Definite length proposed for transfer is too short for the context based on the responder’s knowledge of
|
|
31
|
+
* expected size.
|
|
32
|
+
*/
|
|
33
|
+
LengthTooShort = 19,
|
|
34
|
+
/**
|
|
35
|
+
* Pre-negotiated size of transfer was not fulfilled prior to BlockAckEOF.
|
|
36
|
+
*/
|
|
37
|
+
LengthMismatch = 20,
|
|
38
|
+
/**
|
|
39
|
+
* Responder can only support proposed transfer if definite length is provided.
|
|
40
|
+
*/
|
|
41
|
+
LengthRequired = 21,
|
|
42
|
+
/**
|
|
43
|
+
* Received a malformed protocol message.
|
|
44
|
+
*/
|
|
45
|
+
BadMessageContent = 22,
|
|
46
|
+
/**
|
|
47
|
+
* Received block counter out of order from expectation.
|
|
48
|
+
*/
|
|
49
|
+
BadBlockCounter = 23,
|
|
50
|
+
/**
|
|
51
|
+
* Received a well-formed message that was contextually inappropriate for the current state of the transfer.
|
|
52
|
+
*/
|
|
53
|
+
UnexpectedMessage = 24,
|
|
54
|
+
/**
|
|
55
|
+
* Responder is too busy to proceed with a new transfer at this moment.
|
|
56
|
+
*/
|
|
57
|
+
ResponderBusy = 25,
|
|
58
|
+
/**
|
|
59
|
+
* Other error occurred, such as perhaps an input/output error occurring at one of the peers.
|
|
60
|
+
*/
|
|
61
|
+
TransferFailedUnknownError = 31,
|
|
62
|
+
/**
|
|
63
|
+
* Received a message that mismatches the current transfer mode.
|
|
64
|
+
*/
|
|
65
|
+
TransferMethodNotSupported = 80,
|
|
66
|
+
/**
|
|
67
|
+
* Attempted to request a file whose designator is unknown to the responder.
|
|
68
|
+
*/
|
|
69
|
+
FileDesignatorUnknown = 81,
|
|
70
|
+
/**
|
|
71
|
+
* Proposed transfer with explicit start offset is not supported in current context.
|
|
72
|
+
*/
|
|
73
|
+
StartOffsetNotSupported = 82,
|
|
74
|
+
/**
|
|
75
|
+
* Could not find a common supported version between initiator and responder.
|
|
76
|
+
*/
|
|
77
|
+
VersionNotSupported = 83,
|
|
78
|
+
/**
|
|
79
|
+
* Other unexpected error.
|
|
80
|
+
*/
|
|
81
|
+
Unknown = 95,
|
|
82
|
+
/**
|
|
83
|
+
* No additional error details available.
|
|
84
|
+
*/
|
|
85
|
+
GeneralError = 65535
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=bdx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bdx.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/bdx.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,oBAAY,eAAe;IACvB,QAAQ,IAAO;IACf,UAAU,IAAO;IACjB,WAAW,IAAO;IAClB,aAAa,IAAO;IACpB,UAAU,KAAO;IACjB,KAAK,KAAO;IACZ,QAAQ,KAAO;IACf,QAAQ,KAAO;IACf,WAAW,KAAO;IAClB,kBAAkB,KAAO;CAC5B;AAED,oBAAY,aAAa;IACrB;;OAEG;IACH,OAAO,IAAO;IAEd;;;OAGG;IACH,cAAc,KAAO;IAErB;;;OAGG;IACH,cAAc,KAAO;IAErB;;OAEG;IACH,cAAc,KAAO;IAErB;;OAEG;IACH,cAAc,KAAO;IAErB;;OAEG;IACH,iBAAiB,KAAO;IAExB;;OAEG;IACH,eAAe,KAAO;IAEtB;;OAEG;IACH,iBAAiB,KAAO;IAExB;;OAEG;IACH,aAAa,KAAO;IAEpB;;OAEG;IACH,0BAA0B,KAAO;IAEjC;;OAEG;IACH,0BAA0B,KAAO;IAEjC;;OAEG;IACH,qBAAqB,KAAO;IAE5B;;OAEG;IACH,uBAAuB,KAAO;IAE9B;;OAEG;IACH,mBAAmB,KAAO;IAE1B;;OAEG;IACH,OAAO,KAAO;IAEd;;OAEG;IACH,YAAY,QAAS;CACxB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
const BDX_PROTOCOL_ID = 2;
|
|
7
|
+
var BdxMessageTypes = /* @__PURE__ */ ((BdxMessageTypes2) => {
|
|
8
|
+
BdxMessageTypes2[BdxMessageTypes2["SendInit"] = 1] = "SendInit";
|
|
9
|
+
BdxMessageTypes2[BdxMessageTypes2["SendAccept"] = 2] = "SendAccept";
|
|
10
|
+
BdxMessageTypes2[BdxMessageTypes2["ReceiveInit"] = 4] = "ReceiveInit";
|
|
11
|
+
BdxMessageTypes2[BdxMessageTypes2["ReceiveAccept"] = 5] = "ReceiveAccept";
|
|
12
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockQuery"] = 16] = "BlockQuery";
|
|
13
|
+
BdxMessageTypes2[BdxMessageTypes2["Block"] = 17] = "Block";
|
|
14
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockEof"] = 18] = "BlockEof";
|
|
15
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockAck"] = 19] = "BlockAck";
|
|
16
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockAckEof"] = 20] = "BlockAckEof";
|
|
17
|
+
BdxMessageTypes2[BdxMessageTypes2["BlockQueryWithSkip"] = 21] = "BlockQueryWithSkip";
|
|
18
|
+
return BdxMessageTypes2;
|
|
19
|
+
})(BdxMessageTypes || {});
|
|
20
|
+
var BdxStatusCode = /* @__PURE__ */ ((BdxStatusCode2) => {
|
|
21
|
+
BdxStatusCode2[BdxStatusCode2["Success"] = 0] = "Success";
|
|
22
|
+
BdxStatusCode2[BdxStatusCode2["LengthTooLarge"] = 18] = "LengthTooLarge";
|
|
23
|
+
BdxStatusCode2[BdxStatusCode2["LengthTooShort"] = 19] = "LengthTooShort";
|
|
24
|
+
BdxStatusCode2[BdxStatusCode2["LengthMismatch"] = 20] = "LengthMismatch";
|
|
25
|
+
BdxStatusCode2[BdxStatusCode2["LengthRequired"] = 21] = "LengthRequired";
|
|
26
|
+
BdxStatusCode2[BdxStatusCode2["BadMessageContent"] = 22] = "BadMessageContent";
|
|
27
|
+
BdxStatusCode2[BdxStatusCode2["BadBlockCounter"] = 23] = "BadBlockCounter";
|
|
28
|
+
BdxStatusCode2[BdxStatusCode2["UnexpectedMessage"] = 24] = "UnexpectedMessage";
|
|
29
|
+
BdxStatusCode2[BdxStatusCode2["ResponderBusy"] = 25] = "ResponderBusy";
|
|
30
|
+
BdxStatusCode2[BdxStatusCode2["TransferFailedUnknownError"] = 31] = "TransferFailedUnknownError";
|
|
31
|
+
BdxStatusCode2[BdxStatusCode2["TransferMethodNotSupported"] = 80] = "TransferMethodNotSupported";
|
|
32
|
+
BdxStatusCode2[BdxStatusCode2["FileDesignatorUnknown"] = 81] = "FileDesignatorUnknown";
|
|
33
|
+
BdxStatusCode2[BdxStatusCode2["StartOffsetNotSupported"] = 82] = "StartOffsetNotSupported";
|
|
34
|
+
BdxStatusCode2[BdxStatusCode2["VersionNotSupported"] = 83] = "VersionNotSupported";
|
|
35
|
+
BdxStatusCode2[BdxStatusCode2["Unknown"] = 95] = "Unknown";
|
|
36
|
+
BdxStatusCode2[BdxStatusCode2["GeneralError"] = 65535] = "GeneralError";
|
|
37
|
+
return BdxStatusCode2;
|
|
38
|
+
})(BdxStatusCode || {});
|
|
39
|
+
export {
|
|
40
|
+
BDX_PROTOCOL_ID,
|
|
41
|
+
BdxMessageTypes,
|
|
42
|
+
BdxStatusCode
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=bdx.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/protocol/definitions/bdx.ts"],
|
|
4
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,kBAAkB;AAExB,IAAK,kBAAL,kBAAKA,qBAAL;AACH,EAAAA,kCAAA,cAAW,KAAX;AACA,EAAAA,kCAAA,gBAAa,KAAb;AACA,EAAAA,kCAAA,iBAAc,KAAd;AACA,EAAAA,kCAAA,mBAAgB,KAAhB;AACA,EAAAA,kCAAA,gBAAa,MAAb;AACA,EAAAA,kCAAA,WAAQ,MAAR;AACA,EAAAA,kCAAA,cAAW,MAAX;AACA,EAAAA,kCAAA,cAAW,MAAX;AACA,EAAAA,kCAAA,iBAAc,MAAd;AACA,EAAAA,kCAAA,wBAAqB,MAArB;AAVQ,SAAAA;AAAA,GAAA;AAaL,IAAK,gBAAL,kBAAKC,mBAAL;AAIH,EAAAA,8BAAA,aAAU,KAAV;AAMA,EAAAA,8BAAA,oBAAiB,MAAjB;AAMA,EAAAA,8BAAA,oBAAiB,MAAjB;AAKA,EAAAA,8BAAA,oBAAiB,MAAjB;AAKA,EAAAA,8BAAA,oBAAiB,MAAjB;AAKA,EAAAA,8BAAA,uBAAoB,MAApB;AAKA,EAAAA,8BAAA,qBAAkB,MAAlB;AAKA,EAAAA,8BAAA,uBAAoB,MAApB;AAKA,EAAAA,8BAAA,mBAAgB,MAAhB;AAKA,EAAAA,8BAAA,gCAA6B,MAA7B;AAKA,EAAAA,8BAAA,gCAA6B,MAA7B;AAKA,EAAAA,8BAAA,2BAAwB,MAAxB;AAKA,EAAAA,8BAAA,6BAA0B,MAA1B;AAKA,EAAAA,8BAAA,yBAAsB,MAAtB;AAKA,EAAAA,8BAAA,aAAU,MAAV;AAKA,EAAAA,8BAAA,kBAAe,SAAf;AAjFQ,SAAAA;AAAA,GAAA;",
|
|
5
|
+
"names": ["BdxMessageTypes", "BdxStatusCode"]
|
|
6
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/protocol/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/types",
|
|
3
|
-
"version": "0.16.0-alpha.0-
|
|
3
|
+
"version": "0.16.0-alpha.0-20250812-285b75d83",
|
|
4
4
|
"description": "Definitions for Matter application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iot",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"embed-examples": "embedme **/README.md"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@matter/general": "0.16.0-alpha.0-
|
|
37
|
-
"@matter/model": "0.16.0-alpha.0-
|
|
36
|
+
"@matter/general": "0.16.0-alpha.0-20250812-285b75d83",
|
|
37
|
+
"@matter/model": "0.16.0-alpha.0-20250812-285b75d83"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@matter/tools": "0.16.0-alpha.0-
|
|
41
|
-
"@matter/testing": "0.16.0-alpha.0-
|
|
40
|
+
"@matter/tools": "0.16.0-alpha.0-20250812-285b75d83",
|
|
41
|
+
"@matter/testing": "0.16.0-alpha.0-20250812-285b75d83"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist/**/*",
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { CRYPTO_GROUP_SIZE_BYTES, CRYPTO_PUBLIC_KEY_SIZE_BYTES } from "#general";
|
|
8
8
|
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const DEVICE_ANNOUNCEMENT_INTERVAL_MS = 60 * 1000;
|
|
9
|
+
export const MINIMUM_COMMISSIONING_TIMEOUT_S = 3 * 60; // 3 minutes
|
|
10
|
+
export const STANDARD_COMMISSIONING_TIMEOUT_S = 15 * 60; // 15 minutes
|
|
11
|
+
export const MAXIMUM_COMMISSIONING_TIMEOUT_S = 48 * 60 * 60; // 48 hours (extended commissioning)
|
|
13
12
|
|
|
14
13
|
export const PAKE_PASSCODE_VERIFIER_LENGTH = CRYPTO_GROUP_SIZE_BYTES + CRYPTO_PUBLIC_KEY_SIZE_BYTES;
|
|
@@ -49,5 +49,12 @@ export namespace CommissioningOptions {
|
|
|
49
49
|
* Vendor-specific BLE advertisement data.
|
|
50
50
|
*/
|
|
51
51
|
readonly additionalBleAdvertisementData?: Uint8Array;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Maximum time to advdertise. Must be > 3 minutes and < 48 hours.
|
|
55
|
+
*
|
|
56
|
+
* Defaults to 15 minutes.
|
|
57
|
+
*/
|
|
58
|
+
readonly advertisementWindowS?: number;
|
|
52
59
|
}
|
|
53
60
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const BDX_PROTOCOL_ID = 2;
|
|
8
|
+
|
|
9
|
+
export enum BdxMessageTypes {
|
|
10
|
+
SendInit = 0x01,
|
|
11
|
+
SendAccept = 0x02,
|
|
12
|
+
ReceiveInit = 0x04,
|
|
13
|
+
ReceiveAccept = 0x05,
|
|
14
|
+
BlockQuery = 0x10,
|
|
15
|
+
Block = 0x11,
|
|
16
|
+
BlockEof = 0x12,
|
|
17
|
+
BlockAck = 0x13,
|
|
18
|
+
BlockAckEof = 0x14,
|
|
19
|
+
BlockQueryWithSkip = 0x15,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum BdxStatusCode {
|
|
23
|
+
/**
|
|
24
|
+
* Success.
|
|
25
|
+
*/
|
|
26
|
+
Success = 0x00,
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Definite length too large to support.
|
|
30
|
+
* For example, trying to SendInit with too large of a file.
|
|
31
|
+
*/
|
|
32
|
+
LengthTooLarge = 0x12,
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Definite length proposed for transfer is too short for the context based on the responder’s knowledge of
|
|
36
|
+
* expected size.
|
|
37
|
+
*/
|
|
38
|
+
LengthTooShort = 0x13,
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Pre-negotiated size of transfer was not fulfilled prior to BlockAckEOF.
|
|
42
|
+
*/
|
|
43
|
+
LengthMismatch = 0x14,
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Responder can only support proposed transfer if definite length is provided.
|
|
47
|
+
*/
|
|
48
|
+
LengthRequired = 0x15,
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Received a malformed protocol message.
|
|
52
|
+
*/
|
|
53
|
+
BadMessageContent = 0x16,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Received block counter out of order from expectation.
|
|
57
|
+
*/
|
|
58
|
+
BadBlockCounter = 0x17,
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Received a well-formed message that was contextually inappropriate for the current state of the transfer.
|
|
62
|
+
*/
|
|
63
|
+
UnexpectedMessage = 0x18,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Responder is too busy to proceed with a new transfer at this moment.
|
|
67
|
+
*/
|
|
68
|
+
ResponderBusy = 0x19,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Other error occurred, such as perhaps an input/output error occurring at one of the peers.
|
|
72
|
+
*/
|
|
73
|
+
TransferFailedUnknownError = 0x1f,
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Received a message that mismatches the current transfer mode.
|
|
77
|
+
*/
|
|
78
|
+
TransferMethodNotSupported = 0x50,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Attempted to request a file whose designator is unknown to the responder.
|
|
82
|
+
*/
|
|
83
|
+
FileDesignatorUnknown = 0x51,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Proposed transfer with explicit start offset is not supported in current context.
|
|
87
|
+
*/
|
|
88
|
+
StartOffsetNotSupported = 0x52,
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Could not find a common supported version between initiator and responder.
|
|
92
|
+
*/
|
|
93
|
+
VersionNotSupported = 0x53,
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Other unexpected error.
|
|
97
|
+
*/
|
|
98
|
+
Unknown = 0x5f,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* No additional error details available.
|
|
102
|
+
*/
|
|
103
|
+
GeneralError = 0xffff,
|
|
104
|
+
}
|