@moqtap/codec 0.11.0 → 0.12.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 (132) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +3 -2
  3. package/dist/{auth-redaction-DsdLq4Qs.d.cts → auth-redaction-B9JJOlIY.d.cts} +0 -2
  4. package/dist/{auth-redaction-DsdLq4Qs.d.ts → auth-redaction-B9JJOlIY.d.ts} +0 -2
  5. package/dist/chunk-OBATJBNL.cjs +868 -0
  6. package/dist/chunk-T2TCLZZV.js +2304 -0
  7. package/dist/chunk-WB65UG7G.cjs +2304 -0
  8. package/dist/chunk-XPCBPACE.js +868 -0
  9. package/dist/{codec-c0YEwwWn.d.ts → codec-B-oUU-cp.d.ts} +2 -2
  10. package/dist/{codec-DHzKAUCa.d.cts → codec-B3RpCI9k.d.cts} +2 -2
  11. package/dist/{codec-Clu_skx8.d.cts → codec-B5pcOS3m.d.cts} +2 -2
  12. package/dist/{codec-DxtgPxJS.d.ts → codec-BLjxwK2f.d.ts} +2 -2
  13. package/dist/{codec-BkheTXO7.d.ts → codec-BV3CL_3m.d.ts} +2 -2
  14. package/dist/{codec-Bb6GKTrv.d.ts → codec-BYCDWgED.d.ts} +2 -2
  15. package/dist/{codec-ejDu-va6.d.ts → codec-Bwqq7ZQT.d.ts} +2 -2
  16. package/dist/{codec-76xzrLTL.d.cts → codec-BzWxOFby.d.cts} +2 -2
  17. package/dist/{codec-CM5yd6n3.d.ts → codec-C-nJhNNl.d.ts} +2 -2
  18. package/dist/{codec-BgpfHoAd.d.cts → codec-C11VEPbQ.d.cts} +2 -2
  19. package/dist/codec-C9U0Vzy9.d.cts +68 -0
  20. package/dist/{codec-yYKGOipj.d.ts → codec-CCx22jnd.d.ts} +2 -2
  21. package/dist/{codec-mVYqkIUF.d.ts → codec-CP3zkfTv.d.ts} +2 -2
  22. package/dist/{codec-qSbO5nOa.d.ts → codec-CRmOLDpt.d.ts} +2 -2
  23. package/dist/{codec-CpOpemR8.d.cts → codec-CUu56DDU.d.cts} +2 -2
  24. package/dist/codec-Cb8mUre3.d.ts +68 -0
  25. package/dist/{codec-DELe00w_.d.cts → codec-CemqAQdR.d.cts} +2 -2
  26. package/dist/{codec-8p40WdLg.d.ts → codec-CxMvsVMS.d.ts} +2 -2
  27. package/dist/{codec-zfzg9uiy.d.cts → codec-DIgMVTi4.d.cts} +2 -2
  28. package/dist/{codec-DdVBtvx7.d.ts → codec-DYzozF68.d.ts} +2 -2
  29. package/dist/{codec-kaBUzdpV.d.ts → codec-D_O9zxax.d.ts} +2 -2
  30. package/dist/{codec-XLrnreeu.d.cts → codec-Ddc-QxV6.d.cts} +2 -2
  31. package/dist/{codec-C5s1eBJX.d.cts → codec-DoojMl2z.d.cts} +2 -2
  32. package/dist/{codec-DlxGuYMv.d.ts → codec-DqdjiOQF.d.ts} +2 -2
  33. package/dist/{codec-Cshdl9Tt.d.cts → codec-Dstemwrq.d.cts} +2 -2
  34. package/dist/{codec-BN2Bu0KI.d.ts → codec-Dt6nuejp.d.ts} +2 -2
  35. package/dist/{codec-BwVDkokh.d.cts → codec-DuYhd8fP.d.cts} +2 -2
  36. package/dist/{codec-I8u2pfS4.d.cts → codec-DwNOFgPU.d.cts} +2 -2
  37. package/dist/{codec-GAY4lybi.d.cts → codec-l01BpNhF.d.cts} +2 -2
  38. package/dist/{codec-Cb8HC3XV.d.cts → codec-psN2vB6I.d.cts} +2 -2
  39. package/dist/draft07-session.d.cts +3 -3
  40. package/dist/draft07-session.d.ts +3 -3
  41. package/dist/draft07.d.cts +4 -4
  42. package/dist/draft07.d.ts +4 -4
  43. package/dist/draft08-session.d.cts +3 -3
  44. package/dist/draft08-session.d.ts +3 -3
  45. package/dist/draft08.d.cts +5 -5
  46. package/dist/draft08.d.ts +5 -5
  47. package/dist/draft09-session.d.cts +3 -3
  48. package/dist/draft09-session.d.ts +3 -3
  49. package/dist/draft09.d.cts +5 -5
  50. package/dist/draft09.d.ts +5 -5
  51. package/dist/draft10-session.d.cts +3 -3
  52. package/dist/draft10-session.d.ts +3 -3
  53. package/dist/draft10.d.cts +5 -5
  54. package/dist/draft10.d.ts +5 -5
  55. package/dist/draft11-session.d.cts +3 -3
  56. package/dist/draft11-session.d.ts +3 -3
  57. package/dist/draft11.d.cts +5 -5
  58. package/dist/draft11.d.ts +5 -5
  59. package/dist/draft12-session.d.cts +3 -3
  60. package/dist/draft12-session.d.ts +3 -3
  61. package/dist/draft12.d.cts +5 -5
  62. package/dist/draft12.d.ts +5 -5
  63. package/dist/draft13-session.d.cts +3 -3
  64. package/dist/draft13-session.d.ts +3 -3
  65. package/dist/draft13.d.cts +5 -5
  66. package/dist/draft13.d.ts +5 -5
  67. package/dist/draft14-session.d.cts +3 -3
  68. package/dist/draft14-session.d.ts +3 -3
  69. package/dist/draft14.d.cts +5 -5
  70. package/dist/draft14.d.ts +5 -5
  71. package/dist/draft15-session.d.cts +3 -3
  72. package/dist/draft15-session.d.ts +3 -3
  73. package/dist/draft15.d.cts +5 -5
  74. package/dist/draft15.d.ts +5 -5
  75. package/dist/draft16-session.d.cts +3 -3
  76. package/dist/draft16-session.d.ts +3 -3
  77. package/dist/draft16.d.cts +5 -5
  78. package/dist/draft16.d.ts +5 -5
  79. package/dist/draft17-session.d.cts +3 -3
  80. package/dist/draft17-session.d.ts +3 -3
  81. package/dist/draft17.d.cts +4 -4
  82. package/dist/draft17.d.ts +4 -4
  83. package/dist/draft18-session.d.cts +3 -3
  84. package/dist/draft18-session.d.ts +3 -3
  85. package/dist/draft18.d.cts +4 -4
  86. package/dist/draft18.d.ts +4 -4
  87. package/dist/draft19-session.d.cts +3 -3
  88. package/dist/draft19-session.d.ts +3 -3
  89. package/dist/draft19.d.cts +4 -4
  90. package/dist/draft19.d.ts +4 -4
  91. package/dist/draft20-session.d.cts +3 -3
  92. package/dist/draft20-session.d.ts +3 -3
  93. package/dist/draft20.d.cts +4 -4
  94. package/dist/draft20.d.ts +4 -4
  95. package/dist/draft21-session.cjs +8 -0
  96. package/dist/draft21-session.d.cts +195 -0
  97. package/dist/draft21-session.d.ts +195 -0
  98. package/dist/draft21-session.js +8 -0
  99. package/dist/draft21.cjs +222 -0
  100. package/dist/draft21.d.cts +176 -0
  101. package/dist/draft21.d.ts +176 -0
  102. package/dist/draft21.js +222 -0
  103. package/dist/index.cjs +7 -1
  104. package/dist/index.d.cts +23 -18
  105. package/dist/index.d.ts +23 -18
  106. package/dist/index.js +7 -1
  107. package/dist/{session-types-Dn7b3RZM.d.ts → session-types-Cxx7W8zZ.d.ts} +1 -1
  108. package/dist/{session-types-B9idsih-.d.cts → session-types-DZkI_qFG.d.cts} +1 -1
  109. package/dist/session.cjs +5 -1
  110. package/dist/session.d.cts +5 -3
  111. package/dist/session.d.ts +5 -3
  112. package/dist/session.js +5 -1
  113. package/dist/{types-DG5_iKuv.d.cts → types-2NisMA8_.d.cts} +1 -1
  114. package/dist/{types-DG5_iKuv.d.ts → types-2NisMA8_.d.ts} +1 -1
  115. package/dist/types-DDwidj2d.d.cts +371 -0
  116. package/dist/types-DDwidj2d.d.ts +371 -0
  117. package/package.json +14 -2
  118. package/src/core/auth-redaction.ts +0 -2
  119. package/src/core/types.ts +1 -0
  120. package/src/drafts/draft19/codec.ts +1 -1
  121. package/src/drafts/draft20/codec.ts +1 -1
  122. package/src/drafts/draft21/codec.ts +1816 -0
  123. package/src/drafts/draft21/data-streams.ts +1338 -0
  124. package/src/drafts/draft21/error-codes.ts +135 -0
  125. package/src/drafts/draft21/index.ts +168 -0
  126. package/src/drafts/draft21/messages.ts +68 -0
  127. package/src/drafts/draft21/rules.ts +107 -0
  128. package/src/drafts/draft21/session-fsm.ts +1063 -0
  129. package/src/drafts/draft21/session.ts +21 -0
  130. package/src/drafts/draft21/types.ts +473 -0
  131. package/src/index.ts +9 -1
  132. package/src/session.ts +4 -0
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft13Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft13DataStream } from './types-DjxexghA.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft13Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft13DataStream } from './types-DjxexghA.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft07Message, S as SubgroupStream, b as DatagramObject, F as FetchStream } from './types-Dl4IaAHR.cjs';
4
4
 
