@moqtap/codec 0.9.0 → 0.10.0

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.
Files changed (148) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{chunk-KCH4BQXK.cjs → chunk-AQ445VV7.cjs} +15 -9
  3. package/dist/{chunk-UZO5Z2XT.cjs → chunk-BIBMDTU5.cjs} +12 -6
  4. package/dist/{chunk-23KRITJ6.js → chunk-BX2N7TZM.js} +14 -8
  5. package/dist/{chunk-XQGEOFGE.js → chunk-CF5DDD3Q.js} +14 -8
  6. package/dist/{chunk-YJGOD3Y4.js → chunk-FT3HDNIB.js} +33 -21
  7. package/dist/{chunk-TMXRYOBS.js → chunk-G53WYUXL.js} +13 -7
  8. package/dist/{chunk-JKMYAUGY.js → chunk-K2B3OVFK.js} +11 -8
  9. package/dist/{chunk-Q7NSUXXB.js → chunk-KGDVC4O6.js} +33 -21
  10. package/dist/{chunk-TVSFDQYE.cjs → chunk-KTNERCTZ.cjs} +33 -21
  11. package/dist/{chunk-H6DTAIWM.js → chunk-L5DRACXS.js} +22 -16
  12. package/dist/{chunk-UA5XFP4O.cjs → chunk-OUNN4IQB.cjs} +14 -8
  13. package/dist/{chunk-NH4L6NIY.js → chunk-OZRK73NQ.js} +12 -6
  14. package/dist/{chunk-PU2KV7VP.cjs → chunk-RYKQXBG6.cjs} +12 -6
  15. package/dist/{chunk-EVCPBFSR.cjs → chunk-SDJTSMOW.cjs} +23 -17
  16. package/dist/{chunk-MAXEHYVB.cjs → chunk-T4VWPKDG.cjs} +33 -21
  17. package/dist/{chunk-2XH6PHXR.js → chunk-TSUZ6GJV.js} +12 -6
  18. package/dist/{chunk-QGIHC6BA.cjs → chunk-UKKDOOUO.cjs} +12 -9
  19. package/dist/{chunk-BV6MITLO.js → chunk-WCPENYNE.js} +14 -8
  20. package/dist/{chunk-IADVBKEJ.cjs → chunk-WCTMPDUX.cjs} +15 -9
  21. package/dist/{chunk-7ENEWAMZ.cjs → chunk-XCRCAUGI.cjs} +15 -9
  22. package/dist/{codec-BMwgZIgG.d.ts → codec-08ZOr5wI.d.ts} +1 -1
  23. package/dist/{codec-DzLvG8Wb.d.cts → codec-Bd60SGKH.d.cts} +1 -1
  24. package/dist/{codec-CgZdadPt.d.cts → codec-BrTi4K7r.d.cts} +1 -1
  25. package/dist/{codec-D4RvFQmu.d.ts → codec-Bux_Q40X.d.ts} +1 -1
  26. package/dist/{codec-vddqy0KY.d.cts → codec-BxQTybUX.d.cts} +1 -1
  27. package/dist/{codec-C006F75E.d.ts → codec-C3mdsGx3.d.ts} +1 -1
  28. package/dist/{codec-CviAa4lp.d.ts → codec-CBdOIfMY.d.ts} +1 -1
  29. package/dist/{codec-Bym-K2q2.d.cts → codec-CFWu5KVT.d.cts} +1 -1
  30. package/dist/{codec-DJmqoIsp.d.cts → codec-CWnf8mn_.d.cts} +1 -1
  31. package/dist/{codec-BQa6Qsav.d.ts → codec-Cm3D261p.d.ts} +1 -1
  32. package/dist/{codec-C5evFHL-.d.ts → codec-CwZ6OCPP.d.ts} +1 -1
  33. package/dist/{codec-DchsPfr3.d.cts → codec-Czejcmxr.d.cts} +1 -1
  34. package/dist/{codec-C_xxsbKy.d.cts → codec-DNmiG2e0.d.cts} +1 -1
  35. package/dist/{codec-O-1Js7h4.d.ts → codec-DOmAmFkI.d.ts} +1 -1
  36. package/dist/{codec-Cl73EfRW.d.ts → codec-DaXjRrOV.d.ts} +1 -1
  37. package/dist/{codec-DAyiF5sq.d.cts → codec-EvybrBuY.d.cts} +1 -1
  38. package/dist/{codec-CA6nbbEk.d.ts → codec-alVA27Uc.d.ts} +1 -1
  39. package/dist/{codec-CSBFdPgP.d.cts → codec-f7vxeVIS.d.cts} +1 -1
  40. package/dist/{codec-BKsVu3Fr.d.ts → codec-gl4_QEva.d.ts} +1 -1
  41. package/dist/{codec-CtvFK4aV.d.cts → codec-guzqtfMk.d.cts} +1 -1
  42. package/dist/draft11-session.d.cts +1 -1
  43. package/dist/draft11-session.d.ts +1 -1
  44. package/dist/draft11.cjs +2 -2
  45. package/dist/draft11.d.cts +3 -3
  46. package/dist/draft11.d.ts +3 -3
  47. package/dist/draft11.js +1 -1
  48. package/dist/draft12-session.d.cts +1 -1
  49. package/dist/draft12-session.d.ts +1 -1
  50. package/dist/draft12.cjs +2 -2
  51. package/dist/draft12.d.cts +3 -3
  52. package/dist/draft12.d.ts +3 -3
  53. package/dist/draft12.js +1 -1
  54. package/dist/draft13-session.d.cts +1 -1
  55. package/dist/draft13-session.d.ts +1 -1
  56. package/dist/draft13.cjs +2 -2
  57. package/dist/draft13.d.cts +3 -3
  58. package/dist/draft13.d.ts +3 -3
  59. package/dist/draft13.js +1 -1
  60. package/dist/draft14-session.d.cts +1 -1
  61. package/dist/draft14-session.d.ts +1 -1
  62. package/dist/draft14.cjs +2 -2
  63. package/dist/draft14.d.cts +3 -3
  64. package/dist/draft14.d.ts +3 -3
  65. package/dist/draft14.js +1 -1
  66. package/dist/draft15-session.d.cts +1 -1
  67. package/dist/draft15-session.d.ts +1 -1
  68. package/dist/draft15.cjs +2 -2
  69. package/dist/draft15.d.cts +3 -3
  70. package/dist/draft15.d.ts +3 -3
  71. package/dist/draft15.js +1 -1
  72. package/dist/draft16-session.d.cts +1 -1
  73. package/dist/draft16-session.d.ts +1 -1
  74. package/dist/draft16.cjs +2 -2
  75. package/dist/draft16.d.cts +3 -3
  76. package/dist/draft16.d.ts +3 -3
  77. package/dist/draft16.js +1 -1
  78. package/dist/draft17-session.d.cts +1 -1
  79. package/dist/draft17-session.d.ts +1 -1
  80. package/dist/draft17.cjs +2 -2
  81. package/dist/draft17.d.cts +3 -3
  82. package/dist/draft17.d.ts +3 -3
  83. package/dist/draft17.js +1 -1
  84. package/dist/draft18-session.d.cts +1 -1
  85. package/dist/draft18-session.d.ts +1 -1
  86. package/dist/draft18.cjs +2 -2
  87. package/dist/draft18.d.cts +3 -3
  88. package/dist/draft18.d.ts +3 -3
  89. package/dist/draft18.js +1 -1
  90. package/dist/draft19-session.d.cts +1 -1
  91. package/dist/draft19-session.d.ts +1 -1
  92. package/dist/draft19.cjs +2 -2
  93. package/dist/draft19.d.cts +3 -3
  94. package/dist/draft19.d.ts +3 -3
  95. package/dist/draft19.js +1 -1
  96. package/dist/draft20-session.d.cts +1 -1
  97. package/dist/draft20-session.d.ts +1 -1
  98. package/dist/draft20.cjs +2 -2
  99. package/dist/draft20.d.cts +3 -3
  100. package/dist/draft20.d.ts +3 -3
  101. package/dist/draft20.js +1 -1
  102. package/dist/index.cjs +20 -20
  103. package/dist/index.d.cts +20 -20
  104. package/dist/index.d.ts +20 -20
  105. package/dist/index.js +10 -10
  106. package/dist/session.d.cts +10 -10
  107. package/dist/session.d.ts +10 -10
  108. package/dist/{types-Cqp10JtB.d.cts → types-Bg86GGVZ.d.cts} +2 -2
  109. package/dist/{types-Cqp10JtB.d.ts → types-Bg86GGVZ.d.ts} +2 -2
  110. package/dist/{types-zHgCS6o5.d.cts → types-C1rxh-id.d.cts} +7 -7
  111. package/dist/{types-zHgCS6o5.d.ts → types-C1rxh-id.d.ts} +7 -7
  112. package/dist/{types-Bio-91Rt.d.cts → types-CI_SX4Xe.d.cts} +2 -2
  113. package/dist/{types-Bio-91Rt.d.ts → types-CI_SX4Xe.d.ts} +2 -2
  114. package/dist/{types-CWCQwuvy.d.cts → types-CY-QWxd-.d.cts} +11 -11
  115. package/dist/{types-CWCQwuvy.d.ts → types-CY-QWxd-.d.ts} +11 -11
  116. package/dist/{types-Cm9fjeYC.d.cts → types-CZTzbIzQ.d.cts} +2 -2
  117. package/dist/{types-Cm9fjeYC.d.ts → types-CZTzbIzQ.d.ts} +2 -2
  118. package/dist/{types-HI_bbXka.d.cts → types-CmqT0jUf.d.cts} +1 -1
  119. package/dist/{types-HI_bbXka.d.ts → types-CmqT0jUf.d.ts} +1 -1
  120. package/dist/{types-Ck45Ex5S.d.cts → types-D0kTgUuL.d.cts} +1 -1
  121. package/dist/{types-Ck45Ex5S.d.ts → types-D0kTgUuL.d.ts} +1 -1
  122. package/dist/{types-D9eiB_9A.d.cts → types-D4bmW8rY.d.cts} +2 -2
  123. package/dist/{types-D9eiB_9A.d.ts → types-D4bmW8rY.d.ts} +2 -2
  124. package/dist/{types-CXlSn0I9.d.cts → types-DjxexghA.d.cts} +2 -2
  125. package/dist/{types-CXlSn0I9.d.ts → types-DjxexghA.d.ts} +2 -2
  126. package/dist/{types-CPaYBsMG.d.cts → types-pShrs3fN.d.cts} +2 -2
  127. package/dist/{types-CPaYBsMG.d.ts → types-pShrs3fN.d.ts} +2 -2
  128. package/package.json +2 -2
  129. package/src/drafts/draft11/codec.ts +11 -8
  130. package/src/drafts/draft11/types.ts +1 -1
  131. package/src/drafts/draft12/codec.ts +22 -16
  132. package/src/drafts/draft12/types.ts +2 -2
  133. package/src/drafts/draft13/codec.ts +14 -8
  134. package/src/drafts/draft13/types.ts +2 -2
  135. package/src/drafts/draft14/codec.ts +14 -8
  136. package/src/drafts/draft14/types.ts +1 -1
  137. package/src/drafts/draft15/codec.ts +14 -8
  138. package/src/drafts/draft15/types.ts +2 -2
  139. package/src/drafts/draft16/codec.ts +13 -7
  140. package/src/drafts/draft16/types.ts +2 -2
  141. package/src/drafts/draft17/codec.ts +12 -6
  142. package/src/drafts/draft17/types.ts +2 -2
  143. package/src/drafts/draft18/codec.ts +12 -6
  144. package/src/drafts/draft18/types.ts +2 -2
  145. package/src/drafts/draft19/codec.ts +33 -21
  146. package/src/drafts/draft19/types.ts +10 -7
  147. package/src/drafts/draft20/codec.ts +33 -21
  148. package/src/drafts/draft20/types.ts +17 -11
