@moqtap/codec 0.4.2 → 0.4.3

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 (105) hide show
  1. package/dist/{chunk-UJU63EFY.cjs → chunk-BAG6YWCP.cjs} +2 -3
  2. package/dist/{chunk-2UTVXWFF.js → chunk-COWGGUL4.js} +2 -3
  3. package/dist/{chunk-4IVZZOY3.js → chunk-CXFAQKL3.js} +2 -3
  4. package/dist/{chunk-SDWRXXOO.cjs → chunk-HO44OANK.cjs} +2 -3
  5. package/dist/{chunk-Q46ZURKX.js → chunk-HYI6LFMD.js} +2 -3
  6. package/dist/{chunk-WPFBK7UX.cjs → chunk-JB5VDJ2V.cjs} +4 -6
  7. package/dist/{chunk-2SGE5GMU.cjs → chunk-JTRU76JN.cjs} +4 -4
  8. package/dist/{chunk-TKBYPIN7.js → chunk-NZ7GYEMT.js} +4 -6
  9. package/dist/{chunk-5O764MBD.cjs → chunk-OGZTQA24.cjs} +6 -6
  10. package/dist/{chunk-76774UFF.js → chunk-Q5D6OW6Q.js} +4 -4
  11. package/dist/{chunk-XS77RBY7.js → chunk-RZ3UML47.js} +2 -4
  12. package/dist/{chunk-3XKO6PCR.cjs → chunk-SIYYMFCC.cjs} +2 -3
  13. package/dist/{chunk-Z6U26IRI.js → chunk-UP4XPH4J.js} +6 -6
  14. package/dist/{chunk-OKG2HT25.cjs → chunk-WMJVSBBE.cjs} +2 -4
  15. package/dist/{codec-BHHfBTnV.d.ts → codec-B2lYE0YA.d.ts} +1 -1
  16. package/dist/{codec-C-Yk2RNa.d.ts → codec-BFg5xnrJ.d.ts} +1 -1
  17. package/dist/{codec-BB0U8MF2.d.cts → codec-BWQ5Jlap.d.cts} +1 -1
  18. package/dist/{codec-z6_2PSzi.d.cts → codec-B_QST4y1.d.cts} +1 -1
  19. package/dist/{codec-CpBWhz9f.d.cts → codec-BbbLDSKA.d.cts} +1 -1
  20. package/dist/{codec-BO5Go0Lm.d.cts → codec-C7UzTYSS.d.cts} +1 -1
  21. package/dist/{codec-BN6jk0Td.d.cts → codec-C8aSvE41.d.cts} +1 -1
  22. package/dist/{codec-w8z2j_uo.d.cts → codec-CAbm9d_n.d.cts} +1 -1
  23. package/dist/{codec-D2QVSH9D.d.ts → codec-CpZrZ3ok.d.ts} +1 -1
  24. package/dist/{codec-D8REY9TB.d.ts → codec-DFU-6Rax.d.ts} +1 -1
  25. package/dist/{codec-iMEwV1UO.d.ts → codec-Db-0pk38.d.ts} +1 -1
  26. package/dist/{codec-BU0gaSZm.d.ts → codec-DftaRuVz.d.ts} +1 -1
  27. package/dist/{codec-DNfml-se.d.ts → codec-Va_wZCF_.d.ts} +1 -1
  28. package/dist/{codec-DoOGjjDq.d.cts → codec-lqDowbyT.d.cts} +1 -1
  29. package/dist/draft11-session.d.cts +1 -1
  30. package/dist/draft11-session.d.ts +1 -1
  31. package/dist/draft11.cjs +2 -2
  32. package/dist/draft11.d.cts +3 -3
  33. package/dist/draft11.d.ts +3 -3
  34. package/dist/draft11.js +1 -1
  35. package/dist/draft12-session.d.cts +1 -1
  36. package/dist/draft12-session.d.ts +1 -1
  37. package/dist/draft12.cjs +2 -2
  38. package/dist/draft12.d.cts +3 -3
  39. package/dist/draft12.d.ts +3 -3
  40. package/dist/draft12.js +1 -1
  41. package/dist/draft13-session.d.cts +1 -1
  42. package/dist/draft13-session.d.ts +1 -1
  43. package/dist/draft13.cjs +2 -2
  44. package/dist/draft13.d.cts +3 -3
  45. package/dist/draft13.d.ts +3 -3
  46. package/dist/draft13.js +1 -1
  47. package/dist/draft14-session.d.cts +1 -1
  48. package/dist/draft14-session.d.ts +1 -1
  49. package/dist/draft14.cjs +2 -2
  50. package/dist/draft14.d.cts +3 -3
  51. package/dist/draft14.d.ts +3 -3
  52. package/dist/draft14.js +1 -1
  53. package/dist/draft15-session.d.cts +1 -1
  54. package/dist/draft15-session.d.ts +1 -1
  55. package/dist/draft15.cjs +2 -2
  56. package/dist/draft15.d.cts +3 -3
  57. package/dist/draft15.d.ts +3 -3
  58. package/dist/draft15.js +1 -1
  59. package/dist/draft16-session.d.cts +1 -1
  60. package/dist/draft16-session.d.ts +1 -1
  61. package/dist/draft16.cjs +2 -2
  62. package/dist/draft16.d.cts +3 -3
  63. package/dist/draft16.d.ts +3 -3
  64. package/dist/draft16.js +1 -1
  65. package/dist/draft17-session.d.cts +1 -1
  66. package/dist/draft17-session.d.ts +1 -1
  67. package/dist/draft17.cjs +2 -2
  68. package/dist/draft17.d.cts +3 -3
  69. package/dist/draft17.d.ts +3 -3
  70. package/dist/draft17.js +1 -1
  71. package/dist/index.cjs +14 -14
  72. package/dist/index.d.cts +14 -14
  73. package/dist/index.d.ts +14 -14
  74. package/dist/index.js +7 -7
  75. package/dist/session.d.cts +7 -7
  76. package/dist/session.d.ts +7 -7
  77. package/dist/{types-DuyE0ygT.d.cts → types-Bio-91Rt.d.cts} +1 -1
  78. package/dist/{types-DuyE0ygT.d.ts → types-Bio-91Rt.d.ts} +1 -1
  79. package/dist/{types-DuxfOYiO.d.cts → types-CPaYBsMG.d.cts} +1 -1
  80. package/dist/{types-DuxfOYiO.d.ts → types-CPaYBsMG.d.ts} +1 -1
  81. package/dist/{types-DrQpTW1G.d.cts → types-CXlSn0I9.d.cts} +1 -1
  82. package/dist/{types-DrQpTW1G.d.ts → types-CXlSn0I9.d.ts} +1 -1
  83. package/dist/{types--Q7_DcvP.d.cts → types-Ck45Ex5S.d.cts} +1 -1
  84. package/dist/{types--Q7_DcvP.d.ts → types-Ck45Ex5S.d.ts} +1 -1
  85. package/dist/{types-BFpFNM_m.d.cts → types-Cm9fjeYC.d.cts} +1 -1
  86. package/dist/{types-BFpFNM_m.d.ts → types-Cm9fjeYC.d.ts} +1 -1
  87. package/dist/{types-Br7fm2mf.d.cts → types-D9eiB_9A.d.cts} +2 -2
  88. package/dist/{types-Br7fm2mf.d.ts → types-D9eiB_9A.d.ts} +2 -2
  89. package/dist/{types--FGt0sAp.d.cts → types-DjmrHp_s.d.cts} +1 -1
  90. package/dist/{types--FGt0sAp.d.ts → types-DjmrHp_s.d.ts} +1 -1
  91. package/package.json +2 -2
  92. package/src/drafts/draft11/codec.ts +2 -3
  93. package/src/drafts/draft11/types.ts +1 -1
  94. package/src/drafts/draft12/codec.ts +4 -6
  95. package/src/drafts/draft12/types.ts +1 -1
  96. package/src/drafts/draft13/codec.ts +2 -3
  97. package/src/drafts/draft13/types.ts +1 -1
  98. package/src/drafts/draft14/codec.ts +4 -4
  99. package/src/drafts/draft14/types.ts +1 -1
  100. package/src/drafts/draft15/codec.ts +2 -4
  101. package/src/drafts/draft15/types.ts +1 -1
  102. package/src/drafts/draft16/codec.ts +2 -3
  103. package/src/drafts/draft16/types.ts +1 -1
  104. package/src/drafts/draft17/codec.ts +6 -6
  105. package/src/drafts/draft17/types.ts +2 -2