5
5
  interface Draft07Codec extends BaseCodec<Draft07Message> {
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft09Message, S as SubgroupStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, b as Draft09DataStream } from './types-B3g5G9KP.js';
4
4
 
5
5
  declare function encodeMessage(message: Draft09Message): Uint8Array;
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft11Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft11DataStream } from './types-D0kTgUuL.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft17Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft17DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-DAnalt5K.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft18Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft18DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-DxXNP32l.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft20Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft20DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CwN7AEoL.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft07Message, S as SubgroupStream, b as DatagramObject, F as FetchStream } from './types-Dl4IaAHR.js';
4
4
 
5
5
  interface Draft07Codec extends BaseCodec<Draft07Message> {
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft11Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft11DataStream } from './types-D0kTgUuL.cjs';
4
4
 
5
5
  /**
@@ -0,0 +1,68 @@
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
+ import { D as Draft21Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft21DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-DDwidj2d.cjs';
4
+
5
+ /**
6
+ * `PUBLISH_DONE.Stream Count` "unknown" sentinel — draft-21 Section 9.9.
7
+ *
8
+ * draft-19 used `2^62 - 1`; draft-20 raised it to `2^64 - 1`. Both are
9
+ * encodable because MOQT's vi64 (Section 8.1) is a leading-ones-length
10
+ * prefix reaching a full 64 bits in nine bytes — it is NOT the QUIC varint and
11
+ * has no `2^62 - 1` ceiling. On the wire this is `ff` followed by eight `ff`
12
+ * bytes.
13
+ *
14
+ * JS `bigint` is required: `2^64 - 1` does not fit a `number`, and comparing a
15
+ * `Number(stream_count)` against this sentinel would be wrong for every value
16
+ * above `2^53`.
17
+ *
18
+ * Note (SPEC-DELTA Section 11 Q14): unlike the old `2^62 - 1` marker, this
19
+ * value is also a well-formed exact count. There is no longer any headroom
20
+ * that separates "unknown" from "absurdly many streams"; the draft does not
21
+ * acknowledge the collision.
22
+ */
23
+ declare const UNKNOWN_STREAM_COUNT = 18446744073709551615n;
24
+ /**
25
+ * Encode a draft-21 control message: type (vi64) + length (uint16 BE) + payload.
26
+ */
27
+ declare function encodeMessage(message: Draft21Message): Uint8Array;
28
+ /**
29
+ * Decode a draft-21 control message from bytes (type + uint16 length + payload).
30
+ */
31
+ declare function decodeMessage(bytes: Uint8Array): DecodeResult<Draft21Message>;
32
+
33
+ declare function createStreamDecoder(): TransformStream<Uint8Array, Draft21Message>;
34
+ interface Draft21Codec extends BaseCodec<Draft21Message> {
35
+ readonly draft: '21';
36
+ encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
37
+ encodeDatagram(dg: DatagramObject): Uint8Array;
38
+ encodeFetchStream(stream: FetchStream): Uint8Array;
39
+ decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
40
+ decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
41
+ decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
42
+ decodeDataStream(streamType: 'subgroup' | 'datagram' | 'fetch', bytes: Uint8Array): DecodeResult<Draft21DataStream>;
43
+ createStreamDecoder(): TransformStream<Uint8Array, Draft21Message>;
44
+ createSubgroupStreamDecoder(): TransformStream<Uint8Array, SubgroupStreamHeader | ObjectPayload>;
45
+ createFetchStreamDecoder(): TransformStream<Uint8Array, FetchStreamHeader | ObjectPayload>;
46
+ createDataStreamDecoder(): TransformStream<Uint8Array, DataStreamEvent>;
47
+ }
48
+ declare function createDraft21Codec(): Draft21Codec;
49
+ /**
50
+ * Overwrite every Authorization Token value in a draft-21 control frame.
51
+ *
52
+ * One decode, whose *output is discarded*: the point is not to read the
53
+ * message, it is to learn where the tokens were so the caller never has to hold
54
+ * a frame that contains one. A caller that also wants the message should decode
55
+ * the **redacted** frame with {@link decodeMessage}, which then cannot produce a
56
+ * token value because there is no longer one in the bytes.
57
+ *
58
+ * A frame that fails to decode is still redacted as far as the decode got. That
59
+ * is the useful direction to fail in: a value that was read is a value that was
60
+ * exposed, whatever went wrong after it.
61
+ *
62
+ * See {@link AuthRedaction.incomplete} for the one result a caller must not
63
+ * treat as clean, and {@link AuthRedaction.decoded} for the residual it cannot
64
+ * close.
65
+ */
66
+ declare function redactAuthTokens(bytes: Uint8Array): AuthRedaction;
67
+
68
+ export { type Draft21Codec as D, UNKNOWN_STREAM_COUNT as U, createStreamDecoder as a, createDraft21Codec as c, decodeMessage as d, encodeMessage as e, redactAuthTokens as r };
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft14Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft14DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CmqT0jUf.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft20Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft20DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CwN7AEoL.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft15Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft15DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CuibHYcf.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft08Message, S as SubgroupStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, b as Draft08DataStream } from './types-jV1yDDBA.cjs';
4
4
 
