@blockcast/mmt-container 0.3.0 → 0.4.0-main.1cd3cdea89da

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 (605) hide show
  1. package/README.md +33 -16
  2. package/dist/browser-runtime.js +14814 -14255
  3. package/dist/browser-runtime.js.map +4 -4
  4. package/dist/carp-catalog.d.ts +24 -19
  5. package/dist/carp-catalog.d.ts.map +1 -1
  6. package/dist/carp-catalog.js +29 -14
  7. package/dist/carp-catalog.js.map +4 -4
  8. package/dist/catalog-fec-params.d.ts +88 -28
  9. package/dist/catalog-fec-params.d.ts.map +1 -1
  10. package/dist/catalog-fec-params.js +60 -23
  11. package/dist/catalog-fec-params.js.map +4 -4
  12. package/dist/catalog-network-source.js +1 -7
  13. package/dist/catalog-network-source.js.map +4 -4
  14. package/dist/cmaf-block-assembler.d.ts +0 -2
  15. package/dist/cmaf-block-assembler.d.ts.map +1 -1
  16. package/dist/cmaf-block-assembler.js +0 -1
  17. package/dist/cmaf-block-assembler.js.map +2 -2
  18. package/dist/cmcd-producer.d.ts.map +1 -1
  19. package/dist/cmcd-producer.js +0 -4
  20. package/dist/cmcd-producer.js.map +2 -2
  21. package/dist/delivery-catalog.d.ts +124 -0
  22. package/dist/delivery-catalog.d.ts.map +1 -0
  23. package/dist/delivery-catalog.js +1857 -0
  24. package/dist/delivery-catalog.js.map +7 -0
  25. package/dist/delta-fallback-config.d.ts +42 -0
  26. package/dist/delta-fallback-config.d.ts.map +1 -0
  27. package/dist/delta-fallback-config.js +59 -0
  28. package/dist/delta-fallback-config.js.map +7 -0
  29. package/dist/fec-manager.d.ts +52 -30
  30. package/dist/fec-manager.d.ts.map +1 -1
  31. package/dist/fec-manager.js +338 -293
  32. package/dist/fec-manager.js.map +4 -4
  33. package/dist/fec-state.d.ts +19 -31
  34. package/dist/fec-state.d.ts.map +1 -1
  35. package/dist/fec-state.js +4 -10
  36. package/dist/fec-state.js.map +4 -4
  37. package/dist/fec-worker-setup.d.ts +18 -14
  38. package/dist/fec-worker-setup.d.ts.map +1 -1
  39. package/dist/fec-worker-setup.js +81 -96
  40. package/dist/fec-worker-setup.js.map +4 -4
  41. package/dist/index.d.ts +5 -3
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +16 -0
  44. package/dist/index.js.map +2 -2
  45. package/dist/iso-block-locator.js +1 -7
  46. package/dist/iso-block-locator.js.map +4 -4
  47. package/dist/media-router.d.ts +20 -8
  48. package/dist/media-router.d.ts.map +1 -1
  49. package/dist/media-router.js +46 -21
  50. package/dist/media-router.js.map +2 -2
  51. package/dist/mfu-reassembler.js +24 -30
  52. package/dist/mfu-reassembler.js.map +4 -4
  53. package/dist/mmtp-container-parser.d.ts +14 -11
  54. package/dist/mmtp-container-parser.d.ts.map +1 -1
  55. package/dist/mmtp-container-parser.js +126 -99
  56. package/dist/mmtp-container-parser.js.map +4 -4
  57. package/dist/mmtp-container-parser.no-modules.js +151 -108
  58. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  59. package/dist/mmtp-decode-pipeline.js +126 -99
  60. package/dist/mmtp-decode-pipeline.js.map +4 -4
  61. package/dist/mmtp-router.d.ts +51 -29
  62. package/dist/mmtp-router.d.ts.map +1 -1
  63. package/dist/mmtp-router.js +260 -326
  64. package/dist/mmtp-router.js.map +4 -4
  65. package/dist/multicast-input.js +1 -7
  66. package/dist/multicast-input.js.map +4 -4
  67. package/dist/multicast-manager.d.ts +72 -6
  68. package/dist/multicast-manager.d.ts.map +1 -1
  69. package/dist/multicast-manager.js +882 -673
  70. package/dist/multicast-manager.js.map +4 -4
  71. package/dist/multicast-transport.d.ts +1 -1
  72. package/dist/multicast-transport.d.ts.map +1 -1
  73. package/dist/multicast-transport.js +44 -26
  74. package/dist/multicast-transport.js.map +4 -4
  75. package/dist/multicast-unwrap.js +29 -35
  76. package/dist/multicast-unwrap.js.map +4 -4
  77. package/dist/no-modules.js +147 -106
  78. package/dist/no-modules.js.map +4 -4
  79. package/dist/repair-fetch.d.ts +116 -21
  80. package/dist/repair-fetch.d.ts.map +1 -1
  81. package/dist/repair-fetch.js +114 -34
  82. package/dist/repair-fetch.js.map +4 -4
  83. package/dist/repair-layers.d.ts +18 -7
  84. package/dist/repair-layers.d.ts.map +1 -1
  85. package/dist/repair-layers.js +12 -10
  86. package/dist/repair-layers.js.map +4 -4
  87. package/dist/signaling.js +2 -11
  88. package/dist/signaling.js.map +4 -4
  89. package/dist/timestamp-codec.js +24 -30
  90. package/dist/timestamp-codec.js.map +4 -4
  91. package/dist/track-session.d.ts +7 -0
  92. package/dist/track-session.d.ts.map +1 -1
  93. package/dist/track-session.js +15 -8
  94. package/dist/track-session.js.map +2 -2
  95. package/dist/wasm-mfu-reassembler.js +1 -7
  96. package/dist/wasm-mfu-reassembler.js.map +4 -4
  97. package/dist/wasm-mmtp-container-parser.js +126 -99
  98. package/dist/wasm-mmtp-container-parser.js.map +4 -4
  99. package/package.json +7 -14
  100. package/schemas/catalog.schema.json +3 -3
  101. package/src/carp-catalog.ts +46 -24
  102. package/src/catalog-fec-params.ts +173 -64
  103. package/src/cmaf-block-assembler.ts +1 -4
  104. package/src/cmcd-producer.ts +0 -6
  105. package/src/delivery-catalog.ts +498 -0
  106. package/src/delta-fallback-config.ts +72 -0
  107. package/src/fec-manager.ts +457 -334
  108. package/src/fec-state.ts +20 -32
  109. package/src/fec-worker-setup.ts +109 -90
  110. package/src/index.ts +32 -0
  111. package/src/media-router.ts +59 -21
  112. package/src/mmtp-container-parser.ts +106 -20
  113. package/src/mmtp-router.ts +189 -330
  114. package/src/multicast-manager.ts +265 -86
  115. package/src/multicast-transport.ts +16 -9
  116. package/src/repair-fetch.ts +273 -43
  117. package/src/repair-layers.ts +28 -8
  118. package/src/track-session.ts +28 -9
  119. package/test-vectors/catalog/README.md +37 -17
  120. package/test-vectors/catalog/negative/fec-block-profile-retired.json +52 -0
  121. package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +1 -1
  122. package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +1 -1
  123. package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +1 -1
  124. package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +1 -1
  125. package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +1 -1
  126. package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +1 -1
  127. package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +1 -1
  128. package/test-vectors/catalog/negative/multicast-endpoint-relay-address.json +39 -0
  129. package/test-vectors/catalog/negative/multicast-network-source-empty.json +1 -1
  130. package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +1 -1
  131. package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +1 -1
  132. package/test-vectors/catalog/positive/fec-layered-repair.json +2 -2
  133. package/test-vectors/catalog/positive/fec-multicast.json +2 -1
  134. package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +38 -0
  135. package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +2 -1
  136. package/test-vectors/catalog-timing.json +356 -0
  137. package/test-vectors/catalog-validation.json +40 -5
  138. package/test-vectors/delivery-catalog/README.md +11 -0
  139. package/test-vectors/delivery-catalog/negative/missing-block-profile.json +58 -0
  140. package/test-vectors/delivery-catalog/negative/packet-id-signaling.json +59 -0
  141. package/test-vectors/delivery-catalog/negative/retired-k-padded-block-profile.json +59 -0
  142. package/test-vectors/delivery-catalog/positive/dash.json +56 -0
  143. package/test-vectors/delivery-catalog/positive/mmtp-source-only.json +43 -0
  144. package/node_modules/@blockcast/fec-worker/README.md +0 -223
  145. package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
  146. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +0 -38
  147. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +0 -1
  148. package/node_modules/@blockcast/fec-worker/dist/block-order.js +0 -78
  149. package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +0 -1
  150. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +0 -93
  151. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +0 -1
  152. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +0 -346
  153. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +0 -1
  154. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +0 -380
  155. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +0 -1
  156. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +0 -11
  157. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +0 -1
  158. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +0 -14
  159. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +0 -1
  160. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +0 -859
  161. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +0 -7
  162. package/node_modules/@blockcast/fec-worker/dist/index.d.ts +0 -10
  163. package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +0 -1
  164. package/node_modules/@blockcast/fec-worker/dist/index.js +0 -8
  165. package/node_modules/@blockcast/fec-worker/dist/index.js.map +0 -1
  166. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +0 -20
  167. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +0 -1
  168. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +0 -370
  169. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +0 -7
  170. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +0 -104
  171. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +0 -1
  172. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +0 -181
  173. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +0 -1
  174. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +0 -194
  175. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +0 -1
  176. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +0 -62
  177. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +0 -1
  178. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +0 -9
  179. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +0 -1
  180. package/node_modules/@blockcast/fec-worker/dist/transfer.js +0 -13
  181. package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +0 -1
  182. package/node_modules/@blockcast/fec-worker/package.json +0 -59
  183. package/node_modules/@blockcast/fec-worker/src/block-order.ts +0 -93
  184. package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +0 -392
  185. package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +0 -399
  186. package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +0 -1502
  187. package/node_modules/@blockcast/fec-worker/src/index.ts +0 -35
  188. package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +0 -589
  189. package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +0 -222
  190. package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +0 -209
  191. package/node_modules/@blockcast/fec-worker/src/transfer.ts +0 -12
  192. package/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
  193. package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  194. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
  195. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
  196. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
  197. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
  198. package/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
  199. package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
  200. package/node_modules/@blockcast/mmt-base/README.md +0 -134
  201. package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  202. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
  203. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
  204. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
  205. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
  206. package/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
  207. package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
  208. package/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
  209. package/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
  210. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
  211. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
  212. package/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
  213. package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
  214. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
  215. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
  216. package/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
  217. package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
  218. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
  219. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
  220. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
  221. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
  222. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
  223. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
  224. package/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
  225. package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
  226. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
  227. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
  228. package/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
  229. package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
  230. package/node_modules/@blockcast/mmt-base/package.json +0 -49
  231. package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
  232. package/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
  233. package/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
  234. package/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
  235. package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
  236. package/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
  237. package/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
  238. package/node_modules/@blockcast/mmt-fec/README.md +0 -271
  239. package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
  240. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +0 -82
  241. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +0 -1
  242. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +0 -296
  243. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +0 -1
  244. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +0 -106
  245. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +0 -1
  246. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +0 -288
  247. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +0 -1
  248. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +0 -46
  249. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +0 -1
  250. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +0 -96
  251. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +0 -1
  252. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +0 -33
  253. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +0 -1
  254. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +0 -57
  255. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +0 -1
  256. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +0 -205
  257. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +0 -1
  258. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +0 -240
  259. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +0 -1
  260. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +0 -28
  261. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +0 -1
  262. package/node_modules/@blockcast/mmt-fec/dist/index.js +0 -28
  263. package/node_modules/@blockcast/mmt-fec/dist/index.js.map +0 -1
  264. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +0 -20
  265. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +0 -1
  266. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +0 -28
  267. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +0 -1
  268. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +0 -258
  269. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +0 -1
  270. package/node_modules/@blockcast/mmt-fec/dist/oti.js +0 -382
  271. package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +0 -1
  272. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +0 -41
  273. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +0 -1
  274. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +0 -81
  275. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +0 -1
  276. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +0 -82
  277. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +0 -1
  278. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +0 -170
  279. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +0 -1
  280. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
  281. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  282. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
  283. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
  284. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
  285. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
  286. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
  287. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
  288. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +0 -134
  289. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  290. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
  291. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
  292. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
  293. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
  294. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
  295. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
  296. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
  297. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
  298. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
  299. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
  300. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
  301. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
  302. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
  303. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
  304. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
  305. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
  306. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
  307. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
  308. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
  309. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
  310. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
  311. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
  312. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
  313. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
  314. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
  315. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
  316. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
  317. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
  318. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +0 -49
  319. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
  320. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
  321. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
  322. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
  323. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
  324. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
  325. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
  326. package/node_modules/@blockcast/mmt-fec/package.json +0 -79
  327. package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +0 -371
  328. package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +0 -439
  329. package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +0 -127
  330. package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +0 -68
  331. package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +0 -310
  332. package/node_modules/@blockcast/mmt-fec/src/index.ts +0 -94
  333. package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +0 -34
  334. package/node_modules/@blockcast/mmt-fec/src/oti.ts +0 -463
  335. package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +0 -101
  336. package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +0 -195
  337. package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
  338. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +0 -28
  339. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +0 -1
  340. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +0 -128
  341. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +0 -1
  342. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +0 -4
  343. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +0 -1
  344. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +0 -4
  345. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +0 -1
  346. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +0 -37
  347. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +0 -1
  348. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +0 -179
  349. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +0 -1
  350. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +0 -99
  351. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +0 -1
  352. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +0 -492
  353. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +0 -1
  354. package/node_modules/@blockcast/mmt-manifest-verify/package.json +0 -45
  355. package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +0 -171
  356. package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +0 -3
  357. package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +0 -230
  358. package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +0 -669
  359. package/node_modules/@noble/hashes/LICENSE +0 -21
  360. package/node_modules/@noble/hashes/README.md +0 -521
  361. package/node_modules/@noble/hashes/_assert.d.ts +0 -17
  362. package/node_modules/@noble/hashes/_assert.d.ts.map +0 -1
  363. package/node_modules/@noble/hashes/_assert.js +0 -18
  364. package/node_modules/@noble/hashes/_assert.js.map +0 -1
  365. package/node_modules/@noble/hashes/_blake.d.ts +0 -14
  366. package/node_modules/@noble/hashes/_blake.d.ts.map +0 -1
  367. package/node_modules/@noble/hashes/_blake.js +0 -50
  368. package/node_modules/@noble/hashes/_blake.js.map +0 -1
  369. package/node_modules/@noble/hashes/_md.d.ts +0 -51
  370. package/node_modules/@noble/hashes/_md.d.ts.map +0 -1
  371. package/node_modules/@noble/hashes/_md.js +0 -162
  372. package/node_modules/@noble/hashes/_md.js.map +0 -1
  373. package/node_modules/@noble/hashes/_u64.d.ts +0 -55
  374. package/node_modules/@noble/hashes/_u64.d.ts.map +0 -1
  375. package/node_modules/@noble/hashes/_u64.js +0 -90
  376. package/node_modules/@noble/hashes/_u64.js.map +0 -1
  377. package/node_modules/@noble/hashes/argon2.d.ts +0 -32
  378. package/node_modules/@noble/hashes/argon2.d.ts.map +0 -1
  379. package/node_modules/@noble/hashes/argon2.js +0 -401
  380. package/node_modules/@noble/hashes/argon2.js.map +0 -1
  381. package/node_modules/@noble/hashes/blake1.d.ts +0 -106
  382. package/node_modules/@noble/hashes/blake1.d.ts.map +0 -1
  383. package/node_modules/@noble/hashes/blake1.js +0 -459
  384. package/node_modules/@noble/hashes/blake1.js.map +0 -1
  385. package/node_modules/@noble/hashes/blake2.d.ts +0 -116
  386. package/node_modules/@noble/hashes/blake2.d.ts.map +0 -1
  387. package/node_modules/@noble/hashes/blake2.js +0 -420
  388. package/node_modules/@noble/hashes/blake2.js.map +0 -1
  389. package/node_modules/@noble/hashes/blake2b.d.ts +0 -11
  390. package/node_modules/@noble/hashes/blake2b.d.ts.map +0 -1
  391. package/node_modules/@noble/hashes/blake2b.js +0 -14
  392. package/node_modules/@noble/hashes/blake2b.js.map +0 -1
  393. package/node_modules/@noble/hashes/blake2s.d.ts +0 -20
  394. package/node_modules/@noble/hashes/blake2s.d.ts.map +0 -1
  395. package/node_modules/@noble/hashes/blake2s.js +0 -24
  396. package/node_modules/@noble/hashes/blake2s.js.map +0 -1
  397. package/node_modules/@noble/hashes/blake3.d.ts +0 -54
  398. package/node_modules/@noble/hashes/blake3.d.ts.map +0 -1
  399. package/node_modules/@noble/hashes/blake3.js +0 -255
  400. package/node_modules/@noble/hashes/blake3.js.map +0 -1
  401. package/node_modules/@noble/hashes/crypto.d.ts +0 -2
  402. package/node_modules/@noble/hashes/crypto.d.ts.map +0 -1
  403. package/node_modules/@noble/hashes/crypto.js +0 -5
  404. package/node_modules/@noble/hashes/crypto.js.map +0 -1
  405. package/node_modules/@noble/hashes/cryptoNode.d.ts +0 -2
  406. package/node_modules/@noble/hashes/cryptoNode.d.ts.map +0 -1
  407. package/node_modules/@noble/hashes/cryptoNode.js +0 -18
  408. package/node_modules/@noble/hashes/cryptoNode.js.map +0 -1
  409. package/node_modules/@noble/hashes/eskdf.d.ts +0 -47
  410. package/node_modules/@noble/hashes/eskdf.d.ts.map +0 -1
  411. package/node_modules/@noble/hashes/eskdf.js +0 -166
  412. package/node_modules/@noble/hashes/eskdf.js.map +0 -1
  413. package/node_modules/@noble/hashes/esm/_assert.d.ts +0 -17
  414. package/node_modules/@noble/hashes/esm/_assert.d.ts.map +0 -1
  415. package/node_modules/@noble/hashes/esm/_assert.js +0 -15
  416. package/node_modules/@noble/hashes/esm/_assert.js.map +0 -1
  417. package/node_modules/@noble/hashes/esm/_blake.d.ts +0 -14
  418. package/node_modules/@noble/hashes/esm/_blake.d.ts.map +0 -1
  419. package/node_modules/@noble/hashes/esm/_blake.js +0 -45
  420. package/node_modules/@noble/hashes/esm/_blake.js.map +0 -1
  421. package/node_modules/@noble/hashes/esm/_md.d.ts +0 -51
  422. package/node_modules/@noble/hashes/esm/_md.d.ts.map +0 -1
  423. package/node_modules/@noble/hashes/esm/_md.js +0 -155
  424. package/node_modules/@noble/hashes/esm/_md.js.map +0 -1
  425. package/node_modules/@noble/hashes/esm/_u64.d.ts +0 -55
  426. package/node_modules/@noble/hashes/esm/_u64.d.ts.map +0 -1
  427. package/node_modules/@noble/hashes/esm/_u64.js +0 -67
  428. package/node_modules/@noble/hashes/esm/_u64.js.map +0 -1
  429. package/node_modules/@noble/hashes/esm/argon2.d.ts +0 -32
  430. package/node_modules/@noble/hashes/esm/argon2.d.ts.map +0 -1
  431. package/node_modules/@noble/hashes/esm/argon2.js +0 -392
  432. package/node_modules/@noble/hashes/esm/argon2.js.map +0 -1
  433. package/node_modules/@noble/hashes/esm/blake1.d.ts +0 -106
  434. package/node_modules/@noble/hashes/esm/blake1.d.ts.map +0 -1
  435. package/node_modules/@noble/hashes/esm/blake1.js +0 -452
  436. package/node_modules/@noble/hashes/esm/blake1.js.map +0 -1
  437. package/node_modules/@noble/hashes/esm/blake2.d.ts +0 -116
  438. package/node_modules/@noble/hashes/esm/blake2.d.ts.map +0 -1
  439. package/node_modules/@noble/hashes/esm/blake2.js +0 -413
  440. package/node_modules/@noble/hashes/esm/blake2.js.map +0 -1
  441. package/node_modules/@noble/hashes/esm/blake2b.d.ts +0 -11
  442. package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +0 -1
  443. package/node_modules/@noble/hashes/esm/blake2b.js +0 -11
  444. package/node_modules/@noble/hashes/esm/blake2b.js.map +0 -1
  445. package/node_modules/@noble/hashes/esm/blake2s.d.ts +0 -20
  446. package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +0 -1
  447. package/node_modules/@noble/hashes/esm/blake2s.js +0 -21
  448. package/node_modules/@noble/hashes/esm/blake2s.js.map +0 -1
  449. package/node_modules/@noble/hashes/esm/blake3.d.ts +0 -54
  450. package/node_modules/@noble/hashes/esm/blake3.d.ts.map +0 -1
  451. package/node_modules/@noble/hashes/esm/blake3.js +0 -251
  452. package/node_modules/@noble/hashes/esm/blake3.js.map +0 -1
  453. package/node_modules/@noble/hashes/esm/crypto.d.ts +0 -2
  454. package/node_modules/@noble/hashes/esm/crypto.d.ts.map +0 -1
  455. package/node_modules/@noble/hashes/esm/crypto.js +0 -2
  456. package/node_modules/@noble/hashes/esm/crypto.js.map +0 -1
  457. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +0 -2
  458. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +0 -1
  459. package/node_modules/@noble/hashes/esm/cryptoNode.js +0 -15
  460. package/node_modules/@noble/hashes/esm/cryptoNode.js.map +0 -1
  461. package/node_modules/@noble/hashes/esm/eskdf.d.ts +0 -47
  462. package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +0 -1
  463. package/node_modules/@noble/hashes/esm/eskdf.js +0 -160
  464. package/node_modules/@noble/hashes/esm/eskdf.js.map +0 -1
  465. package/node_modules/@noble/hashes/esm/hkdf.d.ts +0 -36
  466. package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +0 -1
  467. package/node_modules/@noble/hashes/esm/hkdf.js +0 -82
  468. package/node_modules/@noble/hashes/esm/hkdf.js.map +0 -1
  469. package/node_modules/@noble/hashes/esm/hmac.d.ts +0 -35
  470. package/node_modules/@noble/hashes/esm/hmac.d.ts.map +0 -1
  471. package/node_modules/@noble/hashes/esm/hmac.js +0 -86
  472. package/node_modules/@noble/hashes/esm/hmac.js.map +0 -1
  473. package/node_modules/@noble/hashes/esm/index.d.ts +0 -2
  474. package/node_modules/@noble/hashes/esm/index.d.ts.map +0 -1
  475. package/node_modules/@noble/hashes/esm/index.js +0 -33
  476. package/node_modules/@noble/hashes/esm/index.js.map +0 -1
  477. package/node_modules/@noble/hashes/esm/legacy.d.ts +0 -71
  478. package/node_modules/@noble/hashes/esm/legacy.d.ts.map +0 -1
  479. package/node_modules/@noble/hashes/esm/legacy.js +0 -281
  480. package/node_modules/@noble/hashes/esm/legacy.js.map +0 -1
  481. package/node_modules/@noble/hashes/esm/package.json +0 -10
  482. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +0 -23
  483. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +0 -1
  484. package/node_modules/@noble/hashes/esm/pbkdf2.js +0 -97
  485. package/node_modules/@noble/hashes/esm/pbkdf2.js.map +0 -1
  486. package/node_modules/@noble/hashes/esm/ripemd160.d.ts +0 -13
  487. package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +0 -1
  488. package/node_modules/@noble/hashes/esm/ripemd160.js +0 -13
  489. package/node_modules/@noble/hashes/esm/ripemd160.js.map +0 -1
  490. package/node_modules/@noble/hashes/esm/scrypt.d.ts +0 -34
  491. package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +0 -1
  492. package/node_modules/@noble/hashes/esm/scrypt.js +0 -228
  493. package/node_modules/@noble/hashes/esm/scrypt.js.map +0 -1
  494. package/node_modules/@noble/hashes/esm/sha1.d.ts +0 -11
  495. package/node_modules/@noble/hashes/esm/sha1.d.ts.map +0 -1
  496. package/node_modules/@noble/hashes/esm/sha1.js +0 -11
  497. package/node_modules/@noble/hashes/esm/sha1.js.map +0 -1
  498. package/node_modules/@noble/hashes/esm/sha2.d.ts +0 -159
  499. package/node_modules/@noble/hashes/esm/sha2.d.ts.map +0 -1
  500. package/node_modules/@noble/hashes/esm/sha2.js +0 -375
  501. package/node_modules/@noble/hashes/esm/sha2.js.map +0 -1
  502. package/node_modules/@noble/hashes/esm/sha256.d.ts +0 -20
  503. package/node_modules/@noble/hashes/esm/sha256.d.ts.map +0 -1
  504. package/node_modules/@noble/hashes/esm/sha256.js +0 -20
  505. package/node_modules/@noble/hashes/esm/sha256.js.map +0 -1
  506. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +0 -142
  507. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +0 -1
  508. package/node_modules/@noble/hashes/esm/sha3-addons.js +0 -393
  509. package/node_modules/@noble/hashes/esm/sha3-addons.js.map +0 -1
  510. package/node_modules/@noble/hashes/esm/sha3.d.ts +0 -53
  511. package/node_modules/@noble/hashes/esm/sha3.d.ts.map +0 -1
  512. package/node_modules/@noble/hashes/esm/sha3.js +0 -234
  513. package/node_modules/@noble/hashes/esm/sha3.js.map +0 -1
  514. package/node_modules/@noble/hashes/esm/sha512.d.ts +0 -26
  515. package/node_modules/@noble/hashes/esm/sha512.d.ts.map +0 -1
  516. package/node_modules/@noble/hashes/esm/sha512.js +0 -26
  517. package/node_modules/@noble/hashes/esm/sha512.js.map +0 -1
  518. package/node_modules/@noble/hashes/esm/utils.d.ts +0 -161
  519. package/node_modules/@noble/hashes/esm/utils.d.ts.map +0 -1
  520. package/node_modules/@noble/hashes/esm/utils.js +0 -281
  521. package/node_modules/@noble/hashes/esm/utils.js.map +0 -1
  522. package/node_modules/@noble/hashes/hkdf.d.ts +0 -36
  523. package/node_modules/@noble/hashes/hkdf.d.ts.map +0 -1
  524. package/node_modules/@noble/hashes/hkdf.js +0 -88
  525. package/node_modules/@noble/hashes/hkdf.js.map +0 -1
  526. package/node_modules/@noble/hashes/hmac.d.ts +0 -35
  527. package/node_modules/@noble/hashes/hmac.d.ts.map +0 -1
  528. package/node_modules/@noble/hashes/hmac.js +0 -91
  529. package/node_modules/@noble/hashes/hmac.js.map +0 -1
  530. package/node_modules/@noble/hashes/index.d.ts +0 -1
  531. package/node_modules/@noble/hashes/index.d.ts.map +0 -1
  532. package/node_modules/@noble/hashes/index.js +0 -33
  533. package/node_modules/@noble/hashes/index.js.map +0 -1
  534. package/node_modules/@noble/hashes/legacy.d.ts +0 -71
  535. package/node_modules/@noble/hashes/legacy.d.ts.map +0 -1
  536. package/node_modules/@noble/hashes/legacy.js +0 -287
  537. package/node_modules/@noble/hashes/legacy.js.map +0 -1
  538. package/node_modules/@noble/hashes/package.json +0 -266
  539. package/node_modules/@noble/hashes/pbkdf2.d.ts +0 -23
  540. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +0 -1
  541. package/node_modules/@noble/hashes/pbkdf2.js +0 -101
  542. package/node_modules/@noble/hashes/pbkdf2.js.map +0 -1
  543. package/node_modules/@noble/hashes/ripemd160.d.ts +0 -13
  544. package/node_modules/@noble/hashes/ripemd160.d.ts.map +0 -1
  545. package/node_modules/@noble/hashes/ripemd160.js +0 -16
  546. package/node_modules/@noble/hashes/ripemd160.js.map +0 -1
  547. package/node_modules/@noble/hashes/scrypt.d.ts +0 -34
  548. package/node_modules/@noble/hashes/scrypt.d.ts.map +0 -1
  549. package/node_modules/@noble/hashes/scrypt.js +0 -232
  550. package/node_modules/@noble/hashes/scrypt.js.map +0 -1
  551. package/node_modules/@noble/hashes/sha1.d.ts +0 -11
  552. package/node_modules/@noble/hashes/sha1.d.ts.map +0 -1
  553. package/node_modules/@noble/hashes/sha1.js +0 -14
  554. package/node_modules/@noble/hashes/sha1.js.map +0 -1
  555. package/node_modules/@noble/hashes/sha2.d.ts +0 -159
  556. package/node_modules/@noble/hashes/sha2.d.ts.map +0 -1
  557. package/node_modules/@noble/hashes/sha2.js +0 -384
  558. package/node_modules/@noble/hashes/sha2.js.map +0 -1
  559. package/node_modules/@noble/hashes/sha256.d.ts +0 -20
  560. package/node_modules/@noble/hashes/sha256.d.ts.map +0 -1
  561. package/node_modules/@noble/hashes/sha256.js +0 -23
  562. package/node_modules/@noble/hashes/sha256.js.map +0 -1
  563. package/node_modules/@noble/hashes/sha3-addons.d.ts +0 -142
  564. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +0 -1
  565. package/node_modules/@noble/hashes/sha3-addons.js +0 -402
  566. package/node_modules/@noble/hashes/sha3-addons.js.map +0 -1
  567. package/node_modules/@noble/hashes/sha3.d.ts +0 -53
  568. package/node_modules/@noble/hashes/sha3.d.ts.map +0 -1
  569. package/node_modules/@noble/hashes/sha3.js +0 -239
  570. package/node_modules/@noble/hashes/sha3.js.map +0 -1
  571. package/node_modules/@noble/hashes/sha512.d.ts +0 -26
  572. package/node_modules/@noble/hashes/sha512.d.ts.map +0 -1
  573. package/node_modules/@noble/hashes/sha512.js +0 -29
  574. package/node_modules/@noble/hashes/sha512.js.map +0 -1
  575. package/node_modules/@noble/hashes/src/_assert.ts +0 -22
  576. package/node_modules/@noble/hashes/src/_blake.ts +0 -50
  577. package/node_modules/@noble/hashes/src/_md.ts +0 -176
  578. package/node_modules/@noble/hashes/src/_u64.ts +0 -91
  579. package/node_modules/@noble/hashes/src/argon2.ts +0 -497
  580. package/node_modules/@noble/hashes/src/blake1.ts +0 -534
  581. package/node_modules/@noble/hashes/src/blake2.ts +0 -486
  582. package/node_modules/@noble/hashes/src/blake2b.ts +0 -10
  583. package/node_modules/@noble/hashes/src/blake2s.ts +0 -20
  584. package/node_modules/@noble/hashes/src/blake3.ts +0 -272
  585. package/node_modules/@noble/hashes/src/crypto.ts +0 -9
  586. package/node_modules/@noble/hashes/src/cryptoNode.ts +0 -15
  587. package/node_modules/@noble/hashes/src/eskdf.ts +0 -187
  588. package/node_modules/@noble/hashes/src/hkdf.ts +0 -88
  589. package/node_modules/@noble/hashes/src/hmac.ts +0 -94
  590. package/node_modules/@noble/hashes/src/index.ts +0 -31
  591. package/node_modules/@noble/hashes/src/legacy.ts +0 -293
  592. package/node_modules/@noble/hashes/src/pbkdf2.ts +0 -122
  593. package/node_modules/@noble/hashes/src/ripemd160.ts +0 -12
  594. package/node_modules/@noble/hashes/src/scrypt.ts +0 -257
  595. package/node_modules/@noble/hashes/src/sha1.ts +0 -10
  596. package/node_modules/@noble/hashes/src/sha2.ts +0 -402
  597. package/node_modules/@noble/hashes/src/sha256.ts +0 -24
  598. package/node_modules/@noble/hashes/src/sha3-addons.ts +0 -499
  599. package/node_modules/@noble/hashes/src/sha3.ts +0 -258
  600. package/node_modules/@noble/hashes/src/sha512.ts +0 -34
  601. package/node_modules/@noble/hashes/src/utils.ts +0 -395
  602. package/node_modules/@noble/hashes/utils.d.ts +0 -161
  603. package/node_modules/@noble/hashes/utils.d.ts.map +0 -1
  604. package/node_modules/@noble/hashes/utils.js +0 -313
  605. package/node_modules/@noble/hashes/utils.js.map +0 -1
