"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var PaseMessages_exports = {};
__export(PaseMessages_exports, {
  TlvPasePake1: () => TlvPasePake1,
  TlvPasePake2: () => TlvPasePake2,
  TlvPasePake3: () => TlvPasePake3,
  TlvPbkdfParamRequest: () => TlvPbkdfParamRequest,
  TlvPbkdfParamResponse: () => TlvPbkdfParamResponse,
  TlvSessionParameters: () => TlvSessionParameters
});
module.exports = __toCommonJS(PaseMessages_exports);
var import_SupportedTransportsBitmap = require("#common/SupportedTransportsBitmap.js");
var import_general = require("@matter/general");
var import_types = require("@matter/types");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const TlvSessionParameters = (0, import_types.TlvObject)({
  /** Maximum sleep interval of node when in idle mode. */
  idleInterval: (0, import_types.TlvOptionalField)(1, import_types.TlvUInt32),
  /** Maximum sleep interval of node when in active mode. */
  activeInterval: (0, import_types.TlvOptionalField)(2, import_types.TlvUInt32),
  /** Minimum amount of time the node SHOULD stay active after network activity. */
  activeThreshold: (0, import_types.TlvOptionalField)(3, import_types.TlvUInt16),
  /** Data model revision. */
  dataModelRevision: (0, import_types.TlvOptionalField)(4, import_types.TlvUInt16),
  /** Interaction model revision. */
  interactionModelRevision: (0, import_types.TlvOptionalField)(5, import_types.TlvUInt16),
  /** Specification version. */
  specificationVersion: (0, import_types.TlvOptionalField)(6, import_types.TlvUInt32),
  /** Maximum Paths pert Invoke */
  maxPathsPerInvoke: (0, import_types.TlvOptionalField)(7, import_types.TlvUInt16),
  /** Supported transport protocols in addition to MRP.*/
  supportedTransports: (0, import_types.TlvOptionalField)(8, (0, import_types.TlvBitmap)(import_types.TlvUInt16, import_SupportedTransportsBitmap.SupportedTransportsBitmap)),
  /** Maximum size of the message carried over TCP in bytes */
  maxTcpMessageSize: (0, import_types.TlvOptionalField)(9, import_types.TlvUInt32)
});
const TlvPbkdfParamRequest = (0, import_types.TlvObject)({
  initiatorRandom: (0, import_types.TlvField)(1, import_types.TlvByteString.bound({ length: 32 })),
  initiatorSessionId: (0, import_types.TlvField)(2, import_types.TlvUInt16),
  // Specs: range: 16bits
  passcodeId: (0, import_types.TlvField)(3, import_types.TlvUInt16),
  // Specs: length: 16bits so min is 0x8000?
  hasPbkdfParameters: (0, import_types.TlvField)(4, import_types.TlvBoolean),
  initiatorSessionParams: (0, import_types.TlvOptionalField)(5, TlvSessionParameters)
});
const TlvPbkdfParamResponse = (0, import_types.TlvObject)({
  initiatorRandom: (0, import_types.TlvField)(1, import_types.TlvByteString.bound({ length: 32 })),
  responderRandom: (0, import_types.TlvField)(2, import_types.TlvByteString.bound({ length: 32 })),
  responderSessionId: (0, import_types.TlvField)(3, import_types.TlvUInt16),
  pbkdfParameters: (0, import_types.TlvOptionalField)(
    4,
    (0, import_types.TlvObject)({
      iterations: (0, import_types.TlvField)(1, import_types.TlvUInt32),
      salt: (0, import_types.TlvField)(2, import_types.TlvByteString.bound({ minLength: 16, maxLength: 32 }))
    })
  ),
  responderSessionParams: (0, import_types.TlvOptionalField)(5, TlvSessionParameters)
});
const TlvPasePake1 = (0, import_types.TlvObject)({
  x: (0, import_types.TlvField)(1, import_types.TlvByteString.bound({ length: import_general.CRYPTO_PUBLIC_KEY_SIZE_BYTES }))
  // pA
});
const TlvPasePake2 = (0, import_types.TlvObject)({
  y: (0, import_types.TlvField)(1, import_types.TlvByteString.bound({ length: import_general.CRYPTO_PUBLIC_KEY_SIZE_BYTES })),
  // pB
  verifier: (0, import_types.TlvField)(2, import_types.TlvByteString.bound({ length: import_general.CRYPTO_HASH_LEN_BYTES }))
  // cB
});
const TlvPasePake3 = (0, import_types.TlvObject)({
  verifier: (0, import_types.TlvField)(1, import_types.TlvByteString.bound({ length: import_general.CRYPTO_HASH_LEN_BYTES }))
  // cA
});
//# sourceMappingURL=PaseMessages.js.map