5
5
  /**
@@ -0,0 +1,68 @@
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
+ import { D as Draft21Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft21DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-DDwidj2d.js';
4
+
5
+ /**
6
+ * `PUBLISH_DONE.Stream Count` "unknown" sentinel — draft-21 Section 9.9.
7
+ *
8
+ * draft-19 used `2^62 - 1`; draft-20 raised it to `2^64 - 1`. Both are
9
+ * encodable because MOQT's vi64 (Section 8.1) is a leading-ones-length
10
+ * prefix reaching a full 64 bits in nine bytes — it is NOT the QUIC varint and
11
+ * has no `2^62 - 1` ceiling. On the wire this is `ff` followed by eight `ff`
12
+ * bytes.
13
+ *
14
+ * JS `bigint` is required: `2^64 - 1` does not fit a `number`, and comparing a
15
+ * `Number(stream_count)` against this sentinel would be wrong for every value
16
+ * above `2^53`.
17
+ *
18
+ * Note (SPEC-DELTA Section 11 Q14): unlike the old `2^62 - 1` marker, this
19
+ * value is also a well-formed exact count. There is no longer any headroom
20
+ * that separates "unknown" from "absurdly many streams"; the draft does not
21
+ * acknowledge the collision.
22
+ */
23
+ declare const UNKNOWN_STREAM_COUNT = 18446744073709551615n;
24
+ /**
25
+ * Encode a draft-21 control message: type (vi64) + length (uint16 BE) + payload.
26
+ */
27
+ declare function encodeMessage(message: Draft21Message): Uint8Array;
28
+ /**
29
+ * Decode a draft-21 control message from bytes (type + uint16 length + payload).
30
+ */
31
+ declare function decodeMessage(bytes: Uint8Array): DecodeResult<Draft21Message>;
32
+
33
+ declare function createStreamDecoder(): TransformStream<Uint8Array, Draft21Message>;
34
+ interface Draft21Codec extends BaseCodec<Draft21Message> {
35
+ readonly draft: '21';
36
+ encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
37
+ encodeDatagram(dg: DatagramObject): Uint8Array;
38
+ encodeFetchStream(stream: FetchStream): Uint8Array;
39
+ decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
40
+ decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
41
+ decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
42
+ decodeDataStream(streamType: 'subgroup' | 'datagram' | 'fetch', bytes: Uint8Array): DecodeResult<Draft21DataStream>;
43
+ createStreamDecoder(): TransformStream<Uint8Array, Draft21Message>;
44
+ createSubgroupStreamDecoder(): TransformStream<Uint8Array, SubgroupStreamHeader | ObjectPayload>;
45
+ createFetchStreamDecoder(): TransformStream<Uint8Array, FetchStreamHeader | ObjectPayload>;
46
+ createDataStreamDecoder(): TransformStream<Uint8Array, DataStreamEvent>;
47
+ }
48
+ declare function createDraft21Codec(): Draft21Codec;
49
+ /**
50
+ * Overwrite every Authorization Token value in a draft-21 control frame.
51
+ *
52
+ * One decode, whose *output is discarded*: the point is not to read the
53
+ * message, it is to learn where the tokens were so the caller never has to hold
54
+ * a frame that contains one. A caller that also wants the message should decode
55
+ * the **redacted** frame with {@link decodeMessage}, which then cannot produce a
56
+ * token value because there is no longer one in the bytes.
57
+ *
58
+ * A frame that fails to decode is still redacted as far as the decode got. That
59
+ * is the useful direction to fail in: a value that was read is a value that was
60
+ * exposed, whatever went wrong after it.
61
+ *
62
+ * See {@link AuthRedaction.incomplete} for the one result a caller must not
63
+ * treat as clean, and {@link AuthRedaction.decoded} for the residual it cannot
64
+ * close.
65
+ */
66
+ declare function redactAuthTokens(bytes: Uint8Array): AuthRedaction;
67
+
68
+ export { type Draft21Codec as D, UNKNOWN_STREAM_COUNT as U, createStreamDecoder as a, createDraft21Codec as c, decodeMessage as d, encodeMessage as e, redactAuthTokens as r };
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft18Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft18DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-DxXNP32l.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft12Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft12DataStream } from './types-CI_SX4Xe.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft14Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft14DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CmqT0jUf.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft10Message, S as SubgroupStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, b as Draft10DataStream } from './types-0IWbU9Z_.js';
4
4
 
