@blockcast/mmt-container 0.1.0 → 0.3.0-main.d9354616fdf2

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 (799) hide show
  1. package/README.md +524 -0
  2. package/dist/.build-stamp +0 -0
  3. package/dist/__tests__/test-utils.d.ts +71 -0
  4. package/dist/__tests__/test-utils.d.ts.map +1 -0
  5. package/dist/align.d.ts +152 -0
  6. package/dist/align.d.ts.map +1 -0
  7. package/dist/align.js +88 -0
  8. package/dist/align.js.map +7 -0
  9. package/dist/audio-init-parser.d.ts +66 -0
  10. package/dist/audio-init-parser.d.ts.map +1 -0
  11. package/dist/audio-init-parser.js +118 -0
  12. package/dist/audio-init-parser.js.map +7 -0
  13. package/dist/audio-ring-buffer.d.ts +50 -0
  14. package/dist/audio-ring-buffer.d.ts.map +1 -0
  15. package/dist/audio-ring-buffer.js +80 -0
  16. package/dist/audio-ring-buffer.js.map +7 -0
  17. package/dist/authored-timing.d.ts +32 -0
  18. package/dist/authored-timing.d.ts.map +1 -0
  19. package/dist/authored-timing.js +32 -0
  20. package/dist/authored-timing.js.map +7 -0
  21. package/dist/block-policy.d.ts +314 -0
  22. package/dist/block-policy.d.ts.map +1 -0
  23. package/dist/block-policy.js +466 -0
  24. package/dist/block-policy.js.map +7 -0
  25. package/dist/browser-runtime.js +26549 -0
  26. package/dist/browser-runtime.js.map +7 -0
  27. package/dist/carp-catalog.d.ts +429 -0
  28. package/dist/carp-catalog.d.ts.map +1 -0
  29. package/dist/carp-catalog.js +985 -0
  30. package/dist/carp-catalog.js.map +7 -0
  31. package/dist/catalog-fec-params.d.ts +275 -0
  32. package/dist/catalog-fec-params.d.ts.map +1 -0
  33. package/dist/catalog-fec-params.js +702 -0
  34. package/dist/catalog-fec-params.js.map +7 -0
  35. package/dist/catalog-network-source.d.ts +42 -0
  36. package/dist/catalog-network-source.d.ts.map +1 -0
  37. package/dist/catalog-network-source.js +47 -0
  38. package/dist/catalog-network-source.js.map +7 -0
  39. package/dist/catalog-validator.d.ts +18 -0
  40. package/dist/catalog-validator.d.ts.map +1 -0
  41. package/dist/catalog-validator.js +7747 -0
  42. package/dist/catalog-validator.js.map +7 -0
  43. package/dist/cmaf-block-assembler.d.ts +285 -0
  44. package/dist/cmaf-block-assembler.d.ts.map +1 -0
  45. package/dist/cmaf-block-assembler.js +1966 -0
  46. package/dist/cmaf-block-assembler.js.map +7 -0
  47. package/dist/cmaf-group-batcher.d.ts +38 -0
  48. package/dist/cmaf-group-batcher.d.ts.map +1 -0
  49. package/dist/cmaf-group-batcher.js +176 -0
  50. package/dist/cmaf-group-batcher.js.map +7 -0
  51. package/dist/cmcd-producer.d.ts +104 -0
  52. package/dist/cmcd-producer.d.ts.map +1 -0
  53. package/dist/cmcd-producer.js +183 -0
  54. package/dist/cmcd-producer.js.map +7 -0
  55. package/dist/codec-utils.d.ts +384 -0
  56. package/dist/codec-utils.d.ts.map +1 -0
  57. package/dist/codec-utils.js +1546 -0
  58. package/dist/codec-utils.js.map +7 -0
  59. package/dist/conceal-timeline.d.ts +146 -0
  60. package/dist/conceal-timeline.d.ts.map +1 -0
  61. package/dist/conceal-timeline.js +137 -0
  62. package/dist/conceal-timeline.js.map +7 -0
  63. package/dist/delivery-gap.d.ts +75 -0
  64. package/dist/delivery-gap.d.ts.map +1 -0
  65. package/dist/delivery-gap.js +88 -0
  66. package/dist/delivery-gap.js.map +7 -0
  67. package/dist/duplicate-ledger.d.ts +197 -0
  68. package/dist/duplicate-ledger.d.ts.map +1 -0
  69. package/dist/duplicate-ledger.js +226 -0
  70. package/dist/duplicate-ledger.js.map +7 -0
  71. package/dist/fec-codec.d.ts +32 -0
  72. package/dist/fec-codec.d.ts.map +1 -0
  73. package/dist/fec-codec.js +47 -0
  74. package/dist/fec-codec.js.map +7 -0
  75. package/dist/fec-manager.d.ts +583 -0
  76. package/dist/fec-manager.d.ts.map +1 -0
  77. package/dist/fec-manager.js +3899 -0
  78. package/dist/fec-manager.js.map +7 -0
  79. package/dist/fec-starvation-detector.d.ts +59 -0
  80. package/dist/fec-starvation-detector.d.ts.map +1 -0
  81. package/dist/fec-starvation-detector.js +60 -0
  82. package/dist/fec-starvation-detector.js.map +7 -0
  83. package/dist/fec-state.d.ts +131 -0
  84. package/dist/fec-state.d.ts.map +1 -0
  85. package/dist/fec-state.js +87 -0
  86. package/dist/fec-state.js.map +7 -0
  87. package/dist/fec-worker-setup.d.ts +94 -0
  88. package/dist/fec-worker-setup.d.ts.map +1 -0
  89. package/dist/fec-worker-setup.js +673 -0
  90. package/dist/fec-worker-setup.js.map +7 -0
  91. package/dist/fmp4-completion.d.ts +30 -0
  92. package/dist/fmp4-completion.d.ts.map +1 -0
  93. package/dist/fmp4-completion.js +21 -0
  94. package/dist/fmp4-completion.js.map +7 -0
  95. package/dist/fmp4-reader.d.ts +37 -0
  96. package/dist/fmp4-reader.d.ts.map +1 -0
  97. package/dist/fmp4-reader.js +100 -0
  98. package/dist/fmp4-reader.js.map +7 -0
  99. package/dist/index.d.ts +44 -3
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +460 -14
  102. package/dist/index.js.map +7 -1
  103. package/dist/iso-block-locator.d.ts +118 -0
  104. package/dist/iso-block-locator.d.ts.map +1 -0
  105. package/dist/iso-block-locator.js +289 -0
  106. package/dist/iso-block-locator.js.map +7 -0
  107. package/dist/iso-bmff-timing.d.ts +78 -0
  108. package/dist/iso-bmff-timing.d.ts.map +1 -0
  109. package/dist/iso-bmff-timing.js +593 -0
  110. package/dist/iso-bmff-timing.js.map +7 -0
  111. package/dist/loc.d.ts +70 -75
  112. package/dist/loc.d.ts.map +1 -1
  113. package/dist/loc.js +106 -192
  114. package/dist/loc.js.map +7 -1
  115. package/dist/manifest-auth-plan.d.ts +30 -0
  116. package/dist/manifest-auth-plan.d.ts.map +1 -0
  117. package/dist/manifest-auth-plan.js +1266 -0
  118. package/dist/manifest-auth-plan.js.map +7 -0
  119. package/dist/media-router.d.ts +262 -0
  120. package/dist/media-router.d.ts.map +1 -0
  121. package/dist/media-router.js +584 -0
  122. package/dist/media-router.js.map +7 -0
  123. package/dist/mfu-reassembler.d.ts +313 -9
  124. package/dist/mfu-reassembler.d.ts.map +1 -1
  125. package/dist/mfu-reassembler.js +3051 -285
  126. package/dist/mfu-reassembler.js.map +7 -1
  127. package/dist/mfu-reassembly-policy.d.ts +24 -0
  128. package/dist/mfu-reassembly-policy.d.ts.map +1 -0
  129. package/dist/mfu-reassembly-policy.js +99 -0
  130. package/dist/mfu-reassembly-policy.js.map +7 -0
  131. package/dist/mmtp-container-parser.d.ts +568 -0
  132. package/dist/mmtp-container-parser.d.ts.map +1 -0
  133. package/dist/mmtp-container-parser.js +6580 -0
  134. package/dist/mmtp-container-parser.js.map +7 -0
  135. package/dist/mmtp-container-parser.no-modules.js +9616 -0
  136. package/dist/mmtp-container-parser.no-modules.js.map +7 -0
  137. package/dist/mmtp-decode-pipeline.d.ts +138 -0
  138. package/dist/mmtp-decode-pipeline.d.ts.map +1 -0
  139. package/dist/mmtp-decode-pipeline.js +6814 -0
  140. package/dist/mmtp-decode-pipeline.js.map +7 -0
  141. package/dist/mmtp-router.d.ts +679 -0
  142. package/dist/mmtp-router.d.ts.map +1 -0
  143. package/dist/mmtp-router.js +11278 -0
  144. package/dist/mmtp-router.js.map +7 -0
  145. package/dist/mmtp-to-cmaf.d.ts +187 -0
  146. package/dist/mmtp-to-cmaf.d.ts.map +1 -0
  147. package/dist/mmtp-to-cmaf.js +716 -0
  148. package/dist/mmtp-to-cmaf.js.map +7 -0
  149. package/dist/multicast-auth-catalog.d.ts +115 -0
  150. package/dist/multicast-auth-catalog.d.ts.map +1 -0
  151. package/dist/multicast-auth-catalog.js +202 -0
  152. package/dist/multicast-auth-catalog.js.map +7 -0
  153. package/dist/multicast-input.d.ts +141 -0
  154. package/dist/multicast-input.d.ts.map +1 -0
  155. package/dist/multicast-input.js +390 -0
  156. package/dist/multicast-input.js.map +7 -0
  157. package/dist/multicast-manager.d.ts +669 -0
  158. package/dist/multicast-manager.d.ts.map +1 -0
  159. package/dist/multicast-manager.js +19101 -0
  160. package/dist/multicast-manager.js.map +7 -0
  161. package/dist/multicast-transport.d.ts +271 -0
  162. package/dist/multicast-transport.d.ts.map +1 -0
  163. package/dist/multicast-transport.js +2264 -0
  164. package/dist/multicast-transport.js.map +7 -0
  165. package/dist/multicast-unwrap.d.ts +57 -0
  166. package/dist/multicast-unwrap.d.ts.map +1 -0
  167. package/dist/multicast-unwrap.js +418 -0
  168. package/dist/multicast-unwrap.js.map +7 -0
  169. package/dist/no-modules.d.ts +10 -0
  170. package/dist/no-modules.d.ts.map +1 -0
  171. package/dist/no-modules.js +9491 -0
  172. package/dist/no-modules.js.map +7 -0
  173. package/dist/phase14-catalog-override.d.ts +126 -0
  174. package/dist/phase14-catalog-override.d.ts.map +1 -0
  175. package/dist/phase14-catalog-override.js +155 -0
  176. package/dist/phase14-catalog-override.js.map +7 -0
  177. package/dist/repair-fetch.d.ts +270 -0
  178. package/dist/repair-fetch.d.ts.map +1 -0
  179. package/dist/repair-fetch.js +381 -0
  180. package/dist/repair-fetch.js.map +7 -0
  181. package/dist/repair-layers.d.ts +158 -0
  182. package/dist/repair-layers.d.ts.map +1 -0
  183. package/dist/repair-layers.js +344 -0
  184. package/dist/repair-layers.js.map +7 -0
  185. package/dist/sample-combiner.d.ts +212 -0
  186. package/dist/sample-combiner.d.ts.map +1 -0
  187. package/dist/sample-combiner.js +595 -0
  188. package/dist/sample-combiner.js.map +7 -0
  189. package/dist/signaling.d.ts +29 -0
  190. package/dist/signaling.d.ts.map +1 -0
  191. package/dist/signaling.js +572 -0
  192. package/dist/signaling.js.map +7 -0
  193. package/dist/source-auth.d.ts +2 -0
  194. package/dist/source-auth.d.ts.map +1 -0
  195. package/dist/source-auth.js +1209 -0
  196. package/dist/source-auth.js.map +7 -0
  197. package/dist/switching-set-alignment.d.ts +61 -0
  198. package/dist/switching-set-alignment.d.ts.map +1 -0
  199. package/dist/switching-set-alignment.js +70 -0
  200. package/dist/switching-set-alignment.js.map +7 -0
  201. package/dist/timestamp-codec.d.ts +34 -0
  202. package/dist/timestamp-codec.d.ts.map +1 -0
  203. package/dist/timestamp-codec.js +473 -0
  204. package/dist/timestamp-codec.js.map +7 -0
  205. package/dist/track-pipeline-setup.d.ts +83 -0
  206. package/dist/track-pipeline-setup.d.ts.map +1 -0
  207. package/dist/track-pipeline-setup.js +291 -0
  208. package/dist/track-pipeline-setup.js.map +7 -0
  209. package/dist/track-pipeline.d.ts +121 -0
  210. package/dist/track-pipeline.d.ts.map +1 -0
  211. package/dist/track-pipeline.js +209 -0
  212. package/dist/track-pipeline.js.map +7 -0
  213. package/dist/track-session.d.ts +414 -0
  214. package/dist/track-session.d.ts.map +1 -0
  215. package/dist/track-session.js +754 -0
  216. package/dist/track-session.js.map +7 -0
  217. package/dist/transport-pool.d.ts +69 -0
  218. package/dist/transport-pool.d.ts.map +1 -0
  219. package/dist/transport-pool.js +74 -0
  220. package/dist/transport-pool.js.map +7 -0
  221. package/dist/wasm-mfu-reassembler.d.ts +97 -0
  222. package/dist/wasm-mfu-reassembler.d.ts.map +1 -0
  223. package/dist/wasm-mfu-reassembler.js +2133 -0
  224. package/dist/wasm-mfu-reassembler.js.map +7 -0
  225. package/dist/wasm-mmtp-container-parser.d.ts +10 -0
  226. package/dist/wasm-mmtp-container-parser.d.ts.map +1 -0
  227. package/dist/wasm-mmtp-container-parser.js +6834 -0
  228. package/dist/wasm-mmtp-container-parser.js.map +7 -0
  229. package/node_modules/@blockcast/fec-worker/README.md +223 -0
  230. package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
  231. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +38 -0
  232. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +1 -0
  233. package/node_modules/@blockcast/fec-worker/dist/block-order.js +78 -0
  234. package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +1 -0
  235. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +93 -0
  236. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +1 -0
  237. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +346 -0
  238. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +1 -0
  239. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +380 -0
  240. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +1 -0
  241. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +11 -0
  242. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +1 -0
  243. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +14 -0
  244. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +1 -0
  245. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +859 -0
  246. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +7 -0
  247. package/node_modules/@blockcast/fec-worker/dist/index.d.ts +10 -0
  248. package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +1 -0
  249. package/node_modules/@blockcast/fec-worker/dist/index.js +8 -0
  250. package/node_modules/@blockcast/fec-worker/dist/index.js.map +1 -0
  251. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +20 -0
  252. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +1 -0
  253. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +370 -0
  254. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +7 -0
  255. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +104 -0
  256. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +1 -0
  257. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +181 -0
  258. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +1 -0
  259. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +194 -0
  260. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +1 -0
  261. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +62 -0
  262. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +1 -0
  263. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +9 -0
  264. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +1 -0
  265. package/node_modules/@blockcast/fec-worker/dist/transfer.js +13 -0
  266. package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +1 -0
  267. package/node_modules/@blockcast/fec-worker/package.json +59 -0
  268. package/node_modules/@blockcast/fec-worker/src/block-order.ts +93 -0
  269. package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +392 -0
  270. package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +399 -0
  271. package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +1502 -0
  272. package/node_modules/@blockcast/fec-worker/src/index.ts +35 -0
  273. package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +589 -0
  274. package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +222 -0
  275. package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +209 -0
  276. package/node_modules/@blockcast/fec-worker/src/transfer.ts +12 -0
  277. package/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
  278. package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  279. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
  280. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
  281. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
  282. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
  283. package/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
  284. package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
  285. package/node_modules/@blockcast/mmt-base/README.md +134 -0
  286. package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  287. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
  288. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
  289. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
  290. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
  291. package/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
  292. package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
  293. package/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
  294. package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
  295. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
  296. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
  297. package/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
  298. package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
  299. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
  300. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
  301. package/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
  302. package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
  303. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
  304. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
  305. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
  306. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
  307. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
  308. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
  309. package/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
  310. package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
  311. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
  312. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
  313. package/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
  314. package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
  315. package/node_modules/@blockcast/mmt-base/package.json +49 -0
  316. package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
  317. package/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
  318. package/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
  319. package/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
  320. package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
  321. package/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
  322. package/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
  323. package/node_modules/@blockcast/mmt-fec/README.md +271 -0
  324. package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
  325. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +82 -0
  326. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +1 -0
  327. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +296 -0
  328. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +1 -0
  329. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +106 -0
  330. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +1 -0
  331. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +288 -0
  332. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +1 -0
  333. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +46 -0
  334. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +1 -0
  335. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +96 -0
  336. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +1 -0
  337. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +33 -0
  338. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +1 -0
  339. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +57 -0
  340. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +1 -0
  341. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +205 -0
  342. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +1 -0
  343. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +240 -0
  344. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +1 -0
  345. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +28 -0
  346. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -0
  347. package/node_modules/@blockcast/mmt-fec/dist/index.js +28 -0
  348. package/node_modules/@blockcast/mmt-fec/dist/index.js.map +1 -0
  349. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +20 -0
  350. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +1 -0
  351. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +28 -0
  352. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +1 -0
  353. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +258 -0
  354. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -0
  355. package/node_modules/@blockcast/mmt-fec/dist/oti.js +382 -0
  356. package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +1 -0
  357. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +41 -0
  358. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +1 -0
  359. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +81 -0
  360. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +1 -0
  361. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +82 -0
  362. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +1 -0
  363. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +170 -0
  364. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +1 -0
  365. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
  366. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  367. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
  368. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
  369. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
  370. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
  371. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
  372. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
  373. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +134 -0
  374. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  375. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
  376. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
  377. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
  378. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
  379. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
  380. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
  381. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
  382. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
  383. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
  384. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
  385. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
  386. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
  387. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
  388. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
  389. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
  390. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
  391. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
  392. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
  393. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
  394. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
  395. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
  396. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
  397. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
  398. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
  399. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
  400. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
  401. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
  402. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
  403. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +49 -0
  404. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
  405. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
  406. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
  407. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
  408. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
  409. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
  410. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
  411. package/node_modules/@blockcast/mmt-fec/package.json +79 -0
  412. package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +371 -0
  413. package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +439 -0
  414. package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +127 -0
  415. package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +68 -0
  416. package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +310 -0
  417. package/node_modules/@blockcast/mmt-fec/src/index.ts +94 -0
  418. package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +34 -0
  419. package/node_modules/@blockcast/mmt-fec/src/oti.ts +463 -0
  420. package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +101 -0
  421. package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +195 -0
  422. package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
  423. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +28 -0
  424. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +1 -0
  425. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +128 -0
  426. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +1 -0
  427. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +4 -0
  428. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +1 -0
  429. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +4 -0
  430. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +1 -0
  431. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +37 -0
  432. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +1 -0
  433. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +179 -0
  434. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +1 -0
  435. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +99 -0
  436. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +1 -0
  437. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +492 -0
  438. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +1 -0
  439. package/node_modules/@blockcast/mmt-manifest-verify/package.json +45 -0
  440. package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +171 -0
  441. package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +3 -0
  442. package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +230 -0
  443. package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +669 -0
  444. package/node_modules/@noble/hashes/LICENSE +21 -0
  445. package/node_modules/@noble/hashes/README.md +521 -0
  446. package/node_modules/@noble/hashes/_assert.d.ts +17 -0
  447. package/node_modules/@noble/hashes/_assert.d.ts.map +1 -0
  448. package/node_modules/@noble/hashes/_assert.js +18 -0
  449. package/node_modules/@noble/hashes/_assert.js.map +1 -0
  450. package/node_modules/@noble/hashes/_blake.d.ts +14 -0
  451. package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
  452. package/node_modules/@noble/hashes/_blake.js +50 -0
  453. package/node_modules/@noble/hashes/_blake.js.map +1 -0
  454. package/node_modules/@noble/hashes/_md.d.ts +51 -0
  455. package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
  456. package/node_modules/@noble/hashes/_md.js +162 -0
  457. package/node_modules/@noble/hashes/_md.js.map +1 -0
  458. package/node_modules/@noble/hashes/_u64.d.ts +55 -0
  459. package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
  460. package/node_modules/@noble/hashes/_u64.js +90 -0
  461. package/node_modules/@noble/hashes/_u64.js.map +1 -0
  462. package/node_modules/@noble/hashes/argon2.d.ts +32 -0
  463. package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
  464. package/node_modules/@noble/hashes/argon2.js +401 -0
  465. package/node_modules/@noble/hashes/argon2.js.map +1 -0
  466. package/node_modules/@noble/hashes/blake1.d.ts +106 -0
  467. package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
  468. package/node_modules/@noble/hashes/blake1.js +459 -0
  469. package/node_modules/@noble/hashes/blake1.js.map +1 -0
  470. package/node_modules/@noble/hashes/blake2.d.ts +116 -0
  471. package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
  472. package/node_modules/@noble/hashes/blake2.js +420 -0
  473. package/node_modules/@noble/hashes/blake2.js.map +1 -0
  474. package/node_modules/@noble/hashes/blake2b.d.ts +11 -0
  475. package/node_modules/@noble/hashes/blake2b.d.ts.map +1 -0
  476. package/node_modules/@noble/hashes/blake2b.js +14 -0
  477. package/node_modules/@noble/hashes/blake2b.js.map +1 -0
  478. package/node_modules/@noble/hashes/blake2s.d.ts +20 -0
  479. package/node_modules/@noble/hashes/blake2s.d.ts.map +1 -0
  480. package/node_modules/@noble/hashes/blake2s.js +24 -0
  481. package/node_modules/@noble/hashes/blake2s.js.map +1 -0
  482. package/node_modules/@noble/hashes/blake3.d.ts +54 -0
  483. package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
  484. package/node_modules/@noble/hashes/blake3.js +255 -0
  485. package/node_modules/@noble/hashes/blake3.js.map +1 -0
  486. package/node_modules/@noble/hashes/crypto.d.ts +2 -0
  487. package/node_modules/@noble/hashes/crypto.d.ts.map +1 -0
  488. package/node_modules/@noble/hashes/crypto.js +5 -0
  489. package/node_modules/@noble/hashes/crypto.js.map +1 -0
  490. package/node_modules/@noble/hashes/cryptoNode.d.ts +2 -0
  491. package/node_modules/@noble/hashes/cryptoNode.d.ts.map +1 -0
  492. package/node_modules/@noble/hashes/cryptoNode.js +18 -0
  493. package/node_modules/@noble/hashes/cryptoNode.js.map +1 -0
  494. package/node_modules/@noble/hashes/eskdf.d.ts +47 -0
  495. package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
  496. package/node_modules/@noble/hashes/eskdf.js +166 -0
  497. package/node_modules/@noble/hashes/eskdf.js.map +1 -0
  498. package/node_modules/@noble/hashes/esm/_assert.d.ts +17 -0
  499. package/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -0
  500. package/node_modules/@noble/hashes/esm/_assert.js +15 -0
  501. package/node_modules/@noble/hashes/esm/_assert.js.map +1 -0
  502. package/node_modules/@noble/hashes/esm/_blake.d.ts +14 -0
  503. package/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -0
  504. package/node_modules/@noble/hashes/esm/_blake.js +45 -0
  505. package/node_modules/@noble/hashes/esm/_blake.js.map +1 -0
  506. package/node_modules/@noble/hashes/esm/_md.d.ts +51 -0
  507. package/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -0
  508. package/node_modules/@noble/hashes/esm/_md.js +155 -0
  509. package/node_modules/@noble/hashes/esm/_md.js.map +1 -0
  510. package/node_modules/@noble/hashes/esm/_u64.d.ts +55 -0
  511. package/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -0
  512. package/node_modules/@noble/hashes/esm/_u64.js +67 -0
  513. package/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
  514. package/node_modules/@noble/hashes/esm/argon2.d.ts +32 -0
  515. package/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -0
  516. package/node_modules/@noble/hashes/esm/argon2.js +392 -0
  517. package/node_modules/@noble/hashes/esm/argon2.js.map +1 -0
  518. package/node_modules/@noble/hashes/esm/blake1.d.ts +106 -0
  519. package/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -0
  520. package/node_modules/@noble/hashes/esm/blake1.js +452 -0
  521. package/node_modules/@noble/hashes/esm/blake1.js.map +1 -0
  522. package/node_modules/@noble/hashes/esm/blake2.d.ts +116 -0
  523. package/node_modules/@noble/hashes/esm/blake2.d.ts.map +1 -0
  524. package/node_modules/@noble/hashes/esm/blake2.js +413 -0
  525. package/node_modules/@noble/hashes/esm/blake2.js.map +1 -0
  526. package/node_modules/@noble/hashes/esm/blake2b.d.ts +11 -0
  527. package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -0
  528. package/node_modules/@noble/hashes/esm/blake2b.js +11 -0
  529. package/node_modules/@noble/hashes/esm/blake2b.js.map +1 -0
  530. package/node_modules/@noble/hashes/esm/blake2s.d.ts +20 -0
  531. package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -0
  532. package/node_modules/@noble/hashes/esm/blake2s.js +21 -0
  533. package/node_modules/@noble/hashes/esm/blake2s.js.map +1 -0
  534. package/node_modules/@noble/hashes/esm/blake3.d.ts +54 -0
  535. package/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -0
  536. package/node_modules/@noble/hashes/esm/blake3.js +251 -0
  537. package/node_modules/@noble/hashes/esm/blake3.js.map +1 -0
  538. package/node_modules/@noble/hashes/esm/crypto.d.ts +2 -0
  539. package/node_modules/@noble/hashes/esm/crypto.d.ts.map +1 -0
  540. package/node_modules/@noble/hashes/esm/crypto.js +2 -0
  541. package/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
  542. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +2 -0
  543. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +1 -0
  544. package/node_modules/@noble/hashes/esm/cryptoNode.js +15 -0
  545. package/node_modules/@noble/hashes/esm/cryptoNode.js.map +1 -0
  546. package/node_modules/@noble/hashes/esm/eskdf.d.ts +47 -0
  547. package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -0
  548. package/node_modules/@noble/hashes/esm/eskdf.js +160 -0
  549. package/node_modules/@noble/hashes/esm/eskdf.js.map +1 -0
  550. package/node_modules/@noble/hashes/esm/hkdf.d.ts +36 -0
  551. package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -0
  552. package/node_modules/@noble/hashes/esm/hkdf.js +82 -0
  553. package/node_modules/@noble/hashes/esm/hkdf.js.map +1 -0
  554. package/node_modules/@noble/hashes/esm/hmac.d.ts +35 -0
  555. package/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -0
  556. package/node_modules/@noble/hashes/esm/hmac.js +86 -0
  557. package/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
  558. package/node_modules/@noble/hashes/esm/index.d.ts +2 -0
  559. package/node_modules/@noble/hashes/esm/index.d.ts.map +1 -0
  560. package/node_modules/@noble/hashes/esm/index.js +33 -0
  561. package/node_modules/@noble/hashes/esm/index.js.map +1 -0
  562. package/node_modules/@noble/hashes/esm/legacy.d.ts +71 -0
  563. package/node_modules/@noble/hashes/esm/legacy.d.ts.map +1 -0
  564. package/node_modules/@noble/hashes/esm/legacy.js +281 -0
  565. package/node_modules/@noble/hashes/esm/legacy.js.map +1 -0
  566. package/node_modules/@noble/hashes/esm/package.json +10 -0
  567. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +23 -0
  568. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -0
  569. package/node_modules/@noble/hashes/esm/pbkdf2.js +97 -0
  570. package/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -0
  571. package/node_modules/@noble/hashes/esm/ripemd160.d.ts +13 -0
  572. package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -0
  573. package/node_modules/@noble/hashes/esm/ripemd160.js +13 -0
  574. package/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -0
  575. package/node_modules/@noble/hashes/esm/scrypt.d.ts +34 -0
  576. package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -0
  577. package/node_modules/@noble/hashes/esm/scrypt.js +228 -0
  578. package/node_modules/@noble/hashes/esm/scrypt.js.map +1 -0
  579. package/node_modules/@noble/hashes/esm/sha1.d.ts +11 -0
  580. package/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -0
  581. package/node_modules/@noble/hashes/esm/sha1.js +11 -0
  582. package/node_modules/@noble/hashes/esm/sha1.js.map +1 -0
  583. package/node_modules/@noble/hashes/esm/sha2.d.ts +159 -0
  584. package/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -0
  585. package/node_modules/@noble/hashes/esm/sha2.js +375 -0
  586. package/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
  587. package/node_modules/@noble/hashes/esm/sha256.d.ts +20 -0
  588. package/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -0
  589. package/node_modules/@noble/hashes/esm/sha256.js +20 -0
  590. package/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
  591. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +142 -0
  592. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -0
  593. package/node_modules/@noble/hashes/esm/sha3-addons.js +393 -0
  594. package/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -0
  595. package/node_modules/@noble/hashes/esm/sha3.d.ts +53 -0
  596. package/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -0
  597. package/node_modules/@noble/hashes/esm/sha3.js +234 -0
  598. package/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
  599. package/node_modules/@noble/hashes/esm/sha512.d.ts +26 -0
  600. package/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -0
  601. package/node_modules/@noble/hashes/esm/sha512.js +26 -0
  602. package/node_modules/@noble/hashes/esm/sha512.js.map +1 -0
  603. package/node_modules/@noble/hashes/esm/utils.d.ts +161 -0
  604. package/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -0
  605. package/node_modules/@noble/hashes/esm/utils.js +281 -0
  606. package/node_modules/@noble/hashes/esm/utils.js.map +1 -0
  607. package/node_modules/@noble/hashes/hkdf.d.ts +36 -0
  608. package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
  609. package/node_modules/@noble/hashes/hkdf.js +88 -0
  610. package/node_modules/@noble/hashes/hkdf.js.map +1 -0
  611. package/node_modules/@noble/hashes/hmac.d.ts +35 -0
  612. package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
  613. package/node_modules/@noble/hashes/hmac.js +91 -0
  614. package/node_modules/@noble/hashes/hmac.js.map +1 -0
  615. package/node_modules/@noble/hashes/index.d.ts +1 -0
  616. package/node_modules/@noble/hashes/index.d.ts.map +1 -0
  617. package/node_modules/@noble/hashes/index.js +33 -0
  618. package/node_modules/@noble/hashes/index.js.map +1 -0
  619. package/node_modules/@noble/hashes/legacy.d.ts +71 -0
  620. package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
  621. package/node_modules/@noble/hashes/legacy.js +287 -0
  622. package/node_modules/@noble/hashes/legacy.js.map +1 -0
  623. package/node_modules/@noble/hashes/package.json +266 -0
  624. package/node_modules/@noble/hashes/pbkdf2.d.ts +23 -0
  625. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
  626. package/node_modules/@noble/hashes/pbkdf2.js +101 -0
  627. package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
  628. package/node_modules/@noble/hashes/ripemd160.d.ts +13 -0
  629. package/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -0
  630. package/node_modules/@noble/hashes/ripemd160.js +16 -0
  631. package/node_modules/@noble/hashes/ripemd160.js.map +1 -0
  632. package/node_modules/@noble/hashes/scrypt.d.ts +34 -0
  633. package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
  634. package/node_modules/@noble/hashes/scrypt.js +232 -0
  635. package/node_modules/@noble/hashes/scrypt.js.map +1 -0
  636. package/node_modules/@noble/hashes/sha1.d.ts +11 -0
  637. package/node_modules/@noble/hashes/sha1.d.ts.map +1 -0
  638. package/node_modules/@noble/hashes/sha1.js +14 -0
  639. package/node_modules/@noble/hashes/sha1.js.map +1 -0
  640. package/node_modules/@noble/hashes/sha2.d.ts +159 -0
  641. package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
  642. package/node_modules/@noble/hashes/sha2.js +384 -0
  643. package/node_modules/@noble/hashes/sha2.js.map +1 -0
  644. package/node_modules/@noble/hashes/sha256.d.ts +20 -0
  645. package/node_modules/@noble/hashes/sha256.d.ts.map +1 -0
  646. package/node_modules/@noble/hashes/sha256.js +23 -0
  647. package/node_modules/@noble/hashes/sha256.js.map +1 -0
  648. package/node_modules/@noble/hashes/sha3-addons.d.ts +142 -0
  649. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
  650. package/node_modules/@noble/hashes/sha3-addons.js +402 -0
  651. package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
  652. package/node_modules/@noble/hashes/sha3.d.ts +53 -0
  653. package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
  654. package/node_modules/@noble/hashes/sha3.js +239 -0
  655. package/node_modules/@noble/hashes/sha3.js.map +1 -0
  656. package/node_modules/@noble/hashes/sha512.d.ts +26 -0
  657. package/node_modules/@noble/hashes/sha512.d.ts.map +1 -0
  658. package/node_modules/@noble/hashes/sha512.js +29 -0
  659. package/node_modules/@noble/hashes/sha512.js.map +1 -0
  660. package/node_modules/@noble/hashes/src/_assert.ts +22 -0
  661. package/node_modules/@noble/hashes/src/_blake.ts +50 -0
  662. package/node_modules/@noble/hashes/src/_md.ts +176 -0
  663. package/node_modules/@noble/hashes/src/_u64.ts +91 -0
  664. package/node_modules/@noble/hashes/src/argon2.ts +497 -0
  665. package/node_modules/@noble/hashes/src/blake1.ts +534 -0
  666. package/node_modules/@noble/hashes/src/blake2.ts +486 -0
  667. package/node_modules/@noble/hashes/src/blake2b.ts +10 -0
  668. package/node_modules/@noble/hashes/src/blake2s.ts +20 -0
  669. package/node_modules/@noble/hashes/src/blake3.ts +272 -0
  670. package/node_modules/@noble/hashes/src/crypto.ts +9 -0
  671. package/node_modules/@noble/hashes/src/cryptoNode.ts +15 -0
  672. package/node_modules/@noble/hashes/src/eskdf.ts +187 -0
  673. package/node_modules/@noble/hashes/src/hkdf.ts +88 -0
  674. package/node_modules/@noble/hashes/src/hmac.ts +94 -0
  675. package/node_modules/@noble/hashes/src/index.ts +31 -0
  676. package/node_modules/@noble/hashes/src/legacy.ts +293 -0
  677. package/node_modules/@noble/hashes/src/pbkdf2.ts +122 -0
  678. package/node_modules/@noble/hashes/src/ripemd160.ts +12 -0
  679. package/node_modules/@noble/hashes/src/scrypt.ts +257 -0
  680. package/node_modules/@noble/hashes/src/sha1.ts +10 -0
  681. package/node_modules/@noble/hashes/src/sha2.ts +402 -0
  682. package/node_modules/@noble/hashes/src/sha256.ts +24 -0
  683. package/node_modules/@noble/hashes/src/sha3-addons.ts +499 -0
  684. package/node_modules/@noble/hashes/src/sha3.ts +258 -0
  685. package/node_modules/@noble/hashes/src/sha512.ts +34 -0
  686. package/node_modules/@noble/hashes/src/utils.ts +395 -0
  687. package/node_modules/@noble/hashes/utils.d.ts +161 -0
  688. package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
  689. package/node_modules/@noble/hashes/utils.js +313 -0
  690. package/node_modules/@noble/hashes/utils.js.map +1 -0
  691. package/package.json +179 -8
  692. package/schemas/catalog.schema.json +357 -0
  693. package/src/align.ts +239 -0
  694. package/src/audio-init-parser.ts +189 -0
  695. package/src/audio-ring-buffer.ts +120 -0
  696. package/src/authored-timing.ts +63 -0
  697. package/src/block-policy.ts +903 -0
  698. package/src/carp-catalog.ts +1065 -0
  699. package/src/catalog-fec-params.ts +729 -0
  700. package/src/catalog-network-source.ts +74 -0
  701. package/src/catalog-validator.ts +34 -0
  702. package/src/cmaf-block-assembler.ts +1255 -0
  703. package/src/cmaf-group-batcher.ts +104 -0
  704. package/src/cmcd-producer.ts +329 -0
  705. package/src/codec-utils.ts +1984 -0
  706. package/src/conceal-timeline.ts +293 -0
  707. package/src/delivery-gap.ts +147 -0
  708. package/src/duplicate-ledger.ts +372 -0
  709. package/src/fec-codec.ts +61 -0
  710. package/src/fec-manager.ts +4298 -0
  711. package/src/fec-starvation-detector.ts +128 -0
  712. package/src/fec-state.ts +219 -0
  713. package/src/fec-worker-setup.ts +283 -0
  714. package/src/fmp4-completion.ts +47 -0
  715. package/src/fmp4-reader.ts +112 -0
  716. package/src/index.ts +590 -21
  717. package/src/iso-block-locator.ts +329 -0
  718. package/src/iso-bmff-timing.ts +813 -0
  719. package/src/loc.ts +128 -154
  720. package/src/manifest-auth-plan.ts +107 -0
  721. package/src/media-router.ts +841 -0
  722. package/src/mfu-reassembler.ts +3480 -155
  723. package/src/mfu-reassembly-policy.ts +134 -0
  724. package/src/mmtp-container-parser.ts +2380 -0
  725. package/src/mmtp-decode-pipeline.ts +406 -0
  726. package/src/mmtp-router.ts +4860 -0
  727. package/src/mmtp-to-cmaf.ts +977 -0
  728. package/src/multicast-auth-catalog.ts +340 -0
  729. package/src/multicast-input.ts +793 -0
  730. package/src/multicast-manager.ts +2783 -0
  731. package/src/multicast-transport.ts +1058 -0
  732. package/src/multicast-unwrap.ts +132 -0
  733. package/src/no-modules.ts +21 -0
  734. package/src/phase14-catalog-override.ts +336 -0
  735. package/src/repair-fetch.ts +772 -0
  736. package/src/repair-layers.ts +533 -0
  737. package/src/sample-combiner.ts +938 -0
  738. package/src/signaling.ts +78 -0
  739. package/src/source-auth.ts +1 -0
  740. package/src/switching-set-alignment.ts +109 -0
  741. package/src/timestamp-codec.ts +265 -0
  742. package/src/track-pipeline-setup.ts +205 -0
  743. package/src/track-pipeline.ts +332 -0
  744. package/src/track-session.ts +1010 -0
  745. package/src/transport-pool.ts +128 -0
  746. package/src/wasm-mfu-reassembler.ts +405 -0
  747. package/src/wasm-mmtp-container-parser.ts +23 -0
  748. package/test-vectors/align.json +199 -0
  749. package/test-vectors/catalog/README.md +106 -0
  750. package/test-vectors/catalog/negative/archive-origin-with-path.json +33 -0
  751. package/test-vectors/catalog/negative/archive-unknown-field.json +34 -0
  752. package/test-vectors/catalog/negative/fec-block-profile-missing.json +51 -0
  753. package/test-vectors/catalog/negative/fec-block-profile-unknown.json +52 -0
  754. package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +28 -0
  755. package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +33 -0
  756. package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +31 -0
  757. package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +32 -0
  758. package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +34 -0
  759. package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +24 -0
  760. package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +33 -0
  761. package/test-vectors/catalog/negative/legacy-selection-params.json +15 -0
  762. package/test-vectors/catalog/negative/media-track-repair-layer.json +16 -0
  763. package/test-vectors/catalog/negative/missing-mmtp-fields.json +12 -0
  764. package/test-vectors/catalog/negative/multicast-auth-padded-key.json +37 -0
  765. package/test-vectors/catalog/negative/multicast-auth-reused-track-format.json +53 -0
  766. package/test-vectors/catalog/negative/multicast-auth-trailing-pad-bits.json +37 -0
  767. package/test-vectors/catalog/negative/multicast-endpoint-missing-protocol-and-source.json +24 -0
  768. package/test-vectors/catalog/negative/multicast-network-source-empty.json +44 -0
  769. package/test-vectors/catalog/negative/multicast-packet-id-signaling.json +26 -0
  770. package/test-vectors/catalog/negative/network-source-object.json +25 -0
  771. package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +24 -0
  772. package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +27 -0
  773. package/test-vectors/catalog/negative/repair-track-legacy-shape.json +19 -0
  774. package/test-vectors/catalog/negative/track-role-empty.json +16 -0
  775. package/test-vectors/catalog/negative/track-role-non-string.json +16 -0
  776. package/test-vectors/catalog/positive/archive-origin.json +34 -0
  777. package/test-vectors/catalog/positive/fec-iso-ssbg1.json +52 -0
  778. package/test-vectors/catalog/positive/fec-layered-repair.json +106 -0
  779. package/test-vectors/catalog/positive/fec-multicast.json +52 -0
  780. package/test-vectors/catalog/positive/flat-av.json +30 -0
  781. package/test-vectors/catalog/positive/multicast-auth-rotation.json +55 -0
  782. package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +43 -0
  783. package/test-vectors/catalog/positive/ticks-and-mixed-timescales.json +39 -0
  784. package/test-vectors/catalog/positive/track-role.json +49 -0
  785. package/test-vectors/catalog/releases/moqcast-native-v16-v1/catalog.json +65 -0
  786. package/test-vectors/catalog/releases/moqcast-native-v16-v1.archive.sha256 +1 -0
  787. package/test-vectors/catalog-multicast-auth-v1.json +26 -0
  788. package/test-vectors/catalog-validation.json +732 -0
  789. package/test-vectors/catalog-validator-public-api.mjs +25 -0
  790. package/test-vectors/generate-source-auth-fixture.mjs +114 -0
  791. package/test-vectors/hevc-x265-repeat-headers-v1.json +40 -0
  792. package/test-vectors/source-auth-v1.json +61 -0
  793. package/test-vectors/source-contiguity-v1.json +131 -0
  794. package/test-vectors/subsample-placement-v1.json +230 -0
  795. package/dist/mmtp.d.ts +0 -73
  796. package/dist/mmtp.d.ts.map +0 -1
  797. package/dist/mmtp.js +0 -210
  798. package/dist/mmtp.js.map +0 -1
  799. package/src/mmtp.ts +0 -277