package/dist/index.cjs CHANGED
@@ -1,27 +1,27 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk2SGE5GMUcjs = require('./chunk-2SGE5GMU.cjs');
3
+ var _chunkJTRU76JNcjs = require('./chunk-JTRU76JN.cjs');
4
4
 
5
5
 
6
- var _chunkOKG2HT25cjs = require('./chunk-OKG2HT25.cjs');
6
+ var _chunkWMJVSBBEcjs = require('./chunk-WMJVSBBE.cjs');
7
7
 
8
8
 
9
- var _chunkUJU63EFYcjs = require('./chunk-UJU63EFY.cjs');
9
+ var _chunkBAG6YWCPcjs = require('./chunk-BAG6YWCP.cjs');
10
10
 
11
11
 
12
- var _chunk5O764MBDcjs = require('./chunk-5O764MBD.cjs');
12
+ var _chunkOGZTQA24cjs = require('./chunk-OGZTQA24.cjs');
13
13
 
14
14
 
15
15
  var _chunkPKEOQSSZcjs = require('./chunk-PKEOQSSZ.cjs');
16
16
 
17
17
 
18
- var _chunkSDWRXXOOcjs = require('./chunk-SDWRXXOO.cjs');
18
+ var _chunkHO44OANKcjs = require('./chunk-HO44OANK.cjs');
19
19
 