5
5
  declare function encodeMessage(message: Draft10Message): Uint8Array;
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft16Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft16DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-BxTL1NXw.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft15Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft15DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CuibHYcf.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft19Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft19DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-Btp416jt.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft19Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft19DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-Btp416jt.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft09Message, S as SubgroupStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, b as Draft09DataStream } from './types-B3g5G9KP.cjs';
4
4
 
5
5
  declare function encodeMessage(message: Draft09Message): Uint8Array;
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.js';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.js';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.js';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.js';
3
3
  import { D as Draft08Message, S as SubgroupStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, b as Draft08DataStream } from './types-jV1yDDBA.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft17Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft17DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-DAnalt5K.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft10Message, S as SubgroupStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, b as Draft10DataStream } from './types-0IWbU9Z_.cjs';
4
4
 
5
5
  declare function encodeMessage(message: Draft10Message): Uint8Array;
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft12Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft12DataStream } from './types-CI_SX4Xe.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { A as AuthRedaction } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { B as BaseCodec, b as DecodeResult } from './types-DG5_iKuv.cjs';
1
+ import { A as AuthRedaction } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { B as BaseCodec, b as DecodeResult } from './types-2NisMA8_.cjs';
3
3
  import { D as Draft16Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft16DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-BxTL1NXw.cjs';
4
4
 
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { k as SessionStateOptionsRole, a as SessionState } from './session-types-B9idsih-.cjs';
2
- export { A as AnnouncePhase, b as AnnounceState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-B9idsih-.cjs';
1
+ import { k as SessionStateOptionsRole, a as SessionState } from './session-types-DZkI_qFG.cjs';
2
+ export { A as AnnouncePhase, b as AnnounceState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-DZkI_qFG.cjs';
3
3
  import { D as Draft07Message, a as Draft07MessageType } from './types-Dl4IaAHR.cjs';
4
- import './types-DG5_iKuv.cjs';
4
+ import './types-2NisMA8_.cjs';
5
5
 
6
6
  declare function createDraft07SessionState(role: SessionStateOptionsRole): SessionState<Draft07Message, Draft07MessageType>;
7
7
 
@@ -1,7 +1,7 @@
1
- import { k as SessionStateOptionsRole, a as SessionState } from './session-types-Dn7b3RZM.js';
2
- export { A as AnnouncePhase, b as AnnounceState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-Dn7b3RZM.js';
1
+ import { k as SessionStateOptionsRole, a as SessionState } from './session-types-Cxx7W8zZ.js';
2
+ export { A as AnnouncePhase, b as AnnounceState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-Cxx7W8zZ.js';
3
3
  import { D as Draft07Message, a as Draft07MessageType } from './types-Dl4IaAHR.js';
4
- import './types-DG5_iKuv.js';
4
+ import './types-2NisMA8_.js';
5
5
 
6
6
  declare function createDraft07SessionState(role: SessionStateOptionsRole): SessionState<Draft07Message, Draft07MessageType>;
7
7
 
@@ -1,7 +1,7 @@
1
- export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.cjs';
2
- import { b as DecodeResult } from './types-DG5_iKuv.cjs';
3
- export { D as DecodeError, a as DecodeErrorCode } from './types-DG5_iKuv.cjs';
4
- export { D as Draft07Codec, c as createDraft07Codec, r as redactAuthTokens } from './codec-Clu_skx8.cjs';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.cjs';
2
+ import { b as DecodeResult } from './types-2NisMA8_.cjs';
3
+ export { D as DecodeError, a as DecodeErrorCode } from './types-2NisMA8_.cjs';
4
+ export { D as Draft07Codec, c as createDraft07Codec, r as redactAuthTokens } from './codec-B5pcOS3m.cjs';
5
5
  import { b as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft07MessageType, D as Draft07Message } from './types-Dl4IaAHR.cjs';
6
6
  export { A as Announce, c as AnnounceCancel, d as AnnounceError, e as AnnounceOk, C as ClientSetup, f as DataStreamEvent, g as DataStreamHeader, h as Draft07DataStream, i as Draft07Params, j as Draft07SetupParams, k as Fetch, l as FetchCancel, m as FetchError, n as FetchObjectPayload, o as FetchOk, p as FetchStreamHeader, G as GoAway, M as MaxSubscribeId, O as ObjectDatagram, q as ObjectPayload, r as ServerSetup, s as StreamHeaderSubgroup, t as SubgroupStreamHeader, u as Subscribe, v as SubscribeAnnounces, w as SubscribeAnnouncesError, x as SubscribeAnnouncesOk, y as SubscribeDone, z as SubscribeError, B as SubscribeOk, E as SubscribeUpdate, T as TrackStatus, H as TrackStatusRequest, U as Unannounce, I as UnknownParam, J as Unsubscribe, K as UnsubscribeAnnounces } from './types-Dl4IaAHR.cjs';
7
7
 
package/dist/draft07.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.js';
2
- import { b as DecodeResult } from './types-DG5_iKuv.js';
3
- export { D as DecodeError, a as DecodeErrorCode } from './types-DG5_iKuv.js';
4
- export { D as Draft07Codec, c as createDraft07Codec, r as redactAuthTokens } from './codec-CM5yd6n3.js';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.js';
2
+ import { b as DecodeResult } from './types-2NisMA8_.js';
3
+ export { D as DecodeError, a as DecodeErrorCode } from './types-2NisMA8_.js';
4
+ export { D as Draft07Codec, c as createDraft07Codec, r as redactAuthTokens } from './codec-C-nJhNNl.js';
5
5
  import { b as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft07MessageType, D as Draft07Message } from './types-Dl4IaAHR.js';
6
6
  export { A as Announce, c as AnnounceCancel, d as AnnounceError, e as AnnounceOk, C as ClientSetup, f as DataStreamEvent, g as DataStreamHeader, h as Draft07DataStream, i as Draft07Params, j as Draft07SetupParams, k as Fetch, l as FetchCancel, m as FetchError, n as FetchObjectPayload, o as FetchOk, p as FetchStreamHeader, G as GoAway, M as MaxSubscribeId, O as ObjectDatagram, q as ObjectPayload, r as ServerSetup, s as StreamHeaderSubgroup, t as SubgroupStreamHeader, u as Subscribe, v as SubscribeAnnounces, w as SubscribeAnnouncesError, x as SubscribeAnnouncesOk, y as SubscribeDone, z as SubscribeError, B as SubscribeOk, E as SubscribeUpdate, T as TrackStatus, H as TrackStatusRequest, U as Unannounce, I as UnknownParam, J as Unsubscribe, K as UnsubscribeAnnounces } from './types-Dl4IaAHR.js';
7
7
 
@@ -1,7 +1,7 @@
1
- import { k as SessionStateOptionsRole, a as SessionState } from './session-types-B9idsih-.cjs';
2
- export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-B9idsih-.cjs';
1
+ import { k as SessionStateOptionsRole, a as SessionState } from './session-types-DZkI_qFG.cjs';
2
+ export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-DZkI_qFG.cjs';
3
3
  import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.cjs';
4
- import './types-DG5_iKuv.cjs';
4
+ import './types-2NisMA8_.cjs';
5
5
 
6
6
  declare function createDraft08SessionState(role: SessionStateOptionsRole): SessionState<Draft08Message, Draft08MessageType>;
7
7
 
@@ -1,7 +1,7 @@
1
- import { k as SessionStateOptionsRole, a as SessionState } from './session-types-Dn7b3RZM.js';
2
- export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-Dn7b3RZM.js';
1
+ import { k as SessionStateOptionsRole, a as SessionState } from './session-types-Cxx7W8zZ.js';
2
+ export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-Cxx7W8zZ.js';
3
3
  import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.js';
4
- import './types-DG5_iKuv.js';
4
+ import './types-2NisMA8_.js';
5
5
 
6
6
  declare function createDraft08SessionState(role: SessionStateOptionsRole): SessionState<Draft08Message, Draft08MessageType>;
7
7
 
@@ -1,11 +1,11 @@
1
- export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.cjs';
2
- export { D as Draft08Codec, c as createDraft08Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-CpOpemR8.cjs';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.cjs';
2
+ export { D as Draft08Codec, c as createDraft08Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-CUu56DDU.cjs';
3
3
  import { b as Draft08DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft08MessageType, D as Draft08Message } from './types-jV1yDDBA.cjs';
4
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft08Announce, h as Draft08AnnounceCancel, i as Draft08AnnounceError, j as Draft08AnnounceOk, k as Draft08BaseMessage, l as Draft08ClientSetup, m as Draft08Fetch, n as Draft08FetchCancel, o as Draft08FetchError, p as Draft08FetchOk, q as Draft08GoAway, r as Draft08MaxSubscribeId, s as Draft08Params, t as Draft08ServerSetup, u as Draft08SetupParams, v as Draft08Subscribe, w as Draft08SubscribeAnnounces, x as Draft08SubscribeAnnouncesError, y as Draft08SubscribeAnnouncesOk, z as Draft08SubscribeDone, A as Draft08SubscribeError, B as Draft08SubscribeOk, C as Draft08SubscribeUpdate, E as Draft08SubscribesBlocked, G as Draft08TrackStatus, H as Draft08TrackStatusRequest, I as Draft08Unannounce, J as Draft08Unsubscribe, K as Draft08UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-jV1yDDBA.cjs';
5
5
  export { createDraft08SessionState } from './draft08-session.cjs';
6
- import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-B9idsih-.cjs';
7
- export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-B9idsih-.cjs';
8
- import { b as DecodeResult } from './types-DG5_iKuv.cjs';
6
+ import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-DZkI_qFG.cjs';
7
+ export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-DZkI_qFG.cjs';
8
+ import { b as DecodeResult } from './types-2NisMA8_.cjs';
9
9
 
10
10
  declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
11
11
  declare function encodeDatagram(dg: DatagramObject): Uint8Array;
package/dist/draft08.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.js';
2
- export { D as Draft08Codec, c as createDraft08Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-BN2Bu0KI.js';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.js';
2
+ export { D as Draft08Codec, c as createDraft08Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-Dt6nuejp.js';
3
3
  import { b as Draft08DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft08MessageType, D as Draft08Message } from './types-jV1yDDBA.js';
4
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft08Announce, h as Draft08AnnounceCancel, i as Draft08AnnounceError, j as Draft08AnnounceOk, k as Draft08BaseMessage, l as Draft08ClientSetup, m as Draft08Fetch, n as Draft08FetchCancel, o as Draft08FetchError, p as Draft08FetchOk, q as Draft08GoAway, r as Draft08MaxSubscribeId, s as Draft08Params, t as Draft08ServerSetup, u as Draft08SetupParams, v as Draft08Subscribe, w as Draft08SubscribeAnnounces, x as Draft08SubscribeAnnouncesError, y as Draft08SubscribeAnnouncesOk, z as Draft08SubscribeDone, A as Draft08SubscribeError, B as Draft08SubscribeOk, C as Draft08SubscribeUpdate, E as Draft08SubscribesBlocked, G as Draft08TrackStatus, H as Draft08TrackStatusRequest, I as Draft08Unannounce, J as Draft08Unsubscribe, K as Draft08UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-jV1yDDBA.js';
5
5
  export { createDraft08SessionState } from './draft08-session.js';
6
- import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-Dn7b3RZM.js';
7
- export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-Dn7b3RZM.js';
8
- import { b as DecodeResult } from './types-DG5_iKuv.js';
6
+ import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-Cxx7W8zZ.js';
7
+ export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-Cxx7W8zZ.js';
8
+ import { b as DecodeResult } from './types-2NisMA8_.js';
9
9
 
10
10
  declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
11
11
  declare function encodeDatagram(dg: DatagramObject): Uint8Array;
@@ -1,7 +1,7 @@
1
- import { k as SessionStateOptionsRole, a as SessionState } from './session-types-B9idsih-.cjs';
2
- export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-B9idsih-.cjs';
1
+ import { k as SessionStateOptionsRole, a as SessionState } from './session-types-DZkI_qFG.cjs';
2
+ export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-DZkI_qFG.cjs';
3
3
  import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.cjs';
4
- import './types-DG5_iKuv.cjs';
4
+ import './types-2NisMA8_.cjs';
5
5
 
6
6
  declare function createDraft09SessionState(role: SessionStateOptionsRole): SessionState<Draft09Message, Draft09MessageType>;
7
7
 
@@ -1,7 +1,7 @@
1
- import { k as SessionStateOptionsRole, a as SessionState } from './session-types-Dn7b3RZM.js';
2
- export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-Dn7b3RZM.js';
1
+ import { k as SessionStateOptionsRole, a as SessionState } from './session-types-Cxx7W8zZ.js';
2
+ export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-Cxx7W8zZ.js';
3
3
  import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.js';
4
- import './types-DG5_iKuv.js';
4
+ import './types-2NisMA8_.js';
5
5
 
6
6
  declare function createDraft09SessionState(role: SessionStateOptionsRole): SessionState<Draft09Message, Draft09MessageType>;
7
7
 
@@ -1,11 +1,11 @@
1
- export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.cjs';
2
- export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-Cshdl9Tt.cjs';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.cjs';
2
+ export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-Dstemwrq.cjs';
3
3
  import { b as Draft09DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft09MessageType, D as Draft09Message } from './types-B3g5G9KP.cjs';
4
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft09Announce, h as Draft09AnnounceCancel, i as Draft09AnnounceError, j as Draft09AnnounceOk, k as Draft09BaseMessage, l as Draft09ClientSetup, m as Draft09Fetch, n as Draft09FetchCancel, o as Draft09FetchError, p as Draft09FetchOk, q as Draft09GoAway, r as Draft09MaxSubscribeId, s as Draft09Params, t as Draft09ServerSetup, u as Draft09SetupParams, v as Draft09Subscribe, w as Draft09SubscribeAnnounces, x as Draft09SubscribeAnnouncesError, y as Draft09SubscribeAnnouncesOk, z as Draft09SubscribeDone, A as Draft09SubscribeError, B as Draft09SubscribeOk, C as Draft09SubscribeUpdate, E as Draft09SubscribesBlocked, G as Draft09TrackStatus, H as Draft09TrackStatusRequest, I as Draft09Unannounce, J as Draft09Unsubscribe, K as Draft09UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-B3g5G9KP.cjs';
5
5
  export { createDraft09SessionState } from './draft09-session.cjs';
6
- import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-B9idsih-.cjs';
7
- export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-B9idsih-.cjs';
8
- import { b as DecodeResult } from './types-DG5_iKuv.cjs';
6
+ import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-DZkI_qFG.cjs';
7
+ export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-DZkI_qFG.cjs';
8
+ import { b as DecodeResult } from './types-2NisMA8_.cjs';
9
9
 
10
10
  declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
11
11
  declare function encodeDatagram(dg: DatagramObject): Uint8Array;
package/dist/draft09.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.js';
2
- export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-DxtgPxJS.js';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.js';
2
+ export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-BLjxwK2f.js';
3
3
  import { b as Draft09DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft09MessageType, D as Draft09Message } from './types-B3g5G9KP.js';
4
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft09Announce, h as Draft09AnnounceCancel, i as Draft09AnnounceError, j as Draft09AnnounceOk, k as Draft09BaseMessage, l as Draft09ClientSetup, m as Draft09Fetch, n as Draft09FetchCancel, o as Draft09FetchError, p as Draft09FetchOk, q as Draft09GoAway, r as Draft09MaxSubscribeId, s as Draft09Params, t as Draft09ServerSetup, u as Draft09SetupParams, v as Draft09Subscribe, w as Draft09SubscribeAnnounces, x as Draft09SubscribeAnnouncesError, y as Draft09SubscribeAnnouncesOk, z as Draft09SubscribeDone, A as Draft09SubscribeError, B as Draft09SubscribeOk, C as Draft09SubscribeUpdate, E as Draft09SubscribesBlocked, G as Draft09TrackStatus, H as Draft09TrackStatusRequest, I as Draft09Unannounce, J as Draft09Unsubscribe, K as Draft09UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-B3g5G9KP.js';
5
5
  export { createDraft09SessionState } from './draft09-session.js';
6
- import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-Dn7b3RZM.js';
7
- export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-Dn7b3RZM.js';
8
- import { b as DecodeResult } from './types-DG5_iKuv.js';
6
+ import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-Cxx7W8zZ.js';
7
+ export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-Cxx7W8zZ.js';
8
+ import { b as DecodeResult } from './types-2NisMA8_.js';
9
9
 
10
10
  declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
11
11
  declare function encodeDatagram(dg: DatagramObject): Uint8Array;