"use strict";
/**
 * Defined in DLC Messaging Spec
 * https://github.com/discreetlogcontracts/dlcspecs/blob/master/Messaging.md
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.PayoutCurvePieceType = exports.NegotiationFieldsType = exports.OracleInfoType = exports.ContractDescriptorType = exports.ContractInfoType = exports.MessageType = exports.PROTOCOL_VERSION = void 0;
// Protocol version as defined in dlcspecs PR #163
exports.PROTOCOL_VERSION = 1;
// Wire message types (remain unchanged for backward compatibility)
var MessageType;
(function (MessageType) {
    // Core DLC Message Types (remain as wire format with u16 prefix)
    MessageType[MessageType["DlcOffer"] = 42778] = "DlcOffer";
    MessageType[MessageType["DlcAccept"] = 42780] = "DlcAccept";
    MessageType[MessageType["DlcSign"] = 42782] = "DlcSign";
    // Legacy contract types (keeping for backward compatibility during transition)
    MessageType[MessageType["ContractInfoV0"] = 55342] = "ContractInfoV0";
    MessageType[MessageType["SingleContractInfo"] = 55342] = "SingleContractInfo";
    MessageType[MessageType["ContractInfoV1"] = 55344] = "ContractInfoV1";
    MessageType[MessageType["DisjointContractInfo"] = 55344] = "DisjointContractInfo";
    MessageType[MessageType["ContractDescriptorV0"] = 42768] = "ContractDescriptorV0";
    MessageType[MessageType["ContractDescriptorV1"] = 42784] = "ContractDescriptorV1";
    MessageType[MessageType["OracleInfoV0"] = 42770] = "OracleInfoV0";
    MessageType[MessageType["SingleOracleInfo"] = 42770] = "SingleOracleInfo";
    MessageType[MessageType["OracleInfoV1"] = 42786] = "OracleInfoV1";
    MessageType[MessageType["MultiOracleInfo"] = 42786] = "MultiOracleInfo";
    MessageType[MessageType["OracleInfoV2"] = 55340] = "OracleInfoV2";
    MessageType[MessageType["OracleParamsV0"] = 55338] = "OracleParamsV0";
    // Oracle message types (remain as TLV for backward compatibility)
    MessageType[MessageType["OracleAnnouncement"] = 55332] = "OracleAnnouncement";
    MessageType[MessageType["OracleAnnouncementV0"] = 55332] = "OracleAnnouncementV0";
    MessageType[MessageType["OracleAttestation"] = 55400] = "OracleAttestation";
    MessageType[MessageType["OracleAttestationV0"] = 55400] = "OracleAttestationV0";
    MessageType[MessageType["OracleEvent"] = 55330] = "OracleEvent";
    MessageType[MessageType["OracleEventV0"] = 55330] = "OracleEventV0";
    MessageType[MessageType["OracleEventContainer"] = 61632] = "OracleEventContainer";
    MessageType[MessageType["EnumEventDescriptor"] = 55302] = "EnumEventDescriptor";
    MessageType[MessageType["EnumEventDescriptorV0"] = 55302] = "EnumEventDescriptorV0";
    MessageType[MessageType["DigitDecompositionEventDescriptor"] = 55306] = "DigitDecompositionEventDescriptor";
    MessageType[MessageType["DigitDecompositionEventDescriptorV0"] = 55306] = "DigitDecompositionEventDescriptorV0";
    MessageType[MessageType["NegotiationFieldsV0"] = 55334] = "NegotiationFieldsV0";
    MessageType[MessageType["NegotiationFieldsV1"] = 55336] = "NegotiationFieldsV1";
    MessageType[MessageType["NegotiationFieldsV2"] = 55346] = "NegotiationFieldsV2";
    MessageType[MessageType["FundingInput"] = 42772] = "FundingInput";
    MessageType[MessageType["FundingInputV0"] = 42772] = "FundingInputV0";
    MessageType[MessageType["DlcInput"] = 42773] = "DlcInput";
    MessageType[MessageType["CetAdaptorSignatures"] = 42774] = "CetAdaptorSignatures";
    MessageType[MessageType["CetAdaptorSignaturesV0"] = 42774] = "CetAdaptorSignaturesV0";
    MessageType[MessageType["FundingSignatures"] = 42776] = "FundingSignatures";
    MessageType[MessageType["FundingSignaturesV0"] = 42776] = "FundingSignaturesV0";
    MessageType[MessageType["PayoutFunction"] = 42790] = "PayoutFunction";
    MessageType[MessageType["PayoutFunctionV0"] = 42790] = "PayoutFunctionV0";
    // PayoutCurvePiece types - kept for backward compatibility
    MessageType[MessageType["PolynomialPayoutCurvePiece"] = 42792] = "PolynomialPayoutCurvePiece";
    MessageType[MessageType["HyperbolaPayoutCurvePiece"] = 42794] = "HyperbolaPayoutCurvePiece";
    MessageType[MessageType["OldHyperbolaPayoutCurvePiece"] = 42796] = "OldHyperbolaPayoutCurvePiece";
    MessageType[MessageType["RoundingIntervals"] = 42788] = "RoundingIntervals";
    MessageType[MessageType["RoundingIntervalsV0"] = 42788] = "RoundingIntervalsV0";
    MessageType[MessageType["DlcClose"] = 52170] = "DlcClose";
    MessageType[MessageType["DlcCancel"] = 52172] = "DlcCancel";
    /**
     * Dlc Storage Types
     */
    MessageType[MessageType["DlcTransactions"] = 61230] = "DlcTransactions";
    MessageType[MessageType["DlcTransactionsV0"] = 61230] = "DlcTransactionsV0";
    MessageType[MessageType["DlcIds"] = 61232] = "DlcIds";
    MessageType[MessageType["DlcIdsV0"] = 61232] = "DlcIdsV0";
    MessageType[MessageType["DlcInfo"] = 61234] = "DlcInfo";
    MessageType[MessageType["DlcInfoV0"] = 61234] = "DlcInfoV0";
    /**
     * Oracle Identifier
     */
    MessageType[MessageType["OracleIdentifier"] = 61472] = "OracleIdentifier";
    MessageType[MessageType["OracleIdentifierV0"] = 61472] = "OracleIdentifierV0";
    /**
     * Order Message Types
     */
    MessageType[MessageType["OrderOffer"] = 62770] = "OrderOffer";
    MessageType[MessageType["OrderAccept"] = 62772] = "OrderAccept";
    MessageType[MessageType["OrderMetadataV0"] = 62774] = "OrderMetadataV0";
    MessageType[MessageType["OrderIrcInfoV0"] = 62776] = "OrderIrcInfoV0";
    MessageType[MessageType["OrderPositionInfo"] = 62778] = "OrderPositionInfo";
    MessageType[MessageType["OrderNegotiationFieldsV0"] = 65334] = "OrderNegotiationFieldsV0";
    MessageType[MessageType["OrderNegotiationFieldsV1"] = 65336] = "OrderNegotiationFieldsV1";
    MessageType[MessageType["AddressCache"] = 65132] = "AddressCache";
    MessageType[MessageType["BatchFundingGroup"] = 65430] = "BatchFundingGroup";
    MessageType[MessageType["IrcMessageV0"] = 59314] = "IrcMessageV0";
    MessageType[MessageType["NodeAnnouncement"] = 51394] = "NodeAnnouncement";
    MessageType[MessageType["NodeAnnouncementAddress"] = 51396] = "NodeAnnouncementAddress";
})(MessageType = exports.MessageType || (exports.MessageType = {}));
// New sub-type identifiers for sibling sub-types (as per dlcspecs PR #163)
var ContractInfoType;
(function (ContractInfoType) {
    ContractInfoType[ContractInfoType["Single"] = 0] = "Single";
    ContractInfoType[ContractInfoType["Disjoint"] = 1] = "Disjoint";
})(ContractInfoType = exports.ContractInfoType || (exports.ContractInfoType = {}));
var ContractDescriptorType;
(function (ContractDescriptorType) {
    ContractDescriptorType[ContractDescriptorType["Enumerated"] = 0] = "Enumerated";
    ContractDescriptorType[ContractDescriptorType["NumericOutcome"] = 1] = "NumericOutcome";
})(ContractDescriptorType = exports.ContractDescriptorType || (exports.ContractDescriptorType = {}));
var OracleInfoType;
(function (OracleInfoType) {
    OracleInfoType[OracleInfoType["Single"] = 0] = "Single";
    OracleInfoType[OracleInfoType["Multi"] = 1] = "Multi";
})(OracleInfoType = exports.OracleInfoType || (exports.OracleInfoType = {}));
var NegotiationFieldsType;
(function (NegotiationFieldsType) {
    NegotiationFieldsType[NegotiationFieldsType["Single"] = 0] = "Single";
    NegotiationFieldsType[NegotiationFieldsType["Disjoint"] = 1] = "Disjoint";
})(NegotiationFieldsType = exports.NegotiationFieldsType || (exports.NegotiationFieldsType = {}));
var PayoutCurvePieceType;
(function (PayoutCurvePieceType) {
    PayoutCurvePieceType[PayoutCurvePieceType["Polynomial"] = 0] = "Polynomial";
    PayoutCurvePieceType[PayoutCurvePieceType["Hyperbola"] = 1] = "Hyperbola";
})(PayoutCurvePieceType = exports.PayoutCurvePieceType || (exports.PayoutCurvePieceType = {}));
//# sourceMappingURL=MessageType.js.map