20
20
 
21
- var _chunkWPFBK7UXcjs = require('./chunk-WPFBK7UX.cjs');
21
+ var _chunkJB5VDJ2Vcjs = require('./chunk-JB5VDJ2V.cjs');
22
22
 
23
23
 
24
- var _chunk3XKO6PCRcjs = require('./chunk-3XKO6PCR.cjs');
24
+ var _chunkSIYYMFCCcjs = require('./chunk-SIYYMFCC.cjs');
25
25
 
26
26
 
27
27
  var _chunkHZHSO7EWcjs = require('./chunk-HZHSO7EW.cjs');
@@ -67,19 +67,19 @@ Supported draft values: ${Object.keys(DRAFT_VERSIONS).join(", ")}`
67
67
  case "10":
68
68
  return _chunkPKEOQSSZcjs.createDraft10Codec.call(void 0, );
69
69
  case "11":
70
- return _chunkSDWRXXOOcjs.createDraft11Codec.call(void 0, );
70
+ return _chunkHO44OANKcjs.createDraft11Codec.call(void 0, );
71
71
  case "12":
72
- return _chunkWPFBK7UXcjs.createDraft12Codec.call(void 0, );
72
+ return _chunkJB5VDJ2Vcjs.createDraft12Codec.call(void 0, );
73
73
  case "13":
74
- return _chunk3XKO6PCRcjs.createDraft13Codec.call(void 0, );
74
+ return _chunkSIYYMFCCcjs.createDraft13Codec.call(void 0, );
75
75
  case "14":
76
- return _chunk2SGE5GMUcjs.createDraft14Codec.call(void 0, );
76
+ return _chunkJTRU76JNcjs.createDraft14Codec.call(void 0, );
77
77
  case "15":
78
- return _chunkOKG2HT25cjs.createDraft15Codec.call(void 0, );
78
+ return _chunkWMJVSBBEcjs.createDraft15Codec.call(void 0, );
79
79
  case "16":
80
- return _chunkUJU63EFYcjs.createDraft16Codec.call(void 0, );
80
+ return _chunkBAG6YWCPcjs.createDraft16Codec.call(void 0, );
81
81
  case "17":
82
- return _chunk5O764MBDcjs.createDraft17Codec.call(void 0, );
82
+ return _chunkOGZTQA24cjs.createDraft17Codec.call(void 0, );
83
83
  default:
84
84
  throw new Error(`Unsupported draft: ${draft}`);
85
85
  }
package/dist/index.d.cts CHANGED
@@ -4,24 +4,24 @@ import { D as Draft07Codec } from './codec-CFWQY9Lj.cjs';
4
4
  import { D as Draft08Codec } from './codec-R9TJCq-E.cjs';
5
5
  import { D as Draft09Codec } from './codec-j819z_hL.cjs';
6
6
  import { D as Draft10Codec } from './codec-DDUBJGn0.cjs';
7
- import { D as Draft11Codec } from './codec-w8z2j_uo.cjs';
8
- import { D as Draft12Codec } from './codec-CpBWhz9f.cjs';
9
- import { D as Draft13Codec } from './codec-DoOGjjDq.cjs';
10
- import { D as Draft14Codec } from './codec-BO5Go0Lm.cjs';
11
- import { D as Draft15Codec } from './codec-BB0U8MF2.cjs';
12
- import { D as Draft16Codec } from './codec-z6_2PSzi.cjs';
13
- import { D as Draft17Codec } from './codec-BN6jk0Td.cjs';
7
+ import { D as Draft11Codec } from './codec-CAbm9d_n.cjs';
8
+ import { D as Draft12Codec } from './codec-BbbLDSKA.cjs';
9
+ import { D as Draft13Codec } from './codec-lqDowbyT.cjs';
10
+ import { D as Draft14Codec } from './codec-C7UzTYSS.cjs';
11
+ import { D as Draft15Codec } from './codec-BWQ5Jlap.cjs';
12
+ import { D as Draft16Codec } from './codec-B_QST4y1.cjs';
13
+ import { D as Draft17Codec } from './codec-C8aSvE41.cjs';
14
14
  import './types-Dl4IaAHR.cjs';
15
15
  import './types-jV1yDDBA.cjs';
16
16
  import './types-B3g5G9KP.cjs';
17
17
  import './types-0IWbU9Z_.cjs';
18
- import './types--Q7_DcvP.cjs';
19
- import './types-DuyE0ygT.cjs';
20
- import './types-DrQpTW1G.cjs';
21
- import './types--FGt0sAp.cjs';
22
- import './types-DuxfOYiO.cjs';
23
- import './types-BFpFNM_m.cjs';
24
- import './types-Br7fm2mf.cjs';
18
+ import './types-Ck45Ex5S.cjs';
19
+ import './types-Bio-91Rt.cjs';
20
+ import './types-CXlSn0I9.cjs';
21
+ import './types-DjmrHp_s.cjs';
22
+ import './types-CPaYBsMG.cjs';
23
+ import './types-Cm9fjeYC.cjs';
24
+ import './types-D9eiB_9A.cjs';
25
25
 
26
26
  /**
27
27
  * @moqtap/codec — MoQT wire-format codec
package/dist/index.d.ts CHANGED
@@ -4,24 +4,24 @@ import { D as Draft07Codec } from './codec-CewFCsEy.js';
4
4
  import { D as Draft08Codec } from './codec-wtt6WF1K.js';
5
5
  import { D as Draft09Codec } from './codec-3Ppy_5Gd.js';
6
6
  import { D as Draft10Codec } from './codec-ZwV-Njt6.js';
7
- import { D as Draft11Codec } from './codec-DNfml-se.js';
8
- import { D as Draft12Codec } from './codec-D8REY9TB.js';
9
- import { D as Draft13Codec } from './codec-BU0gaSZm.js';
10
- import { D as Draft14Codec } from './codec-iMEwV1UO.js';
11
- import { D as Draft15Codec } from './codec-BHHfBTnV.js';
12
- import { D as Draft16Codec } from './codec-C-Yk2RNa.js';
13
- import { D as Draft17Codec } from './codec-D2QVSH9D.js';
7
+ import { D as Draft11Codec } from './codec-Va_wZCF_.js';
8
+ import { D as Draft12Codec } from './codec-DFU-6Rax.js';
9
+ import { D as Draft13Codec } from './codec-DftaRuVz.js';
10
+ import { D as Draft14Codec } from './codec-Db-0pk38.js';
11
+ import { D as Draft15Codec } from './codec-B2lYE0YA.js';
12
+ import { D as Draft16Codec } from './codec-BFg5xnrJ.js';
13
+ import { D as Draft17Codec } from './codec-CpZrZ3ok.js';
14
14
  import './types-Dl4IaAHR.js';
15
15
  import './types-jV1yDDBA.js';
16
16
  import './types-B3g5G9KP.js';
17
17
  import './types-0IWbU9Z_.js';
18
- import './types--Q7_DcvP.js';
19
- import './types-DuyE0ygT.js';
20
- import './types-DrQpTW1G.js';
21
- import './types--FGt0sAp.js';
22
- import './types-DuxfOYiO.js';
23
- import './types-BFpFNM_m.js';
24
- import './types-Br7fm2mf.js';
18
+ import './types-Ck45Ex5S.js';
19
+ import './types-Bio-91Rt.js';
20
+ import './types-CXlSn0I9.js';
21
+ import './types-DjmrHp_s.js';
22
+ import './types-CPaYBsMG.js';
23
+ import './types-Cm9fjeYC.js';
24
+ import './types-D9eiB_9A.js';
25
25
 
26
26
  /**
27
27
  * @moqtap/codec — MoQT wire-format codec
package/dist/index.js CHANGED
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  createDraft14Codec
3
- } from "./chunk-76774UFF.js";
3
+ } from "./chunk-Q5D6OW6Q.js";
4
4
  import {
5
5
  createDraft15Codec
6
- } from "./chunk-XS77RBY7.js";
6
+ } from "./chunk-RZ3UML47.js";
7
7
  import {
8
8
  createDraft16Codec
9
- } from "./chunk-Q46ZURKX.js";
9
+ } from "./chunk-HYI6LFMD.js";
10
10
  import {
11
11
  createDraft17Codec
12
- } from "./chunk-Z6U26IRI.js";
12
+ } from "./chunk-UP4XPH4J.js";
13
13
  import {
14
14
  createDraft10Codec
15
15
  } from "./chunk-SHMA4PBY.js";
16
16
  import {
17
17
  createDraft11Codec
18
- } from "./chunk-2UTVXWFF.js";
18
+ } from "./chunk-COWGGUL4.js";
19
19
  import {
20
20
  createDraft12Codec
21
- } from "./chunk-TKBYPIN7.js";
21
+ } from "./chunk-NZ7GYEMT.js";
22
22
  import {
23
23
  createDraft13Codec
24
- } from "./chunk-4IVZZOY3.js";
24
+ } from "./chunk-CXFAQKL3.js";
25
25
  import {
26
26
  createDraft07Codec
27
27
  } from "./chunk-7KBAWOBA.js";
@@ -5,13 +5,13 @@ import { D as Draft07Message, a as Draft07MessageType } from './types-Dl4IaAHR.c
5
5
  import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.cjs';
6
6
  import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.cjs';
7
7
  import { D as Draft10Message, a as Draft10MessageType } from './types-0IWbU9Z_.cjs';
8
- import { D as Draft11Message, a as Draft11MessageType } from './types--Q7_DcvP.cjs';
9
- import { D as Draft12Message, a as Draft12MessageType } from './types-DuyE0ygT.cjs';
10
- import { D as Draft13Message, a as Draft13MessageType } from './types-DrQpTW1G.cjs';
11
- import { D as Draft14Message, a as Draft14MessageType } from './types--FGt0sAp.cjs';
12
- import { D as Draft15Message, a as Draft15MessageType } from './types-DuxfOYiO.cjs';
13
- import { D as Draft16Message, a as Draft16MessageType } from './types-BFpFNM_m.cjs';
14
- import { D as Draft17Message, a as Draft17MessageType } from './types-Br7fm2mf.cjs';
8
+ import { D as Draft11Message, a as Draft11MessageType } from './types-Ck45Ex5S.cjs';
9
+ import { D as Draft12Message, a as Draft12MessageType } from './types-Bio-91Rt.cjs';
10
+ import { D as Draft13Message, a as Draft13MessageType } from './types-CXlSn0I9.cjs';
11
+ import { D as Draft14Message, a as Draft14MessageType } from './types-DjmrHp_s.cjs';
12
+ import { D as Draft15Message, a as Draft15MessageType } from './types-CPaYBsMG.cjs';
13
+ import { D as Draft16Message, a as Draft16MessageType } from './types-Cm9fjeYC.cjs';
14
+ import { D as Draft17Message, a as Draft17MessageType } from './types-D9eiB_9A.cjs';
15
15
 
16
16
  /**
17
17
  * @moqtap/codec/session — MoQT session state machine
package/dist/session.d.ts CHANGED
@@ -5,13 +5,13 @@ import { D as Draft07Message, a as Draft07MessageType } from './types-Dl4IaAHR.j
5
5
  import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.js';
6
6
  import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.js';
7
7
  import { D as Draft10Message, a as Draft10MessageType } from './types-0IWbU9Z_.js';
8
- import { D as Draft11Message, a as Draft11MessageType } from './types--Q7_DcvP.js';
9
- import { D as Draft12Message, a as Draft12MessageType } from './types-DuyE0ygT.js';
10
- import { D as Draft13Message, a as Draft13MessageType } from './types-DrQpTW1G.js';
11
- import { D as Draft14Message, a as Draft14MessageType } from './types--FGt0sAp.js';
12
- import { D as Draft15Message, a as Draft15MessageType } from './types-DuxfOYiO.js';
13
- import { D as Draft16Message, a as Draft16MessageType } from './types-BFpFNM_m.js';
14
- import { D as Draft17Message, a as Draft17MessageType } from './types-Br7fm2mf.js';
8
+ import { D as Draft11Message, a as Draft11MessageType } from './types-Ck45Ex5S.js';
9
+ import { D as Draft12Message, a as Draft12MessageType } from './types-Bio-91Rt.js';
10
+ import { D as Draft13Message, a as Draft13MessageType } from './types-CXlSn0I9.js';
11
+ import { D as Draft14Message, a as Draft14MessageType } from './types-DjmrHp_s.js';
12
+ import { D as Draft15Message, a as Draft15MessageType } from './types-CPaYBsMG.js';
13
+ import { D as Draft16Message, a as Draft16MessageType } from './types-Cm9fjeYC.js';
14
+ import { D as Draft17Message, a as Draft17MessageType } from './types-D9eiB_9A.js';
15
15
 
16
16
  /**
17
17
  * @moqtap/codec/session — MoQT session state machine
@@ -6,7 +6,7 @@ interface UnknownParam {
6
6
  interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_type: bigint;
9
- readonly token_value: string;
9
+ readonly token_value: Uint8Array;
10
10
  }
11
11
  interface Draft12SetupParams {
12
12
  path?: string;
@@ -6,7 +6,7 @@ interface UnknownParam {
6
6
  interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_type: bigint;
9
- readonly token_value: string;
9
+ readonly token_value: Uint8Array;
10
10
  }
11
11
  interface Draft12SetupParams {
12
12
  path?: string;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value_hex?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft15SetupParams {
13
13
  path?: string;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value_hex?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft15SetupParams {
13
13
  path?: string;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft13SetupParams {
13
13
  path?: string;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft13SetupParams {
13
13
  path?: string;
@@ -6,7 +6,7 @@ interface UnknownParam {
6
6
  interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_type: bigint;
9
- readonly token_value: string;
9
+ readonly token_value: Uint8Array;
10
10
  }
11
11
  interface Draft11SetupParams {
12
12
  path?: string;
@@ -6,7 +6,7 @@ interface UnknownParam {
6
6
  interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_type: bigint;
9
- readonly token_value: string;
9
+ readonly token_value: Uint8Array;
10
10
  }
11
11
  interface Draft11SetupParams {
12
12
  path?: string;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value_hex?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft16SetupParams {
13
13
  path?: string;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value_hex?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft16SetupParams {
13
13
  path?: string;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft17SetupOptions {
13
13
  path?: string;
@@ -43,7 +43,7 @@ interface Draft17Params {
43
43
  interface Draft17TrackProperties {
44
44
  delivery_timeout?: bigint;
45
45
  max_cache_duration?: bigint;
46
- immutable_properties?: string;
46
+ immutable_properties?: Uint8Array;
47
47
  default_publisher_priority?: bigint;
48
48
  default_publisher_group_order?: bigint;
49
49
  dynamic_groups?: bigint;
@@ -7,7 +7,7 @@ interface AuthorizationToken {
7
7
  readonly alias_type: bigint;
8
8
  readonly token_alias?: bigint;
9
9
  readonly token_type?: bigint;
10
- readonly token_value?: string;
10
+ readonly token_value?: Uint8Array;
11
11
  }
12
12
  interface Draft17SetupOptions {
13
13
  path?: string;
@@ -43,7 +43,7 @@ interface Draft17Params {
43
43
  interface Draft17TrackProperties {
44
44
  delivery_timeout?: bigint;
45
45
  max_cache_duration?: bigint;
46
- immutable_properties?: string;
46
+ immutable_properties?: Uint8Array;
47
47
  default_publisher_priority?: bigint;
48
48
  default_publisher_group_order?: bigint;
49
49
  dynamic_groups?: bigint;
@@ -25,7 +25,7 @@ interface UnknownParam {
25
25
  interface AuthorizationToken {
26
26
  readonly alias_type: bigint;
27
27
  readonly token_type?: bigint;
28
- readonly token_value?: string;
28
+ readonly token_value?: Uint8Array;
29
29
  readonly token_alias?: bigint;
30
30
  }
31
31
  interface Draft14Params {
@@ -25,7 +25,7 @@ interface UnknownParam {
25
25
  interface AuthorizationToken {
26
26
  readonly alias_type: bigint;
27
27
  readonly token_type?: bigint;
28
- readonly token_value?: string;
28
+ readonly token_value?: Uint8Array;
29
29
  readonly token_alias?: bigint;
30
30
  }
31
31
  interface Draft14Params {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moqtap/codec",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "MoQT wire-format codec and session state machine — multi-draft, zero dependencies",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -184,7 +184,7 @@
184
184
  "test": "vitest run"
185
185
  },
186
186
  "devDependencies": {
187
- "@moqtap/test-vectors": "^0.8.2",
187
+ "@moqtap/test-vectors": "^0.8.3",
188
188
  "tsup": "^8.0.0",
189
189
  "typescript": "^5.5.0",
190
190
  "vitest": "^3.0.0"
@@ -158,8 +158,7 @@ function encodeParams(params: Draft11Params, w: BufferWriter): void {
158
158
  const tmpW = new BufferWriter(64)
159
159
  tmpW.writeVarInt(at.alias_type)
160
160
  tmpW.writeVarInt(at.token_type)
161
- const tokenBytes = textEncoder.encode(at.token_value)
162
- tmpW.writeBytes(tokenBytes)
161
+ tmpW.writeBytes(at.token_value)
163
162
  const raw = tmpW.finish()
164
163
  w.writeVarInt(raw.byteLength)
165
164
  w.writeBytes(raw)
@@ -231,7 +230,7 @@ function decodeParams(r: BufferReader): Draft11Params {
231
230
  result.authorization_token = {
232
231
  alias_type,
233
232
  token_type,
234
- token_value: textDecoder.decode(tokenBytes),
233
+ token_value: tokenBytes,
235
234
  }
236
235
  } else {
237
236
  const bytes = r.readBytes(length)
@@ -12,7 +12,7 @@ export interface UnknownParam {
12
12
  export interface AuthorizationToken {
13
13
  readonly alias_type: bigint
14
14
  readonly token_type: bigint
15
- readonly token_value: string
15
+ readonly token_value: Uint8Array
16
16
  }
17
17
 
18
18
  // Setup parameters (PATH, MAX_REQUEST_ID) — same even/odd encoding as later drafts
@@ -94,8 +94,7 @@ function encodeSetupParams(params: Draft12SetupParams, w: BufferWriter): void {
94
94
  const tmpW = new BufferWriter(64)
95
95
  tmpW.writeVarInt(at.alias_type)
96
96
  tmpW.writeVarInt(at.token_type)
97
- const tokenBytes = textEncoder.encode(at.token_value)
98
- tmpW.writeBytes(tokenBytes)
97
+ tmpW.writeBytes(at.token_value)
99
98
  const raw = tmpW.finish()
100
99
  w.writeVarInt(raw.byteLength)
101
100
  w.writeBytes(raw)
@@ -152,7 +151,7 @@ function decodeSetupParams(r: BufferReader): Draft12SetupParams {
152
151
  result.authorization_token = {
153
152
  alias_type,
154
153
  token_type,
155
- token_value: textDecoder.decode(tokenBytes),
154
+ token_value: tokenBytes,
156
155
  }
157
156
  } else {
158
157
  const bytes = r.readBytes(length)
@@ -191,8 +190,7 @@ function encodeParams(params: Draft12Params, w: BufferWriter): void {
191
190
  const tmpW = new BufferWriter(64)
192
191
  tmpW.writeVarInt(at.alias_type)
193
192
  tmpW.writeVarInt(at.token_type)
194
- const tokenBytes = textEncoder.encode(at.token_value)
195
- tmpW.writeBytes(tokenBytes)
193
+ tmpW.writeBytes(at.token_value)
196
194
  const raw = tmpW.finish()
197
195
  w.writeVarInt(raw.byteLength)
198
196
  w.writeBytes(raw)
@@ -259,7 +257,7 @@ function decodeParams(r: BufferReader): Draft12Params {
259
257
  result.authorization_token = {
260
258
  alias_type,
261
259
  token_type,
262
- token_value: textDecoder.decode(tokenBytes),
260
+ token_value: tokenBytes,
263
261
  }
264
262
  } else {
265
263
  const bytes = r.readBytes(length)
@@ -12,7 +12,7 @@ export interface UnknownParam {
12
12
  export interface AuthorizationToken {
13
13
  readonly alias_type: bigint
14
14
  readonly token_type: bigint
15
- readonly token_value: string
15
+ readonly token_value: Uint8Array
16
16
  }
17
17
 
18
18
  // Setup parameters (PATH, MAX_REQUEST_ID) — same even/odd encoding as later drafts
@@ -85,8 +85,7 @@ function encodeAuthorizationToken(at: AuthorizationToken, w: BufferWriter): void
85
85
  if (aliasType === 1 || aliasType === 3) {
86
86
  // REGISTER, USE_VALUE have token_type + token_value
87
87
  tmpW.writeVarInt(at.token_type ?? 0n)
88
- const tokenBytes = textEncoder.encode(at.token_value ?? '')
89
- tmpW.writeBytes(tokenBytes)
88
+ tmpW.writeBytes(at.token_value ?? new Uint8Array(0))
90
89
  }
91
90
  const raw = tmpW.finish()
92
91
  w.writeVarInt(raw.byteLength)
@@ -105,7 +104,7 @@ function decodeAuthorizationToken(r: BufferReader, length: number): Authorizatio
105
104
  result.token_type = r.readVarInt()
106
105
  const tokenBytesLen = length - (r.offset - startOff)
107
106
  const tokenBytes = r.readBytes(tokenBytesLen)
108
- result.token_value = textDecoder.decode(tokenBytes)
107
+ result.token_value = tokenBytes
109
108
  }
110
109
  return result as unknown as AuthorizationToken
111
110
  }
@@ -14,7 +14,7 @@ export interface AuthorizationToken {
14
14
  readonly alias_type: bigint
15
15
  readonly token_alias?: bigint // present for DELETE(0), REGISTER(1), USE_ALIAS(2)
16
16
  readonly token_type?: bigint // present for USE_VALUE(3), REGISTER(1)
17
- readonly token_value?: string // present for USE_VALUE(3), REGISTER(1)
17
+ readonly token_value?: Uint8Array // present for USE_VALUE(3), REGISTER(1)
18
18
  }
19
19
 
20
20
  // Setup parameters (PATH, MAX_REQUEST_ID, AUTHORIZATION_TOKEN, MAX_AUTH_TOKEN_CACHE_SIZE)
@@ -109,7 +109,7 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
109
109
  tmpWriter.writeVarInt(tok.token_type)
110
110
  }
111
111
  if (tok.token_value !== undefined) {
112
- tmpWriter.writeBytes(hexToBytes(tok.token_value))
112
+ tmpWriter.writeBytes(tok.token_value)
113
113
  }
114
114
  if (tok.token_alias !== undefined) {
115
115
  tmpWriter.writeVarInt(tok.token_alias)
@@ -184,7 +184,7 @@ function decodeSetupParams(reader: BufferReader): Draft14Params {
184
184
  tok.token_type = tokenReader.readVarInt()
185
185
  if (tokenReader.remaining > 0) {
186
186
  const tokenValue = tokenReader.readBytesView(tokenReader.remaining)
187
- tok.token_value = bytesToHex(tokenValue)
187
+ tok.token_value = new Uint8Array(tokenValue)
188
188
  }
189
189
  }
190
190
  result.authorization_token = tok as unknown as AuthorizationToken
@@ -228,7 +228,7 @@ function encodeMessageParams(params: Draft14Params, writer: BufferWriter): void
228
228
  tmpWriter.writeVarInt(tok.token_type)
229
229
  }
230
230
  if (tok.token_value !== undefined) {
231
- tmpWriter.writeBytes(hexToBytes(tok.token_value))
231
+ tmpWriter.writeBytes(tok.token_value)
232
232
  }
233
233
  if (tok.token_alias !== undefined) {
234
234
  tmpWriter.writeVarInt(tok.token_alias)
@@ -287,7 +287,7 @@ function decodeMessageParams(reader: BufferReader): Draft14Params {
287
287
  tok.token_type = tokenReader.readVarInt()
288
288
  if (tokenReader.remaining > 0) {
289
289
  const tokenValue = tokenReader.readBytesView(tokenReader.remaining)
290
- tok.token_value = bytesToHex(tokenValue)
290
+ tok.token_value = new Uint8Array(tokenValue)
291
291
  }
292
292
  }
293
293
  result.authorization_token = tok as unknown as AuthorizationToken
@@ -33,7 +33,7 @@ export interface UnknownParam {
33
33
  export interface AuthorizationToken {
34
34
  readonly alias_type: bigint
35
35
  readonly token_type?: bigint
36
- readonly token_value?: string // raw hex
36
+ readonly token_value?: Uint8Array
37
37
  readonly token_alias?: bigint
38
38
  }
39
39
 
@@ -203,8 +203,7 @@ function encodeAuthorizationToken(token: AuthorizationToken, w: BufferWriter): v
203
203
  if (aliasType === 1 || aliasType === 3) {
204
204
  w.writeVarInt(token.token_type!)
205
205
  // token_value is the remaining bytes (no inner length prefix)
206
- const tokenBytes = hexToBytes(token.token_value_hex!)
207
- w.writeBytes(tokenBytes)
206
+ w.writeBytes(token.token_value!)
208
207
  }
209
208
  }
210
209
 
@@ -218,8 +217,7 @@ function decodeAuthorizationToken(r: BufferReader): AuthorizationToken {
218
217
  if (aliasType === 1 || aliasType === 3) {
219
218
  result.token_type = r.readVarInt()
220
219
  // token_value is the remaining bytes in the length-prefixed block
221
- const tokenBytes = r.readBytesView(r.remaining)
222
- result.token_value_hex = bytesToHex(tokenBytes)
220
+ result.token_value = r.readBytes(r.remaining)
223
221
  }
224
222
  return result as unknown as AuthorizationToken
225
223
  }
@@ -13,7 +13,7 @@ export interface AuthorizationToken {
13
13
  readonly alias_type: bigint
14
14
  readonly token_alias?: bigint // present when alias_type = 0 or 1
15
15
  readonly token_type?: bigint // present when alias_type = 1 or 3
16
- readonly token_value_hex?: string // present when alias_type = 1 or 3
16
+ readonly token_value?: Uint8Array // present when alias_type = 1 or 3
17
17
  }
18
18
 
19
19
  // Setup parameters (constant namespace across versions)
@@ -200,8 +200,7 @@ function encodeAuthorizationToken(token: AuthorizationToken, w: BufferWriter): v
200
200
  }
201
201
  if (aliasType === 1 || aliasType === 3) {
202
202
  w.writeVarInt(token.token_type!)
203
- const tokenBytes = hexToBytes(token.token_value_hex!)
204
- w.writeBytes(tokenBytes)
203
+ w.writeBytes(token.token_value!)
205
204
  }
206
205
  }
207
206
 
@@ -215,7 +214,7 @@ function decodeAuthorizationToken(r: BufferReader): AuthorizationToken {
215
214
  if (aliasType === 1 || aliasType === 3) {
216
215
  result.token_type = r.readVarInt()
217
216
  const tokenBytes = r.readBytesView(r.remaining)
218
- result.token_value_hex = bytesToHex(tokenBytes)
217
+ result.token_value = new Uint8Array(tokenBytes)
219
218
  }
220
219
  return result as unknown as AuthorizationToken
221
220
  }
@@ -13,7 +13,7 @@ export interface AuthorizationToken {
13
13
  readonly alias_type: bigint
14
14
  readonly token_alias?: bigint
15
15
  readonly token_type?: bigint
16
- readonly token_value_hex?: string
16
+ readonly token_value?: Uint8Array
17
17
  }
18
18
 
19
19
  // Setup parameters (constant namespace across versions)