@@ -0,0 +1,195 @@
1
+ /**
2
+ * MoQ repair group ids for `iso-ssbg1-v1` FEC blocks (BLO-35597, decision D2(a)).
3
+ *
4
+ * SS_ID and SS_Start are 32-bit wire fields that wrap at 2^32 (ISO/IEC
5
+ * 23008-1 C.5.2, C.5.3; RFC 1982 serial arithmetic). A MoQ group id is a
6
+ * 62-bit unsigned integer that must never go backwards, so the repair group
7
+ * of an `iso-ssbg1-v1` block is the wrap-epoch-extended SS_Start:
8
+ *
9
+ * ext(SS_Start) = (wrap_epoch << 32) | SS_Start
10
+ *
11
+ * Repair group ids are therefore sparse (one per block, at the block's first
12
+ * SS_ID) and strictly increasing. A receiver that lost SS_ID x in a block it
13
+ * has not delimited FETCHes the absolute group range of draft-ramadan-moq-fec
14
+ * §7.5 (`repairFetchRange`); the last group that range returns is the block
15
+ * containing x.
16
+ *
17
+ * A receiver establishes its wrap-epoch reference from the Group ID of a
18
+ * repair object it received over MoQ, from the Largest Location a
19
+ * TRACK_STATUS for a repair track reports, or as epoch 0 when it observed the
20
+ * instance from its first block (draft-ramadan-moq-fec §7.5). The first two
21
+ * take the epoch from a Group ID itself (`groupId >> 32`): the publisher
22
+ * assigns repair Group IDs and MoQ delivers them unaltered, so a delivered
23
+ * Group ID is the epoch reference, on the same footing as the Largest
24
+ * Location, not a candidate for this module to verify. Nothing a receiver
25
+ * holds before its first reference can check an epoch: without one,
26
+ * `repairGroupIdMatches` checks only the low 32 bits, and its `true` means
27
+ * "this object can be this block's", never "this epoch is verified". It
28
+ * screens out an object to discard; it does not confirm an epoch. No other
29
+ * value is an epoch reference: not a group id computed from a 32-bit SS_ID,
30
+ * and not one carried in a payload rather than as an object's MoQ Group ID.
31
+ *
32
+ * All values are bigint: 62-bit group ids exceed Number's 2^53 exact range.
33
+ */
34
+ import { SERIAL32_HALF, SERIAL32_SPAN, serial32Distance } from "@blockcast/mmt-base";
35
+
36
+ /** Bits of a MoQ group id above the 32-bit SS_Start: 62 - 32. */
37
+ const WRAP_EPOCH_BITS = 30n;
38
+ /** 2^32 as a bigint: the SS_ID wrap and the shift of the wrap epoch. */
39
+ const SS_ID_SPAN = BigInt(SERIAL32_SPAN);
40
+ /** Exclusive bound of the wrap epoch: 2^30. */
41
+ const WRAP_EPOCH_SPAN = 1n << WRAP_EPOCH_BITS;
42
+ /** Exclusive bound of a MoQ group id: 2^62. */
43
+ const MOQ_GROUP_ID_SPAN = WRAP_EPOCH_SPAN * SS_ID_SPAN;
44
+
45
+ function assertSsId(value: number, name: string): void {
46
+ if (!Number.isInteger(value) || value < 0 || value >= SERIAL32_SPAN) {
47
+ throw new RangeError(`${name} must be a uint32 SS_ID (got ${value})`);
48
+ }
49
+ }
50
+
51
+ function assertGroupId(value: bigint, name: string): void {
52
+ if (typeof value !== "bigint" || value < 0n || value >= MOQ_GROUP_ID_SPAN) {
53
+ throw new RangeError(`${name} must be a 62-bit MoQ group id in [0, 2^62) (got ${String(value)})`);
54
+ }
55
+ }
56
+
57
+ /**
58
+ * The MoQ repair group id of an `iso-ssbg1-v1` block: `(wrapEpoch << 32) | ssStart`.
59
+ *
60
+ * @param wrapEpoch - How many times SS_ID has wrapped before this block, in `[0, 2^30)`
61
+ * @param ssStart - The block's SS_Start (uint32) from its Repair FEC Payload ID
62
+ * @returns The 62-bit repair group id
63
+ * @throws RangeError unless `ssStart` is a uint32 and `wrapEpoch` a bigint in `[0, 2^30)`
64
+ */
65
+ export function extSsStart(wrapEpoch: bigint, ssStart: number): bigint {
66
+ if (typeof wrapEpoch !== "bigint" || wrapEpoch < 0n || wrapEpoch >= WRAP_EPOCH_SPAN) {
67
+ throw new RangeError(`wrap epoch must be a bigint in [0, 2^30) (got ${String(wrapEpoch)})`);
68
+ }
69
+ assertSsId(ssStart, "ssStart");
70
+ return (wrapEpoch << 32n) | BigInt(ssStart);
71
+ }
72
+
73
+ /**
74
+ * Extend a 32-bit SS_ID to the 62-bit value congruent to it mod 2^32 that is
75
+ * nearest `reference` in RFC 1982 serial order: forward when `ssId` follows
76
+ * the reference's low 32 bits serially, backward when it precedes them, and
77
+ * `reference` itself when they are equal.
78
+ *
79
+ * @param reference - A 62-bit extended SS_ID or repair group id the receiver already holds
80
+ * @param ssId - The 32-bit SS_ID (or SS_Start) to extend
81
+ * @returns The extended 62-bit value
82
+ * @throws RangeError when `ssId` lies exactly 2^31 from the reference's low
83
+ * 32 bits (RFC 1982 leaves that pair unordered, so no direction exists), or
84
+ * when the extension falls outside `[0, 2^62)`
85
+ */
86
+ export function extendSsId(reference: bigint, ssId: number): bigint {
87
+ assertGroupId(reference, "reference");
88
+ assertSsId(ssId, "ssId");
89
+ const low = Number(reference & (SS_ID_SPAN - 1n));
90
+ const forward = serial32Distance(low, ssId);
91
+ if (forward === SERIAL32_HALF) {
92
+ throw new RangeError(
93
+ `SS_ID ${ssId} is exactly 2^31 from ${low}; RFC 1982 leaves the pair unordered`,
94
+ );
95
+ }
96
+ const extended = forward < SERIAL32_HALF
97
+ ? reference + BigInt(forward)
98
+ : reference - BigInt(SERIAL32_SPAN - forward);
99
+ if (extended < 0n || extended >= MOQ_GROUP_ID_SPAN) {
100
+ throw new RangeError(
101
+ `SS_ID ${ssId} extends from ${String(reference)} to ${String(extended)}, outside [0, 2^62)`,
102
+ );
103
+ }
104
+ return extended;
105
+ }
106
+
107
+ /** An absolute, inclusive MoQ group range for a repair FETCH. */
108
+ export interface RepairFetchRange {
109
+ /** First group of the FETCH. */
110
+ readonly startGroup: bigint;
111
+ /** Last group of the FETCH: the extended lost SS_ID. */
112
+ readonly endGroup: bigint;
113
+ }
114
+
115
+ /** What a lost SS_ID is extended from (draft-ramadan-moq-fec §7.5). */
116
+ export type RepairFetchAnchor =
117
+ /** ext(S_prev): the extended SS_Start of the last block the receiver
118
+ * delimited that ends before the lost SS_ID. The caller vouches for that
119
+ * ordering; only a lost SS_ID at or before the block's start is
120
+ * detectable here, since the block's length is not an input. */
121
+ | { readonly previousBlockStart: bigint }
122
+ /** The reference value r of the receiver's wrap epoch, when it has
123
+ * delimited no block that ends before the lost SS_ID. */
124
+ | { readonly reference: bigint };
125
+
126
+ /**
127
+ * The repair FETCH for a lost SS_ID x whose block the receiver has not
128
+ * delimited (draft-ramadan-moq-fec §7.5): the absolute, inclusive group range
129
+ *
130
+ * [max(ext(S_prev) + 1, ext(x) - (K - 1)), ext(x)]
131
+ *
132
+ * or, with no S_prev, `[max(ext(x) - (K - 1), 0), ext(x)]`, where ext(x) is x
133
+ * extended relative to ext(S_prev), or else to the epoch reference r. Repair
134
+ * group ids sit at block starts and no block holds more than K source symbols,
135
+ * so the block containing x starts at most K - 1 SS_IDs before x and is the
136
+ * last group the range returns. The range is never empty.
137
+ *
138
+ * @param lostSsId - The lost 32-bit SS_ID x
139
+ * @param kMax - K: the instance's catalog `sourceSymbols`, the largest
140
+ * SSB_length a block can have
141
+ * @param anchor - ext(S_prev), or the epoch reference r without one
142
+ * @throws RangeError when `kMax` is not a positive safe integer, when x does
143
+ * not extend past `previousBlockStart`, or whenever {@link extendSsId} throws
144
+ */
145
+ export function repairFetchRange(lostSsId: number, kMax: number, anchor: RepairFetchAnchor): RepairFetchRange {
146
+ if (!Number.isSafeInteger(kMax) || kMax <= 0) {
147
+ throw new RangeError(`kMax must be a positive integer (got ${kMax})`);
148
+ }
149
+ let floor: bigint;
150
+ let endGroup: bigint;
151
+ if ("previousBlockStart" in anchor) {
152
+ assertGroupId(anchor.previousBlockStart, "previousBlockStart");
153
+ floor = anchor.previousBlockStart + 1n;
154
+ endGroup = extendSsId(anchor.previousBlockStart, lostSsId);
155
+ if (endGroup < floor) {
156
+ throw new RangeError(
157
+ `lost SS_ID ${lostSsId} extends to ${String(endGroup)}, not after the previous block at ${String(anchor.previousBlockStart)}`,
158
+ );
159
+ }
160
+ } else {
161
+ floor = 0n;
162
+ endGroup = extendSsId(anchor.reference, lostSsId);
163
+ }
164
+ const reach = endGroup - BigInt(kMax - 1);
165
+ return { startGroup: reach > floor ? reach : floor, endGroup };
166
+ }
167
+
168
+ /**
169
+ * Whether a repair object received over MoQ may be used: its Group ID must
170
+ * agree with the SS_Start of its Repair FEC Payload ID, which is authoritative
171
+ * (draft-ramadan-moq-fec §7.5). The Group ID must equal SS_Start modulo 2^32
172
+ * and, once the receiver holds an epoch reference, equal ext(SS_Start)
173
+ * extended relative to it. A receiver discards a repair object for which this
174
+ * is false, leaving every block's state unchanged, and never takes its Group
175
+ * ID as an epoch reference. An SS_Start that cannot be extended (exactly 2^31
176
+ * from the reference) cannot be checked, so it does not match either.
177
+ *
178
+ * @param groupId - The repair object's MoQ Group ID
179
+ * @param ssStart - The SS_Start of its Repair FEC Payload ID
180
+ * @param reference - The receiver's epoch reference r, once it holds one
181
+ * @throws RangeError unless `ssStart` is a uint32 or `reference` (when given)
182
+ * a 62-bit group id
183
+ */
184
+ export function repairGroupIdMatches(groupId: bigint, ssStart: number, reference?: bigint): boolean {
185
+ assertSsId(ssStart, "ssStart");
186
+ if (reference !== undefined) assertGroupId(reference, "reference");
187
+ if (typeof groupId !== "bigint" || groupId < 0n || groupId >= MOQ_GROUP_ID_SPAN) return false;
188
+ if ((groupId & (SS_ID_SPAN - 1n)) !== BigInt(ssStart)) return false;
189
+ if (reference === undefined) return true;
190
+ try {
191
+ return extendSsId(reference, ssStart) === groupId;
192
+ } catch {
193
+ return false;
194
+ }
195
+ }
@@ -0,0 +1,28 @@
1
+ import { type SourceAuthGroupClose, type SourceAuthObjectEntry } from './source-auth.js';
2
+ export type SourceAuthAdmissionState = 'pending-entry' | 'pending-object' | 'provisional' | 'authenticated';
3
+ export interface SourceAuthObjectAdmission {
4
+ groupId: bigint;
5
+ objectId: number;
6
+ recovered: boolean;
7
+ state: Exclude<SourceAuthAdmissionState, 'pending-object'>;
8
+ }
9
+ /**
10
+ * Bounded media/manifest rendezvous for the browser player receive path.
11
+ * Object digest admission is synchronous; only the group-close signature is deferred.
12
+ */
13
+ export declare class SourceAuthAdmission {
14
+ #private;
15
+ constructor(options: {
16
+ manifestAuthenticated: boolean;
17
+ });
18
+ admitObject(input: {
19
+ groupId: bigint;
20
+ objectId: number;
21
+ bytes: Uint8Array;
22
+ recovered?: boolean;
23
+ }): SourceAuthObjectAdmission;
24
+ admitEntry(entry: SourceAuthObjectEntry): SourceAuthObjectAdmission | SourceAuthAdmissionState;
25
+ objectState(objectId: number): SourceAuthAdmissionState | undefined;
26
+ verifyClose(close: SourceAuthGroupClose, authScope: Uint8Array, publicKey: CryptoKey, subtle?: SubtleCrypto): Promise<void>;
27
+ }
28
+ //# sourceMappingURL=admission.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admission.d.ts","sourceRoot":"","sources":["../src/admission.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,wBAAwB,GAChC,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,eAAe,CAAA;AAEnB,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,OAAO,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,CAAA;CAC3D;AAkBD;;;GAGG;AACH,qBAAa,mBAAmB;;gBASlB,OAAO,EAAE;QAAE,qBAAqB,EAAE,OAAO,CAAA;KAAE;IAIvD,WAAW,CAAC,KAAK,EAAE;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,UAAU,CAAA;QACjB,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,GAAG,yBAAyB;IA0B7B,UAAU,CAAC,KAAK,EAAE,qBAAqB,GAAG,yBAAyB,GAAG,wBAAwB;IAmB9F,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS;IAO7D,WAAW,CACf,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,SAAS,EACpB,MAAM,GAAE,YAAuC,GAC9C,OAAO,CAAC,IAAI,CAAC;CAqDjB"}
@@ -0,0 +1,128 @@
1
+ import { sourceAuthMerkleRoot, sourceAuthObjectDigest, sourceAuthSignaturePreimage, trimRecoveredSourceAuthObject, } from './source-auth.js';
2
+ function requireU64(name, value) {
3
+ if (value < 0n || value > 0xffffffffffffffffn) {
4
+ throw new Error(`${name} must be an unsigned 64-bit integer`);
5
+ }
6
+ }
7
+ function equalBytes(left, right) {
8
+ if (left.byteLength !== right.byteLength)
9
+ return false;
10
+ return left.every((value, index) => value === right[index]);
11
+ }
12
+ /**
13
+ * Bounded media/manifest rendezvous for the browser player receive path.
14
+ * Object digest admission is synchronous; only the group-close signature is deferred.
15
+ */
16
+ export class SourceAuthAdmission {
17
+ #manifestAuthenticated;
18
+ #entries = new Map();
19
+ #pendingObjects = new Map();
20
+ #entriesAwaitingObjects = new Set();
21
+ #admissions = new Map();
22
+ #groupId = null;
23
+ #closed = false;
24
+ constructor(options) {
25
+ this.#manifestAuthenticated = options.manifestAuthenticated;
26
+ }
27
+ admitObject(input) {
28
+ this.#requireGroup(input.groupId);
29
+ if (this.#closed)
30
+ throw new Error('source-auth group is already closed');
31
+ if (this.#admissions.has(input.objectId) || this.#pendingObjects.has(input.objectId)) {
32
+ throw new Error(`duplicate source-auth object ${input.objectId}`);
33
+ }
34
+ const entry = this.#entries.get(input.objectId);
35
+ if (entry) {
36
+ this.#entriesAwaitingObjects.delete(input.objectId);
37
+ return this.#verifyObject(entry, input.bytes, input.recovered ?? false);
38
+ }
39
+ if (this.#pendingObjects.size >= 1) {
40
+ throw new Error('source-auth media exceeds one-object manifest skew');
41
+ }
42
+ this.#pendingObjects.set(input.objectId, {
43
+ bytes: input.bytes,
44
+ recovered: input.recovered ?? false,
45
+ });
46
+ return {
47
+ groupId: input.groupId,
48
+ objectId: input.objectId,
49
+ recovered: input.recovered ?? false,
50
+ state: 'pending-entry',
51
+ };
52
+ }
53
+ admitEntry(entry) {
54
+ this.#requireGroup(entry.groupId);
55
+ if (this.#closed)
56
+ throw new Error('source-auth group is already closed');
57
+ if (this.#entries.has(entry.objectId)) {
58
+ throw new Error(`duplicate source-auth manifest entry ${entry.objectId}`);
59
+ }
60
+ const pending = this.#pendingObjects.get(entry.objectId);
61
+ if (!pending && this.#entriesAwaitingObjects.size >= 1) {
62
+ throw new Error('source-auth manifest exceeds one-object media skew');
63
+ }
64
+ this.#entries.set(entry.objectId, entry);
65
+ if (!pending) {
66
+ this.#entriesAwaitingObjects.add(entry.objectId);
67
+ return 'pending-object';
68
+ }
69
+ this.#pendingObjects.delete(entry.objectId);
70
+ return this.#verifyObject(entry, pending.bytes, pending.recovered);
71
+ }
72
+ objectState(objectId) {
73
+ if (this.#pendingObjects.has(objectId))
74
+ return 'pending-entry';
75
+ if (this.#entriesAwaitingObjects.has(objectId))
76
+ return 'pending-object';
77
+ if (this.#closed && this.#admissions.has(objectId))
78
+ return 'authenticated';
79
+ return this.#admissions.get(objectId)?.state;
80
+ }
81
+ async verifyClose(close, authScope, publicKey, subtle = globalThis.crypto.subtle) {
82
+ this.#requireGroup(close.groupId);
83
+ if (this.#closed)
84
+ throw new Error('source-auth group is already closed');
85
+ if (this.#pendingObjects.size !== 0 || this.#entriesAwaitingObjects.size !== 0) {
86
+ throw new Error('source-auth group closed with unmatched objects or entries');
87
+ }
88
+ if (close.objectCount !== this.#entries.size || this.#admissions.size !== this.#entries.size) {
89
+ throw new Error('source-auth group close object count mismatch');
90
+ }
91
+ const root = sourceAuthMerkleRoot([...this.#entries.values()]);
92
+ if (!equalBytes(root, close.root))
93
+ throw new Error('source-auth group root mismatch');
94
+ const verified = await subtle.verify('Ed25519', publicKey, new Uint8Array(close.signature).buffer, new Uint8Array(sourceAuthSignaturePreimage(authScope, close.groupId, close.objectCount, root)).buffer);
95
+ if (!verified)
96
+ throw new Error('source-auth group close signature failed');
97
+ for (const admission of this.#admissions.values())
98
+ admission.state = 'authenticated';
99
+ this.#closed = true;
100
+ }
101
+ #requireGroup(groupId) {
102
+ requireU64('groupId', groupId);
103
+ if (this.#groupId === null)
104
+ this.#groupId = groupId;
105
+ else if (this.#groupId !== groupId)
106
+ throw new Error('source-auth group identity mismatch');
107
+ }
108
+ #verifyObject(entry, bytes, recovered) {
109
+ const authenticated = recovered
110
+ ? trimRecoveredSourceAuthObject(bytes, entry.trueLength)
111
+ : bytes;
112
+ if (!recovered && bytes.byteLength !== entry.trueLength) {
113
+ throw new Error(`direct source-auth object length mismatch for ${entry.objectId}`);
114
+ }
115
+ if (!equalBytes(sourceAuthObjectDigest(authenticated), entry.digest)) {
116
+ throw new Error(`source-auth object digest mismatch for ${entry.objectId}`);
117
+ }
118
+ const admission = {
119
+ groupId: entry.groupId,
120
+ objectId: entry.objectId,
121
+ recovered,
122
+ state: this.#manifestAuthenticated ? 'authenticated' : 'provisional',
123
+ };
124
+ this.#admissions.set(entry.objectId, admission);
125
+ return admission;
126
+ }
127
+ }
128
+ //# sourceMappingURL=admission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admission.js","sourceRoot":"","sources":["../src/admission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,GAG9B,MAAM,kBAAkB,CAAA;AAoBzB,SAAS,UAAU,CAAC,IAAY,EAAE,KAAa;IAC7C,IAAI,KAAK,GAAG,EAAE,IAAI,KAAK,GAAG,mBAAsB,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,qCAAqC,CAAC,CAAA;IAC/D,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,IAAgB,EAAE,KAAiB;IACrD,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;QAAE,OAAO,KAAK,CAAA;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,m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AC,QAAQ,EAAE,CAAC,CAAA;QACpF,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YACrE,MAAM,IAAI,KAAK,CAAC,0CAA0C,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC7E,CAAC;QACD,MAAM,SAAS,GAA8B;YAC3C,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,SAAS;YACT,KAAK,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa;SACrE,CAAA;QACD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC/C,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
@@ -0,0 +1,4 @@
1
+ export * from './source-auth.js';
2
+ export * from './admission.js';
3
+ export * from './verifier.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './source-auth.js';
2
+ export * from './admission.js';
3
+ export * from './verifier.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,37 @@
1
+ export declare const SOURCE_AUTH_MANIFEST_VERSION = 1;
2
+ export declare const SOURCE_AUTH_OBJECT_ENTRY_FRAME = 1;
3
+ export declare const SOURCE_AUTH_GROUP_CLOSE_FRAME = 2;
4
+ export declare const SOURCE_AUTH_OBJECT_ENTRY_LENGTH = 52;
5
+ export declare const SOURCE_AUTH_GROUP_CLOSE_LENGTH = 112;
6
+ export declare const SOURCE_AUTH_MAX_OBJECTS_PER_GROUP = 4096;
7
+ export declare const SOURCE_AUTH_MAX_TRUE_LENGTH: number;
8
+ export declare const SOURCE_AUTH_SCOPE_LENGTH = 32;
9
+ export interface SourceAuthObjectEntry {
10
+ kind: 'object';
11
+ groupId: bigint;
12
+ objectId: number;
13
+ trueLength: number;
14
+ digest: Uint8Array;
15
+ }
16
+ export interface SourceAuthGroupClose {
17
+ kind: 'close';
18
+ groupId: bigint;
19
+ objectCount: number;
20
+ root: Uint8Array;
21
+ signature: Uint8Array;
22
+ }
23
+ export type SourceAuthManifestFrame = SourceAuthObjectEntry | SourceAuthGroupClose;
24
+ export declare function sourceAuthObjectDigest(object: Uint8Array): Uint8Array;
25
+ export declare function sourceAuthLeafHash(groupId: bigint, objectId: number, digest: Uint8Array, trueLength: number): Uint8Array;
26
+ export declare function sourceAuthMerkleRoot(entries: readonly {
27
+ groupId: bigint;
28
+ objectId: number;
29
+ digest: Uint8Array;
30
+ trueLength: number;
31
+ }[]): Uint8Array;
32
+ export declare function trimRecoveredSourceAuthObject(recoveredSymbol: Uint8Array, trueLength: number): Uint8Array;
33
+ export declare function encodeSourceAuthObjectEntry(entry: Omit<SourceAuthObjectEntry, 'kind'>): Uint8Array;
34
+ export declare function encodeSourceAuthGroupClose(close: Omit<SourceAuthGroupClose, 'kind'>): Uint8Array;
35
+ export declare function sourceAuthSignaturePreimage(authScope: Uint8Array, groupId: bigint, objectCount: number, root: Uint8Array): Uint8Array;
36
+ export declare function decodeSourceAuthManifestFrame(frame: Uint8Array): SourceAuthManifestFrame;
37
+ //# sourceMappingURL=source-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-auth.d.ts","sourceRoot":"","sources":["../src/source-auth.ts"],"names":[],"mappings":"AAEA,eAAO,MA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AA2B,CACzC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,GACzC,UAAU,CAcZ;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,GACxC,UAAU,CAiBZ;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,UAAU,GACf,UAAU,CAgBZ;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,UAAU,GAAG,uBAAuB,CAwCxF"}
@@ -0,0 +1,179 @@
1
+ import { blake3 } from '@noble/hashes/blake3';
2
+ export const SOURCE_AUTH_MANIFEST_VERSION = 1;
3
+ export const SOURCE_AUTH_OBJECT_ENTRY_FRAME = 1;
4
+ export const SOURCE_AUTH_GROUP_CLOSE_FRAME = 2;
5
+ export const SOURCE_AUTH_OBJECT_ENTRY_LENGTH = 52;
6
+ export const SOURCE_AUTH_GROUP_CLOSE_LENGTH = 112;
7
+ export const SOURCE_AUTH_MAX_OBJECTS_PER_GROUP = 4096;
8
+ export const SOURCE_AUTH_MAX_TRUE_LENGTH = 16 * 1024 * 1024;
9
+ export const SOURCE_AUTH_SCOPE_LENGTH = 32;
10
+ const SIGNATURE_DOMAIN = new TextEncoder().encode('blockcast-mmt-root-v1\0\0\0');
11
+ function requireBytes(name, value, length) {
12
+ if (value.byteLength !== length) {
13
+ throw new Error(`${name} must be ${length} bytes, got ${value.byteLength}`);
14
+ }
15
+ }
16
+ function requireU32(name, value) {
17
+ if (!Number.isInteger(value) || value < 0 || value > 0xffff_ffff) {
18
+ throw new Error(`${name} must be an unsigned 32-bit integer`);
19
+ }
20
+ }
21
+ function requireU64(name, value) {
22
+ if (value < 0n || value > 0xffffffffffffffffn) {
23
+ throw new Error(`${name} must be an unsigned 64-bit integer`);
24
+ }
25
+ }
26
+ function requireTrueLength(value) {
27
+ requireU32('trueLength', value);
28
+ if (value > SOURCE_AUTH_MAX_TRUE_LENGTH) {
29
+ throw new Error(`trueLength exceeds the ${SOURCE_AUTH_MAX_TRUE_LENGTH}-byte profile maximum`);
30
+ }
31
+ }
32
+ export function sourceAuthObjectDigest(object) {
33
+ return blake3(object);
34
+ }
35
+ export function sourceAuthLeafHash(groupId, objectId, digest, trueLength) {
36
+ requireU64('groupId', groupId);
37
+ requireU32('objectId', objectId);
38
+ requireBytes('digest', digest, 32);
39
+ requireTrueLength(trueLength);
40
+ const preimage = new Uint8Array(49);
41
+ const view = new DataView(preimage.buffer);
42
+ view.setBigUint64(1, groupId);
43
+ view.setUint32(9, objectId);
44
+ preimage.set(digest, 13);
45
+ view.setUint32(45, trueLength);
46
+ return blake3(preimage);
47
+ }
48
+ export function sourceAuthMerkleRoot(entries) {
49
+ if (entries.length === 0)
50
+ throw new Error('Merkle tree requires at least one object');
51
+ if (entries.length > SOURCE_AUTH_MAX_OBJECTS_PER_GROUP) {
52
+ throw new Error(`group exceeds ${SOURCE_AUTH_MAX_OBJECTS_PER_GROUP} objects`);
53
+ }
54
+ const groupId = entries[0].groupId;
55
+ const objectIds = new Set();
56
+ const ordered = [...entries].sort((left, right) => left.objectId - right.objectId);
57
+ let level = ordered.map((entry) => {
58
+ if (entry.groupId !== groupId)
59
+ throw new Error('Merkle entries must belong to one group');
60
+ if (objectIds.has(entry.objectId))
61
+ throw new Error(`duplicate objectId ${entry.objectId}`);
62
+ objectIds.add(entry.objectId);
63
+ return sourceAuthLeafHash(entry.groupId, entry.objectId, entry.digest, entry.trueLength);
64
+ });
65
+ while (level.length > 1) {
66
+ const parents = [];
67
+ for (let index = 0; index < level.length; index += 2) {
68
+ const left = level[index];
69
+ const right = level[index + 1] ?? left;
70
+ const preimage = new Uint8Array(65);
71
+ preimage[0] = 1;
72
+ preimage.set(left, 1);
73
+ preimage.set(right, 33);
74
+ parents.push(blake3(preimage));
75
+ }
76
+ level = parents;
77
+ }
78
+ return level[0];
79
+ }
80
+ export function trimRecoveredSourceAuthObject(recoveredSymbol, trueLength) {
81
+ requireTrueLength(trueLength);
82
+ if (trueLength > recoveredSymbol.byteLength) {
83
+ throw new Error(`true length ${trueLength} exceeds recovered object size ${recoveredSymbol.byteLength}`);
84
+ }
85
+ return recoveredSymbol.subarray(0, trueLength);
86
+ }
87
+ export function encodeSourceAuthObjectEntry(entry) {
88
+ requireU32('objectId', entry.objectId);
89
+ requireTrueLength(entry.trueLength);
90
+ requireU64('groupId', entry.groupId);
91
+ requireBytes('digest', entry.digest, 32);
92
+ const frame = new Uint8Array(SOURCE_AUTH_OBJECT_ENTRY_LENGTH);
93
+ const view = new DataView(frame.buffer);
94
+ frame[0] = SOURCE_AUTH_OBJECT_ENTRY_FRAME;
95
+ frame[1] = SOURCE_AUTH_MANIFEST_VERSION;
96
+ view.setBigUint64(4, entry.groupId);
97
+ view.setUint32(12, entry.objectId);
98
+ view.setUint32(16, entry.trueLength);
99
+ frame.set(entry.digest, 20);
100
+ return frame;
101
+ }
102
+ export function encodeSourceAuthGroupClose(close) {
103
+ requireU32('objectCount', close.objectCount);
104
+ if (close.objectCount === 0 || close.objectCount > SOURCE_AUTH_MAX_OBJECTS_PER_GROUP) {
105
+ throw new Error(`objectCount must be between 1 and ${SOURCE_AUTH_MAX_OBJECTS_PER_GROUP}`);
106
+ }
107
+ requireU64('groupId', close.groupId);
108
+ requireBytes('root', close.root, 32);
109
+ requireBytes('signature', close.signature, 64);
110
+ const frame = new Uint8Array(SOURCE_AUTH_GROUP_CLOSE_LENGTH);
111
+ const view = new DataView(frame.buffer);
112
+ frame[0] = SOURCE_AUTH_GROUP_CLOSE_FRAME;
113
+ frame[1] = SOURCE_AUTH_MANIFEST_VERSION;
114
+ view.setBigUint64(4, close.groupId);
115
+ view.setUint32(12, close.objectCount);
116
+ frame.set(close.root, 16);
117
+ frame.set(close.signature, 48);
118
+ return frame;
119
+ }
120
+ export function sourceAuthSignaturePreimage(authScope, groupId, objectCount, root) {
121
+ requireU32('objectCount', objectCount);
122
+ if (objectCount === 0 || objectCount > SOURCE_AUTH_MAX_OBJECTS_PER_GROUP) {
123
+ throw new Error(`objectCount must be between 1 and ${SOURCE_AUTH_MAX_OBJECTS_PER_GROUP}`);
124
+ }
125
+ requireU64('groupId', groupId);
126
+ requireBytes('authScope', authScope, SOURCE_AUTH_SCOPE_LENGTH);
127
+ requireBytes('root', root, 32);
128
+ const preimage = new Uint8Array(100);
129
+ const view = new DataView(preimage.buffer);
130
+ preimage.set(SIGNATURE_DOMAIN);
131
+ preimage.set(authScope, 24);
132
+ view.setBigUint64(56, groupId);
133
+ view.setUint32(64, objectCount);
134
+ preimage.set(root, 68);
135
+ return preimage;
136
+ }
137
+ export function decodeSourceAuthManifestFrame(frame) {
138
+ const frameType = frame[0];
139
+ const expectedLength = frameType === SOURCE_AUTH_OBJECT_ENTRY_FRAME
140
+ ? SOURCE_AUTH_OBJECT_ENTRY_LENGTH
141
+ : frameType === SOURCE_AUTH_GROUP_CLOSE_FRAME
142
+ ? SOURCE_AUTH_GROUP_CLOSE_LENGTH
143
+ : 0;
144
+ if (expectedLength === 0)
145
+ throw new Error(`unsupported manifest frame type ${frameType}`);
146
+ if (frame.byteLength !== expectedLength) {
147
+ throw new Error(`manifest frame has invalid length ${frame.byteLength} for type ${frameType}`);
148
+ }
149
+ if (frame[1] !== SOURCE_AUTH_MANIFEST_VERSION) {
150
+ throw new Error(`unsupported manifest version ${frame[1]}`);
151
+ }
152
+ if (frame[2] !== 0 || frame[3] !== 0)
153
+ throw new Error('manifest reserved bits must be zero');
154
+ const view = new DataView(frame.buffer, frame.byteOffset, frame.byteLength);
155
+ const groupId = view.getBigUint64(4);
156
+ if (frameType === SOURCE_AUTH_OBJECT_ENTRY_FRAME) {
157
+ const entry = {
158
+ kind: 'object',
159
+ groupId,
160
+ objectId: view.getUint32(12),
161
+ trueLength: view.getUint32(16),
162
+ digest: frame.slice(20, 52),
163
+ };
164
+ requireTrueLength(entry.trueLength);
165
+ return entry;
166
+ }
167
+ const close = {
168
+ kind: 'close',
169
+ groupId,
170
+ objectCount: view.getUint32(12),
171
+ root: frame.slice(16, 48),
172
+ signature: frame.slice(48, 112),
173
+ };
174
+ if (close.objectCount === 0 || close.objectCount > SOURCE_AUTH_MAX_OBJECTS_PER_GROUP) {
175
+ throw new Error(`objectCount must be between 1 and ${SOURCE_AUTH_MAX_OBJECTS_PER_GROUP}`);
176
+ }
177
+ return close;
178
+ }
179
+ //# sourceMappingURL=source-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-auth.js","sourceRoot":"","sources":["../src/source-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAA;AAC7C,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAA;AAC/C,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,CAAA;AACjD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAA;AACjD,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAA;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAE1C,MAAM,gBAAgB,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAA;AAoBhF,SAAS,YAAY,CAAC,IAAY,EAAE,KAAiB,EAAE,MAAc;IACnE,IAAI,KAAK,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,YAAY,MAAM,eAAe,KAAK,CAAC,UAAU,EAAE,CAAC,CAAA;IAC7E,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,KAAa;I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