@@ -1,195 +0,0 @@
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
- }
@@ -1,28 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,128 +0,0 @@
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
@@ -1 +0,0 @@
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,mBAAmB;IACrB,sBAAsB,CAAS;IAC/B,QAAQ,GAAG,IAAI,GAAG,EAAiC,CAAA;IACnD,eAAe,GAAG,IAAI,GAAG,EAAmC,CAAA;IAC5D,uBAAuB,GAAG,IAAI,GAAG,EAAU,CAAA;IAC3C,WAAW,GAAG,IAAI,GAAG,EAAqC,CAAA;IACnE,QAAQ,GAAkB,IAAI,CAAA;IAC9B,OAAO,GAAG,KAAK,CAAA;IAEf,YAAY,OAA2C;QACrD,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAA;IAC7D,CAAC;IAED,WAAW,CAAC,KAKX;QACC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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"}
@@ -1,4 +0,0 @@
1
- export * from './source-auth.js';
2
- export * from './admission.js';
3
- export * from './verifier.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,4 +0,0 @@
1
- export * from './source-auth.js';
2
- export * from './admission.js';
3
- export * from './verifier.js';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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"}
@@ -1,37 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-auth.d.ts","sourceRoot":"","sources":["../src/source-auth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,IAAI,CAAA;AAC7C,eAAO,MAAM,8BAA8B,IAAI,CAAA;AAC/C,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAC9C,eAAO,MAAM,+BAA+B,KAAK,CAAA;AACjD,eAAO,MAAM,8BAA8B,MAAM,CAAA;AACjD,eAAO,MAAM,iCAAiC,OAAO,CAAA;AACrD,eAAO,MAAM,2BAA2B,QAAmB,CAAA;AAC3D,eAAO,MAAM,wBAAwB,KAAK,CAAA;AAI1C,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA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CE_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
@@ -1 +0,0 @@
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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