@@ -11,7 +11,7 @@ interface AuthorizationToken {
11
11
  }
12
12
  interface Draft20SetupOptions {
13
13
  path?: string;
14
- authorization_token?: AuthorizationToken;
14
+ authorization_token?: readonly AuthorizationToken[];
15
15
  max_auth_token_cache_size?: bigint;
16
16
  authority?: string;
17
17
  max_filter_ranges?: bigint;
@@ -80,14 +80,14 @@ interface Draft20FillParameters {
80
80
  subscriber_priority?: bigint;
81
81
  location_filter?: LocationFilter;
82
82
  group_order?: bigint;
83
- subgroup_filter?: RangeFilter;
84
- objectid_filter?: RangeFilter;
85
- priority_filter?: RangeFilter;
86
- object_property_filter?: RangeFilter;
83
+ subgroup_filter?: readonly RangeFilter[];
84
+ objectid_filter?: readonly RangeFilter[];
85
+ priority_filter?: readonly RangeFilter[];
86
+ object_property_filter?: readonly RangeFilter[];
87
87
  }
88
88
  interface Draft20Params {
89
89
  object_delivery_timeout?: bigint;
90
- authorization_token?: AuthorizationToken;
90
+ authorization_token?: readonly AuthorizationToken[];
91
91
  rendezvous_timeout?: bigint;
92
92
  subgroup_delivery_timeout?: bigint;
93
93
  expires?: bigint;
@@ -98,11 +98,11 @@ interface Draft20Params {
98
98
  location_filter?: LocationFilter;
99
99
  group_order?: bigint;
100
100
  fill_parameters?: Draft20FillParameters;
101
- subgroup_filter?: RangeFilter;
102
- objectid_filter?: RangeFilter;
103
- priority_filter?: RangeFilter;
104
- object_property_filter?: RangeFilter;
105
- track_property_filter?: RangeFilter;
101
+ subgroup_filter?: readonly RangeFilter[];
102
+ objectid_filter?: readonly RangeFilter[];
103
+ priority_filter?: readonly RangeFilter[];
104
+ object_property_filter?: readonly RangeFilter[];
105
+ track_property_filter?: readonly RangeFilter[];
106
106
  new_group_request?: bigint;
107
107
  track_namespace_prefix?: string[];
108
108
  include_properties?: bigint;
@@ -11,7 +11,7 @@ interface AuthorizationToken {
11
11
  }
12
12
  interface Draft20SetupOptions {
13
13
  path?: string;
14
- authorization_token?: AuthorizationToken;
14
+ authorization_token?: readonly AuthorizationToken[];
15
15
  max_auth_token_cache_size?: bigint;
16
16
  authority?: string;
17
17
  max_filter_ranges?: bigint;
@@ -80,14 +80,14 @@ interface Draft20FillParameters {
80
80
  subscriber_priority?: bigint;
81
81
  location_filter?: LocationFilter;
82
82
  group_order?: bigint;
83
- subgroup_filter?: RangeFilter;
84
- objectid_filter?: RangeFilter;
85
- priority_filter?: RangeFilter;
86
- object_property_filter?: RangeFilter;
83
+ subgroup_filter?: readonly RangeFilter[];
84
+ objectid_filter?: readonly RangeFilter[];
85
+ priority_filter?: readonly RangeFilter[];
86
+ object_property_filter?: readonly RangeFilter[];
87
87
  }
88
88
  interface Draft20Params {
89
89
  object_delivery_timeout?: bigint;
90
- authorization_token?: AuthorizationToken;
90
+ authorization_token?: readonly AuthorizationToken[];
91
91
  rendezvous_timeout?: bigint;
92
92
  subgroup_delivery_timeout?: bigint;
93
93
  expires?: bigint;
@@ -98,11 +98,11 @@ interface Draft20Params {
98
98
  location_filter?: LocationFilter;
99
99
  group_order?: bigint;
100
100
  fill_parameters?: Draft20FillParameters;
101
- subgroup_filter?: RangeFilter;
102
- objectid_filter?: RangeFilter;
103
- priority_filter?: RangeFilter;
104
- object_property_filter?: RangeFilter;
105
- track_property_filter?: RangeFilter;
101
+ subgroup_filter?: readonly RangeFilter[];
102
+ objectid_filter?: readonly RangeFilter[];
103
+ priority_filter?: readonly RangeFilter[];
104
+ object_property_filter?: readonly RangeFilter[];
105
+ track_property_filter?: readonly RangeFilter[];
106
106
  new_group_request?: bigint;
107
107
  track_namespace_prefix?: string[];
108
108
  include_properties?: bigint;
@@ -12,7 +12,7 @@ interface AuthorizationToken {
12
12
  interface Draft16SetupParams {
13
13
  path?: string;
14
14
  max_request_id?: bigint;
15
- authorization_token?: AuthorizationToken;
15
+ authorization_token?: readonly AuthorizationToken[];
16
16
  max_auth_token_cache_size?: bigint;
17
17
  authority?: string;
18
18
  moqt_implementation?: string;
@@ -36,7 +36,7 @@ interface Draft16TrackExtensions {
36
36
  }
37
37
  interface Draft16Params {
38
38
  delivery_timeout?: bigint;
39
- authorization_token?: AuthorizationToken;
39
+ authorization_token?: readonly AuthorizationToken[];
40
40
  max_cache_duration?: bigint;
41
41
  expires?: bigint;
42
42
  largest_object?: LargestObject;
@@ -12,7 +12,7 @@ interface AuthorizationToken {
12
12
  interface Draft16SetupParams {
13
13
  path?: string;
14
14
  max_request_id?: bigint;
15
- authorization_token?: AuthorizationToken;
15
+ authorization_token?: readonly AuthorizationToken[];
16
16
  max_auth_token_cache_size?: bigint;
17
17
  authority?: string;
18
18
  moqt_implementation?: string;
@@ -36,7 +36,7 @@ interface Draft16TrackExtensions {
36
36
  }
37
37
  interface Draft16Params {
38
38
  delivery_timeout?: bigint;
39
- authorization_token?: AuthorizationToken;
39
+ authorization_token?: readonly AuthorizationToken[];
40
40
  max_cache_duration?: bigint;
41
41
  expires?: bigint;
42
42
  largest_object?: LargestObject;
@@ -36,7 +36,7 @@ interface Draft14Params {
36
36
  max_auth_token_cache_size?: bigint;
37
37
  moqt_implementation?: string;
38
38
  delivery_timeout?: bigint;
39
- authorization_token?: AuthorizationToken;
39
+ authorization_token?: readonly AuthorizationToken[];
40
40
  max_cache_duration?: bigint;
41
41
  unknown?: UnknownParam[];
42
42
  }
@@ -36,7 +36,7 @@ interface Draft14Params {
36
36
  max_auth_token_cache_size?: bigint;
37
37
  moqt_implementation?: string;
38
38
  delivery_timeout?: bigint;
39
- authorization_token?: AuthorizationToken;
39
+ authorization_token?: readonly AuthorizationToken[];
40
40
  max_cache_duration?: bigint;
41
41
  unknown?: UnknownParam[];
42
42
  }
@@ -14,7 +14,7 @@ interface Draft11SetupParams {
14
14
  unknown?: UnknownParam[];
15
15
  }
16
16
  interface Draft11Params {
17
- authorization_token?: AuthorizationToken;
17
+ authorization_token?: readonly AuthorizationToken[];
18
18
  delivery_timeout?: bigint;
19
19
  max_cache_duration?: bigint;
20
20
  unknown?: UnknownParam[];
@@ -14,7 +14,7 @@ interface Draft11SetupParams {
14
14
  unknown?: UnknownParam[];
15
15
  }
16
16
  interface Draft11Params {
17
- authorization_token?: AuthorizationToken;
17
+ authorization_token?: readonly AuthorizationToken[];
18
18
  delivery_timeout?: bigint;
19
19
  max_cache_duration?: bigint;
20
20
  unknown?: UnknownParam[];
@@ -11,7 +11,7 @@ interface AuthorizationToken {
11
11
  }
12
12
  interface Draft17SetupOptions {
13
13
  path?: string;
14
- authorization_token?: AuthorizationToken;
14
+ authorization_token?: readonly AuthorizationToken[];
15
15
  max_auth_token_cache_size?: bigint;
16
16
  authority?: string;
17
17
  moqt_implementation?: string;
@@ -29,7 +29,7 @@ interface LargestObject {
29
29
  }
30
30
  interface Draft17Params {
31
31
  delivery_timeout?: bigint;
32
- authorization_token?: AuthorizationToken;
32
+ authorization_token?: readonly AuthorizationToken[];
33
33
  rendezvous_timeout?: bigint;
34
34
  expires?: bigint;
35
35
  largest_object?: LargestObject;
@@ -11,7 +11,7 @@ interface AuthorizationToken {
11
11
  }
12
12
  interface Draft17SetupOptions {
13
13
  path?: string;
14
- authorization_token?: AuthorizationToken;
14
+ authorization_token?: readonly AuthorizationToken[];
15
15
  max_auth_token_cache_size?: bigint;
16
16
  authority?: string;
17
17
  moqt_implementation?: string;
@@ -29,7 +29,7 @@ interface LargestObject {
29
29
  }
30
30
  interface Draft17Params {
31
31
  delivery_timeout?: bigint;
32
- authorization_token?: AuthorizationToken;
32
+ authorization_token?: readonly AuthorizationToken[];
33
33
  rendezvous_timeout?: bigint;
34
34
  expires?: bigint;
35
35
  largest_object?: LargestObject;
@@ -12,13 +12,13 @@ interface AuthorizationToken {
12
12
  interface Draft13SetupParams {
13
13
  path?: string;
14
14
  max_request_id?: bigint;
15
- authorization_token?: AuthorizationToken;
15
+ authorization_token?: readonly AuthorizationToken[];
16
16
  max_auth_token_cache_size?: bigint;
17
17
  unknown?: UnknownParam[];
18
18
  }
19
19
  interface Draft13Params {
20
20
  delivery_timeout?: bigint;
21
- authorization_token?: AuthorizationToken;
21
+ authorization_token?: readonly AuthorizationToken[];
22
22
  max_cache_duration?: bigint;
23
23
  unknown?: UnknownParam[];
24
24
  }
@@ -12,13 +12,13 @@ interface AuthorizationToken {
12
12
  interface Draft13SetupParams {
13
13
  path?: string;
14
14
  max_request_id?: bigint;
15
- authorization_token?: AuthorizationToken;
15
+ authorization_token?: readonly AuthorizationToken[];
16
16
  max_auth_token_cache_size?: bigint;
17
17
  unknown?: UnknownParam[];
18
18
  }
19
19
  interface Draft13Params {
20
20
  delivery_timeout?: bigint;
21
- authorization_token?: AuthorizationToken;
21
+ authorization_token?: readonly AuthorizationToken[];
22
22
  max_cache_duration?: bigint;
23
23
  unknown?: UnknownParam[];
24
24
  }
@@ -12,7 +12,7 @@ interface AuthorizationToken {
12
12
  interface Draft15SetupParams {
13
13
  path?: string;
14
14
  max_request_id?: bigint;
15
- authorization_token?: AuthorizationToken;
15
+ authorization_token?: readonly AuthorizationToken[];
16
16
  max_auth_token_cache_size?: bigint;
17
17
  authority?: string;
18
18
  moqt_implementation?: string;
@@ -30,7 +30,7 @@ interface LargestObject {
30
30
  }
31
31
  interface Draft15Params {
32
32
  delivery_timeout?: bigint;
33
- authorization_token?: AuthorizationToken;
33
+ authorization_token?: readonly AuthorizationToken[];
34
34
  max_cache_duration?: bigint;
35
35
  expires?: bigint;
36
36
  largest_object?: LargestObject;
@@ -12,7 +12,7 @@ interface AuthorizationToken {
12
12
  interface Draft15SetupParams {
13
13
  path?: string;
14
14
  max_request_id?: bigint;
15
- authorization_token?: AuthorizationToken;
15
+ authorization_token?: readonly AuthorizationToken[];
16
16
  max_auth_token_cache_size?: bigint;
17
17
  authority?: string;
18
18
  moqt_implementation?: string;
@@ -30,7 +30,7 @@ interface LargestObject {
30
30
  }
31
31
  interface Draft15Params {
32
32
  delivery_timeout?: bigint;
33
- authorization_token?: AuthorizationToken;
33
+ authorization_token?: readonly AuthorizationToken[];
34
34
  max_cache_duration?: bigint;
35
35
  expires?: bigint;
36
36
  largest_object?: LargestObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moqtap/codec",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "MoQT wire-format codec and session state machine — multi-draft, zero dependencies",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -221,7 +221,7 @@
221
221
  "test": "vitest run"
222
222
  },
223
223
  "devDependencies": {
224
- "@moqtap/test-vectors": "^0.13.0",
224
+ "@moqtap/test-vectors": "^0.15.0",
225
225
  "tsup": "^8.0.0",
226
226
  "typescript": "^5.5.0",
227
227
  "vitest": "^3.0.0"
@@ -146,15 +146,15 @@ function decodeSetupParams(r: BufferReader): Draft11SetupParams {
146
146
 
147
147
  function encodeParams(params: Draft11Params, w: BufferWriter): void {
148
148
  let count = params.unknown ? params.unknown.length : 0
149
- if (params.authorization_token !== undefined) count++
149
+ count += params.authorization_token?.length ?? 0
150
150
  if (params.delivery_timeout !== undefined) count++
151
151
  if (params.max_cache_duration !== undefined) count++
152
152
  w.writeVarInt(count)
153
153
 
154
- if (params.authorization_token !== undefined) {
154
+ for (const token of params.authorization_token ?? []) {
155
155
  // AUTHORIZATION_TOKEN = 0x01 (odd → length-prefixed)
156
156
  w.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
157
- const at = params.authorization_token
157
+ const at = token
158
158
  const tmpW = new BufferWriter(64)
159
159
  tmpW.writeVarInt(at.alias_type)
160
160
  tmpW.writeVarInt(at.token_type)
@@ -227,11 +227,14 @@ function decodeParams(r: BufferReader): Draft11Params {
227
227
  const token_type = r.readVarInt()
228
228
  const tokenBytesLen = length - (r.offset - startOff)
229
229
  const tokenBytes = r.readBytes(tokenBytesLen)
230
- result.authorization_token = {
231
- alias_type,
232
- token_type,
233
- token_value: tokenBytes,
234
- }
230
+ result.authorization_token = [
231
+ ...(result.authorization_token ?? []),
232
+ {
233
+ alias_type,
234
+ token_type,
235
+ token_value: tokenBytes,
236
+ },
237
+ ]
235
238
  } else {
236
239
  const bytes = r.readBytes(length)
237
240
  unknown.push({
@@ -24,7 +24,7 @@ export interface Draft11SetupParams {
24
24
 
25
25
  // Version-specific parameters — even/odd convention
26
26
  export interface Draft11Params {
27
- authorization_token?: AuthorizationToken // 0x01 odd
27
+ authorization_token?: readonly AuthorizationToken[] // 0x01 odd
28
28
  delivery_timeout?: bigint // 0x02 even
29
29
  max_cache_duration?: bigint // 0x04 even
30
30
  unknown?: UnknownParam[]
@@ -73,7 +73,7 @@ function encodeSetupParams(params: Draft12SetupParams, w: BufferWriter): void {
73
73
  let count = 0
74
74
  if (params.path !== undefined) count++
75
75
  if (params.max_request_id !== undefined) count++
76
- if (params.authorization_token !== undefined) count++
76
+ count += params.authorization_token?.length ?? 0
77
77
  if (params.unknown) count += params.unknown.length
78
78
 
79
79
  w.writeVarInt(count)
@@ -88,9 +88,9 @@ function encodeSetupParams(params: Draft12SetupParams, w: BufferWriter): void {
88
88
  w.writeVarInt(SETUP_PARAM_MAX_REQUEST_ID)
89
89
  w.writeVarInt(params.max_request_id)
90
90
  }
91
- if (params.authorization_token !== undefined) {
91
+ for (const token of params.authorization_token ?? []) {
92
92
  w.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
93
- const at = params.authorization_token
93
+ const at = token
94
94
  const tmpW = new BufferWriter(64)
95
95
  tmpW.writeVarInt(at.alias_type)
96
96
  tmpW.writeVarInt(at.token_type)
@@ -148,11 +148,14 @@ function decodeSetupParams(r: BufferReader): Draft12SetupParams {
148
148
  const token_type = r.readVarInt()
149
149
  const tokenBytesLen = length - (r.offset - startOff)
150
150
  const tokenBytes = r.readBytes(tokenBytesLen)
151
- result.authorization_token = {
152
- alias_type,
153
- token_type,
154
- token_value: tokenBytes,
155
- }
151
+ result.authorization_token = [
152
+ ...(result.authorization_token ?? []),
153
+ {
154
+ alias_type,
155
+ token_type,
156
+ token_value: tokenBytes,
157
+ },
158
+ ]
156
159
  } else {
157
160
  const bytes = r.readBytes(length)
158
161
  unknown.push({
@@ -174,7 +177,7 @@ function decodeSetupParams(r: BufferReader): Draft12SetupParams {
174
177
  function encodeParams(params: Draft12Params, w: BufferWriter): void {
175
178
  let count = params.unknown ? params.unknown.length : 0
176
179
  if (params.delivery_timeout !== undefined) count++
177
- if (params.authorization_token !== undefined) count++
180
+ count += params.authorization_token?.length ?? 0
178
181
  if (params.max_cache_duration !== undefined) count++
179
182
  w.writeVarInt(count)
180
183
 
@@ -183,10 +186,10 @@ function encodeParams(params: Draft12Params, w: BufferWriter): void {
183
186
  w.writeVarInt(PARAM_DELIVERY_TIMEOUT)
184
187
  w.writeVarInt(params.delivery_timeout)
185
188
  }
186
- if (params.authorization_token !== undefined) {
189
+ for (const token of params.authorization_token ?? []) {
187
190
  // AUTHORIZATION_TOKEN = 0x03 (odd → length-prefixed)
188
191
  w.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
189
- const at = params.authorization_token
192
+ const at = token
190
193
  const tmpW = new BufferWriter(64)
191
194
  tmpW.writeVarInt(at.alias_type)
192
195
  tmpW.writeVarInt(at.token_type)
@@ -254,11 +257,14 @@ function decodeParams(r: BufferReader): Draft12Params {
254
257
  const token_type = r.readVarInt()
255
258
  const tokenBytesLen = length - (r.offset - startOff)
256
259
  const tokenBytes = r.readBytes(tokenBytesLen)
257
- result.authorization_token = {
258
- alias_type,
259
- token_type,
260
- token_value: tokenBytes,
261
- }
260
+ result.authorization_token = [
261
+ ...(result.authorization_token ?? []),
262
+ {
263
+ alias_type,
264
+ token_type,
265
+ token_value: tokenBytes,
266
+ },
267
+ ]
262
268
  } else {
263
269
  const bytes = r.readBytes(length)
264
270
  unknown.push({
@@ -19,14 +19,14 @@ export interface AuthorizationToken {
19
19
  export interface Draft12SetupParams {
20
20
  path?: string // 0x01 odd
21
21
  max_request_id?: bigint // 0x02 even
22
- authorization_token?: AuthorizationToken // 0x03 odd
22
+ authorization_token?: readonly AuthorizationToken[] // 0x03 odd
23
23
  unknown?: UnknownParam[]
24
24
  }
25
25
 
26
26
  // Version-specific parameters — even/odd convention
27
27
  export interface Draft12Params {
28
28
  delivery_timeout?: bigint // 0x02 even
29
- authorization_token?: AuthorizationToken // 0x03 odd
29
+ authorization_token?: readonly AuthorizationToken[] // 0x03 odd
30
30
  max_cache_duration?: bigint // 0x04 even
31
31
  unknown?: UnknownParam[]
32
32
  }
@@ -115,7 +115,7 @@ function encodeSetupParams(params: Draft13SetupParams, w: BufferWriter): void {
115
115
  let count = 0
116
116
  if (params.path !== undefined) count++
117
117
  if (params.max_request_id !== undefined) count++
118
- if (params.authorization_token !== undefined) count++
118
+ count += params.authorization_token?.length ?? 0
119
119
  if (params.max_auth_token_cache_size !== undefined) count++
120
120
  if (params.unknown) count += params.unknown.length
121
121
 
@@ -131,9 +131,9 @@ function encodeSetupParams(params: Draft13SetupParams, w: BufferWriter): void {
131
131
  w.writeVarInt(SETUP_PARAM_MAX_REQUEST_ID)
132
132
  w.writeVarInt(params.max_request_id)
133
133
  }
134
- if (params.authorization_token !== undefined) {
134
+ for (const token of params.authorization_token ?? []) {
135
135
  w.writeVarInt(SETUP_PARAM_AUTHORIZATION_TOKEN)
136
- encodeAuthorizationToken(params.authorization_token, w)
136
+ encodeAuthorizationToken(token, w)
137
137
  }
138
138
  if (params.max_auth_token_cache_size !== undefined) {
139
139
  w.writeVarInt(SETUP_PARAM_MAX_AUTH_TOKEN_CACHE_SIZE)
@@ -185,7 +185,10 @@ function decodeSetupParams(r: BufferReader): Draft13SetupParams {
185
185
  const bytes = r.readBytes(length)
186
186
  result.path = textDecoder.decode(bytes)
187
187
  } else if (paramType === SETUP_PARAM_AUTHORIZATION_TOKEN) {
188
- result.authorization_token = decodeAuthorizationToken(r, length)
188
+ result.authorization_token = [
189
+ ...(result.authorization_token ?? []),
190
+ decodeAuthorizationToken(r, length),
191
+ ]
189
192
  } else {
190
193
  const bytes = r.readBytes(length)
191
194
  unknown.push({
@@ -207,7 +210,7 @@ function decodeSetupParams(r: BufferReader): Draft13SetupParams {
207
210
  function encodeParams(params: Draft13Params, w: BufferWriter): void {
208
211
  let count = params.unknown ? params.unknown.length : 0
209
212
  if (params.delivery_timeout !== undefined) count++
210
- if (params.authorization_token !== undefined) count++
213
+ count += params.authorization_token?.length ?? 0
211
214
  if (params.max_cache_duration !== undefined) count++
212
215
  w.writeVarInt(count)
213
216
 
@@ -216,10 +219,10 @@ function encodeParams(params: Draft13Params, w: BufferWriter): void {
216
219
  w.writeVarInt(PARAM_DELIVERY_TIMEOUT)
217
220
  w.writeVarInt(params.delivery_timeout)
218
221
  }
219
- if (params.authorization_token !== undefined) {
222
+ for (const token of params.authorization_token ?? []) {
220
223
  // AUTHORIZATION_TOKEN = 0x03 (odd → length-prefixed)
221
224
  w.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
222
- encodeAuthorizationToken(params.authorization_token, w)
225
+ encodeAuthorizationToken(token, w)
223
226
  }
224
227
  if (params.max_cache_duration !== undefined) {
225
228
  // MAX_CACHE_DURATION = 0x04 (even → bare varint)
@@ -275,7 +278,10 @@ function decodeParams(r: BufferReader): Draft13Params {
275
278
  const length = Number(r.readVarInt())
276
279
 
277
280
  if (paramType === PARAM_AUTHORIZATION_TOKEN) {
278
- result.authorization_token = decodeAuthorizationToken(r, length)
281
+ result.authorization_token = [
282
+ ...(result.authorization_token ?? []),
283
+ decodeAuthorizationToken(r, length),
284
+ ]
279
285
  } else {
280
286
  const bytes = r.readBytes(length)
281
287
  unknown.push({
@@ -21,7 +21,7 @@ export interface AuthorizationToken {
21
21
  export interface Draft13SetupParams {
22
22
  path?: string // 0x01 odd
23
23
  max_request_id?: bigint // 0x02 even
24
- authorization_token?: AuthorizationToken // 0x03 odd
24
+ authorization_token?: readonly AuthorizationToken[] // 0x03 odd
25
25
  max_auth_token_cache_size?: bigint // 0x04 even
26
26
  unknown?: UnknownParam[]
27
27
  }
@@ -29,7 +29,7 @@ export interface Draft13SetupParams {
29
29
  // Version-specific parameters — even/odd convention
30
30
  export interface Draft13Params {
31
31
  delivery_timeout?: bigint // 0x02 even
32
- authorization_token?: AuthorizationToken // 0x03 odd
32
+ authorization_token?: readonly AuthorizationToken[] // 0x03 odd
33
33
  max_cache_duration?: bigint // 0x04 even
34
34
  unknown?: UnknownParam[]
35
35
  }
@@ -78,7 +78,7 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
78
78
  if (params.role !== undefined) count++
79
79
  if (params.path !== undefined) count++
80
80
  if (params.max_request_id !== undefined) count++
81
- if (params.authorization_token !== undefined) count++
81
+ count += params.authorization_token?.length ?? 0
82
82
  if (params.authority !== undefined) count++
83
83
  if (params.max_auth_token_cache_size !== undefined) count++
84
84
  if (params.moqt_implementation !== undefined) count++
@@ -100,9 +100,9 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
100
100
  writer.writeVarInt(PARAM_MAX_REQUEST_ID)
101
101
  writer.writeVarInt(params.max_request_id)
102
102
  }
103
- if (params.authorization_token !== undefined) {
103
+ for (const token of params.authorization_token ?? []) {
104
104
  writer.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
105
- const tok = params.authorization_token
105
+ const tok = token
106
106
  const tmpWriter = new BufferWriter(64)
107
107
  tmpWriter.writeVarInt(tok.alias_type)
108
108
  if (tok.token_type !== undefined) {
@@ -187,7 +187,10 @@ function decodeSetupParams(reader: BufferReader): Draft14Params {
187
187
  tok.token_value = new Uint8Array(tokenValue)
188
188
  }
189
189
  }
190
- result.authorization_token = tok as unknown as AuthorizationToken
190
+ result.authorization_token = [
191
+ ...(result.authorization_token ?? []),
192
+ tok as unknown as AuthorizationToken,
193
+ ]
191
194
  } else if (paramType === PARAM_AUTHORITY) {
192
195
  result.authority = textDecoder.decode(bytes)
193
196
  } else if (paramType === PARAM_MOQT_IMPLEMENTATION) {
@@ -209,7 +212,7 @@ function decodeSetupParams(reader: BufferReader): Draft14Params {
209
212
  function encodeMessageParams(params: Draft14Params, writer: BufferWriter): void {
210
213
  let count = 0
211
214
  if (params.delivery_timeout !== undefined) count++
212
- if (params.authorization_token !== undefined) count++
215
+ count += params.authorization_token?.length ?? 0
213
216
  if (params.max_cache_duration !== undefined) count++
214
217
  if (params.unknown) count += params.unknown.length
215
218
 
@@ -219,9 +222,9 @@ function encodeMessageParams(params: Draft14Params, writer: BufferWriter): void
219
222
  writer.writeVarInt(PARAM_DELIVERY_TIMEOUT)
220
223
  writer.writeVarInt(params.delivery_timeout)
221
224
  }
222
- if (params.authorization_token !== undefined) {
225
+ for (const token of params.authorization_token ?? []) {
223
226
  writer.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
224
- const tok = params.authorization_token
227
+ const tok = token
225
228
  const tmpWriter = new BufferWriter(64)
226
229
  tmpWriter.writeVarInt(tok.alias_type)
227
230
  if (tok.token_type !== undefined) {
@@ -290,7 +293,10 @@ function decodeMessageParams(reader: BufferReader): Draft14Params {
290
293
  tok.token_value = new Uint8Array(tokenValue)
291
294
  }
292
295
  }
293
- result.authorization_token = tok as unknown as AuthorizationToken
296
+ result.authorization_token = [
297
+ ...(result.authorization_token ?? []),
298
+ tok as unknown as AuthorizationToken,
299
+ ]
294
300
  } else {
295
301
  unknown.push({
296
302
  id: `0x${paramType.toString(16)}`,
@@ -47,7 +47,7 @@ export interface Draft14Params {
47
47
  moqt_implementation?: string // 0x07 odd, length-prefixed UTF-8
48
48
  // Message parameters (SUBSCRIBE, PUBLISH, etc.)
49
49
  delivery_timeout?: bigint
50
- authorization_token?: AuthorizationToken
50
+ authorization_token?: readonly AuthorizationToken[]
51
51
  max_cache_duration?: bigint
52
52
  // Unknown / extension
53
53
  unknown?: UnknownParam[]