@blockcast/mmt-container 0.3.0 → 0.4.0-main.1e94b11199ea
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.
- package/README.md +33 -16
- package/dist/browser-runtime.js +14816 -14254
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +24 -19
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +32 -14
- package/dist/carp-catalog.js.map +4 -4
- package/dist/catalog-fec-params.d.ts +88 -28
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +60 -23
- package/dist/catalog-fec-params.js.map +4 -4
- package/dist/catalog-network-source.js +1 -7
- package/dist/catalog-network-source.js.map +4 -4
- package/dist/cmaf-block-assembler.d.ts +0 -2
- package/dist/cmaf-block-assembler.d.ts.map +1 -1
- package/dist/cmaf-block-assembler.js +0 -1
- package/dist/cmaf-block-assembler.js.map +2 -2
- package/dist/cmcd-producer.d.ts.map +1 -1
- package/dist/cmcd-producer.js +0 -4
- package/dist/cmcd-producer.js.map +2 -2
- package/dist/delivery-catalog.d.ts +124 -0
- package/dist/delivery-catalog.d.ts.map +1 -0
- package/dist/delivery-catalog.js +1857 -0
- package/dist/delivery-catalog.js.map +7 -0
- package/dist/delta-fallback-config.d.ts +42 -0
- package/dist/delta-fallback-config.d.ts.map +1 -0
- package/dist/delta-fallback-config.js +59 -0
- package/dist/delta-fallback-config.js.map +7 -0
- package/dist/fec-manager.d.ts +52 -30
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +338 -293
- package/dist/fec-manager.js.map +4 -4
- package/dist/fec-state.d.ts +19 -31
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +4 -10
- package/dist/fec-state.js.map +4 -4
- package/dist/fec-worker-setup.d.ts +18 -14
- package/dist/fec-worker-setup.d.ts.map +1 -1
- package/dist/fec-worker-setup.js +81 -96
- package/dist/fec-worker-setup.js.map +4 -4
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.js +1 -7
- package/dist/iso-block-locator.js.map +4 -4
- package/dist/media-router.d.ts +20 -8
- package/dist/media-router.d.ts.map +1 -1
- package/dist/media-router.js +46 -21
- package/dist/media-router.js.map +2 -2
- package/dist/mfu-reassembler.js +24 -30
- package/dist/mfu-reassembler.js.map +4 -4
- package/dist/mmtp-container-parser.d.ts +14 -11
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +126 -99
- package/dist/mmtp-container-parser.js.map +4 -4
- package/dist/mmtp-container-parser.no-modules.js +154 -108
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +126 -99
- package/dist/mmtp-decode-pipeline.js.map +4 -4
- package/dist/mmtp-router.d.ts +51 -29
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +260 -326
- package/dist/mmtp-router.js.map +4 -4
- package/dist/multicast-input.js +1 -7
- package/dist/multicast-input.js.map +4 -4
- package/dist/multicast-manager.d.ts +72 -6
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +882 -673
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.d.ts +1 -1
- package/dist/multicast-transport.d.ts.map +1 -1
- package/dist/multicast-transport.js +44 -26
- package/dist/multicast-transport.js.map +4 -4
- package/dist/multicast-unwrap.js +29 -35
- package/dist/multicast-unwrap.js.map +4 -4
- package/dist/no-modules.js +150 -106
- package/dist/no-modules.js.map +4 -4
- package/dist/repair-fetch.d.ts +116 -21
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +114 -34
- package/dist/repair-fetch.js.map +4 -4
- package/dist/repair-layers.d.ts +18 -7
- package/dist/repair-layers.d.ts.map +1 -1
- package/dist/repair-layers.js +12 -10
- package/dist/repair-layers.js.map +4 -4
- package/dist/signaling.js +2 -11
- package/dist/signaling.js.map +4 -4
- package/dist/timestamp-codec.js +24 -30
- package/dist/timestamp-codec.js.map +4 -4
- package/dist/track-session.d.ts +7 -0
- package/dist/track-session.d.ts.map +1 -1
- package/dist/track-session.js +15 -8
- package/dist/track-session.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js +1 -7
- package/dist/wasm-mfu-reassembler.js.map +4 -4
- package/dist/wasm-mmtp-container-parser.js +126 -99
- package/dist/wasm-mmtp-container-parser.js.map +4 -4
- package/package.json +7 -14
- package/schemas/catalog.schema.json +3 -3
- package/src/carp-catalog.ts +51 -24
- package/src/catalog-fec-params.ts +173 -64
- package/src/cmaf-block-assembler.ts +1 -4
- package/src/cmcd-producer.ts +0 -6
- package/src/delivery-catalog.ts +498 -0
- package/src/delta-fallback-config.ts +72 -0
- package/src/fec-manager.ts +457 -334
- package/src/fec-state.ts +20 -32
- package/src/fec-worker-setup.ts +109 -90
- package/src/index.ts +32 -0
- package/src/media-router.ts +59 -21
- package/src/mmtp-container-parser.ts +106 -20
- package/src/mmtp-router.ts +189 -330
- package/src/multicast-manager.ts +265 -86
- package/src/multicast-transport.ts +16 -9
- package/src/repair-fetch.ts +273 -43
- package/src/repair-layers.ts +28 -8
- package/src/track-session.ts +28 -9
- package/test-vectors/catalog/README.md +44 -18
- package/test-vectors/catalog/negative/fec-block-profile-retired.json +52 -0
- package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +1 -1
- package/test-vectors/catalog/negative/multicast-endpoint-relay-address.json +39 -0
- package/test-vectors/catalog/negative/multicast-network-source-empty.json +1 -1
- package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +1 -1
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +2 -1
- package/test-vectors/catalog/positive/fec-layered-repair.json +2 -2
- package/test-vectors/catalog/positive/fec-multicast.json +2 -1
- package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +38 -0
- package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +2 -1
- package/test-vectors/catalog/section-codes.json +33 -0
- package/test-vectors/catalog-timing.json +356 -0
- package/test-vectors/catalog-validation.json +40 -5
- package/test-vectors/delivery-catalog/README.md +11 -0
- package/test-vectors/delivery-catalog/negative/missing-block-profile.json +58 -0
- package/test-vectors/delivery-catalog/negative/packet-id-signaling.json +59 -0
- package/test-vectors/delivery-catalog/negative/retired-k-padded-block-profile.json +59 -0
- package/test-vectors/delivery-catalog/positive/dash.json +56 -0
- package/test-vectors/delivery-catalog/positive/mmtp-source-only.json +43 -0
- package/node_modules/@blockcast/fec-worker/README.md +0 -223
- package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +0 -38
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/block-order.js +0 -78
- package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +0 -93
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +0 -346
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +0 -380
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +0 -11
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +0 -14
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +0 -859
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +0 -7
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts +0 -10
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/index.js +0 -8
- package/node_modules/@blockcast/fec-worker/dist/index.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +0 -20
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +0 -370
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +0 -7
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +0 -104
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +0 -181
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +0 -194
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +0 -62
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +0 -9
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/transfer.js +0 -13
- package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/package.json +0 -59
- package/node_modules/@blockcast/fec-worker/src/block-order.ts +0 -93
- package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +0 -392
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +0 -399
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +0 -1502
- package/node_modules/@blockcast/fec-worker/src/index.ts +0 -35
- package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +0 -589
- package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +0 -222
- package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +0 -209
- package/node_modules/@blockcast/fec-worker/src/transfer.ts +0 -12
- package/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
- package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
- package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
- package/node_modules/@blockcast/mmt-base/README.md +0 -134
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
- package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/package.json +0 -49
- package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
- package/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
- package/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
- package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
- package/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
- package/node_modules/@blockcast/mmt-fec/README.md +0 -271
- package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +0 -82
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +0 -296
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +0 -106
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +0 -288
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +0 -46
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +0 -96
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +0 -33
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +0 -57
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +0 -205
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +0 -240
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +0 -28
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.js +0 -28
- package/node_modules/@blockcast/mmt-fec/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +0 -20
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +0 -28
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +0 -258
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +0 -382
- package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +0 -41
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +0 -81
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +0 -82
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +0 -170
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +0 -134
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +0 -49
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
- package/node_modules/@blockcast/mmt-fec/package.json +0 -79
- package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +0 -371
- package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +0 -439
- package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +0 -127
- package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +0 -68
- package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +0 -310
- package/node_modules/@blockcast/mmt-fec/src/index.ts +0 -94
- package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +0 -34
- package/node_modules/@blockcast/mmt-fec/src/oti.ts +0 -463
- package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +0 -101
- package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +0 -195
- package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +0 -28
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +0 -128
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +0 -4
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +0 -4
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +0 -37
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +0 -179
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +0 -99
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +0 -492
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/package.json +0 -45
- package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +0 -171
- package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +0 -3
- package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +0 -230
- package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +0 -669
- package/node_modules/@noble/hashes/LICENSE +0 -21
- package/node_modules/@noble/hashes/README.md +0 -521
- package/node_modules/@noble/hashes/_assert.d.ts +0 -17
- package/node_modules/@noble/hashes/_assert.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_assert.js +0 -18
- package/node_modules/@noble/hashes/_assert.js.map +0 -1
- package/node_modules/@noble/hashes/_blake.d.ts +0 -14
- package/node_modules/@noble/hashes/_blake.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_blake.js +0 -50
- package/node_modules/@noble/hashes/_blake.js.map +0 -1
- package/node_modules/@noble/hashes/_md.d.ts +0 -51
- package/node_modules/@noble/hashes/_md.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_md.js +0 -162
- package/node_modules/@noble/hashes/_md.js.map +0 -1
- package/node_modules/@noble/hashes/_u64.d.ts +0 -55
- package/node_modules/@noble/hashes/_u64.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_u64.js +0 -90
- package/node_modules/@noble/hashes/_u64.js.map +0 -1
- package/node_modules/@noble/hashes/argon2.d.ts +0 -32
- package/node_modules/@noble/hashes/argon2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/argon2.js +0 -401
- package/node_modules/@noble/hashes/argon2.js.map +0 -1
- package/node_modules/@noble/hashes/blake1.d.ts +0 -106
- package/node_modules/@noble/hashes/blake1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake1.js +0 -459
- package/node_modules/@noble/hashes/blake1.js.map +0 -1
- package/node_modules/@noble/hashes/blake2.d.ts +0 -116
- package/node_modules/@noble/hashes/blake2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2.js +0 -420
- package/node_modules/@noble/hashes/blake2.js.map +0 -1
- package/node_modules/@noble/hashes/blake2b.d.ts +0 -11
- package/node_modules/@noble/hashes/blake2b.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2b.js +0 -14
- package/node_modules/@noble/hashes/blake2b.js.map +0 -1
- package/node_modules/@noble/hashes/blake2s.d.ts +0 -20
- package/node_modules/@noble/hashes/blake2s.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2s.js +0 -24
- package/node_modules/@noble/hashes/blake2s.js.map +0 -1
- package/node_modules/@noble/hashes/blake3.d.ts +0 -54
- package/node_modules/@noble/hashes/blake3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake3.js +0 -255
- package/node_modules/@noble/hashes/blake3.js.map +0 -1
- package/node_modules/@noble/hashes/crypto.d.ts +0 -2
- package/node_modules/@noble/hashes/crypto.d.ts.map +0 -1
- package/node_modules/@noble/hashes/crypto.js +0 -5
- package/node_modules/@noble/hashes/crypto.js.map +0 -1
- package/node_modules/@noble/hashes/cryptoNode.d.ts +0 -2
- package/node_modules/@noble/hashes/cryptoNode.d.ts.map +0 -1
- package/node_modules/@noble/hashes/cryptoNode.js +0 -18
- package/node_modules/@noble/hashes/cryptoNode.js.map +0 -1
- package/node_modules/@noble/hashes/eskdf.d.ts +0 -47
- package/node_modules/@noble/hashes/eskdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/eskdf.js +0 -166
- package/node_modules/@noble/hashes/eskdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_assert.d.ts +0 -17
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_assert.js +0 -15
- package/node_modules/@noble/hashes/esm/_assert.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_blake.d.ts +0 -14
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_blake.js +0 -45
- package/node_modules/@noble/hashes/esm/_blake.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_md.d.ts +0 -51
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_md.js +0 -155
- package/node_modules/@noble/hashes/esm/_md.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_u64.d.ts +0 -55
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_u64.js +0 -67
- package/node_modules/@noble/hashes/esm/_u64.js.map +0 -1
- package/node_modules/@noble/hashes/esm/argon2.d.ts +0 -32
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/argon2.js +0 -392
- package/node_modules/@noble/hashes/esm/argon2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake1.d.ts +0 -106
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake1.js +0 -452
- package/node_modules/@noble/hashes/esm/blake1.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2.d.ts +0 -116
- package/node_modules/@noble/hashes/esm/blake2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2.js +0 -413
- package/node_modules/@noble/hashes/esm/blake2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +0 -11
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2b.js +0 -11
- package/node_modules/@noble/hashes/esm/blake2b.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +0 -20
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2s.js +0 -21
- package/node_modules/@noble/hashes/esm/blake2s.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake3.d.ts +0 -54
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake3.js +0 -251
- package/node_modules/@noble/hashes/esm/blake3.js.map +0 -1
- package/node_modules/@noble/hashes/esm/crypto.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/crypto.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/crypto.js +0 -2
- package/node_modules/@noble/hashes/esm/crypto.js.map +0 -1
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/cryptoNode.js +0 -15
- package/node_modules/@noble/hashes/esm/cryptoNode.js.map +0 -1
- package/node_modules/@noble/hashes/esm/eskdf.d.ts +0 -47
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/eskdf.js +0 -160
- package/node_modules/@noble/hashes/esm/eskdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +0 -36
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/hkdf.js +0 -82
- package/node_modules/@noble/hashes/esm/hkdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/hmac.d.ts +0 -35
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/hmac.js +0 -86
- package/node_modules/@noble/hashes/esm/hmac.js.map +0 -1
- package/node_modules/@noble/hashes/esm/index.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/index.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/index.js +0 -33
- package/node_modules/@noble/hashes/esm/index.js.map +0 -1
- package/node_modules/@noble/hashes/esm/legacy.d.ts +0 -71
- package/node_modules/@noble/hashes/esm/legacy.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/legacy.js +0 -281
- package/node_modules/@noble/hashes/esm/legacy.js.map +0 -1
- package/node_modules/@noble/hashes/esm/package.json +0 -10
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +0 -23
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/pbkdf2.js +0 -97
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +0 -13
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/ripemd160.js +0 -13
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +0 -1
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +0 -34
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/scrypt.js +0 -228
- package/node_modules/@noble/hashes/esm/scrypt.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha1.d.ts +0 -11
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha1.js +0 -11
- package/node_modules/@noble/hashes/esm/sha1.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha2.d.ts +0 -159
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha2.js +0 -375
- package/node_modules/@noble/hashes/esm/sha2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha256.d.ts +0 -20
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha256.js +0 -20
- package/node_modules/@noble/hashes/esm/sha256.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +0 -142
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.js +0 -393
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3.d.ts +0 -53
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3.js +0 -234
- package/node_modules/@noble/hashes/esm/sha3.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha512.d.ts +0 -26
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha512.js +0 -26
- package/node_modules/@noble/hashes/esm/sha512.js.map +0 -1
- package/node_modules/@noble/hashes/esm/utils.d.ts +0 -161
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/utils.js +0 -281
- package/node_modules/@noble/hashes/esm/utils.js.map +0 -1
- package/node_modules/@noble/hashes/hkdf.d.ts +0 -36
- package/node_modules/@noble/hashes/hkdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/hkdf.js +0 -88
- package/node_modules/@noble/hashes/hkdf.js.map +0 -1
- package/node_modules/@noble/hashes/hmac.d.ts +0 -35
- package/node_modules/@noble/hashes/hmac.d.ts.map +0 -1
- package/node_modules/@noble/hashes/hmac.js +0 -91
- package/node_modules/@noble/hashes/hmac.js.map +0 -1
- package/node_modules/@noble/hashes/index.d.ts +0 -1
- package/node_modules/@noble/hashes/index.d.ts.map +0 -1
- package/node_modules/@noble/hashes/index.js +0 -33
- package/node_modules/@noble/hashes/index.js.map +0 -1
- package/node_modules/@noble/hashes/legacy.d.ts +0 -71
- package/node_modules/@noble/hashes/legacy.d.ts.map +0 -1
- package/node_modules/@noble/hashes/legacy.js +0 -287
- package/node_modules/@noble/hashes/legacy.js.map +0 -1
- package/node_modules/@noble/hashes/package.json +0 -266
- package/node_modules/@noble/hashes/pbkdf2.d.ts +0 -23
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/pbkdf2.js +0 -101
- package/node_modules/@noble/hashes/pbkdf2.js.map +0 -1
- package/node_modules/@noble/hashes/ripemd160.d.ts +0 -13
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +0 -1
- package/node_modules/@noble/hashes/ripemd160.js +0 -16
- package/node_modules/@noble/hashes/ripemd160.js.map +0 -1
- package/node_modules/@noble/hashes/scrypt.d.ts +0 -34
- package/node_modules/@noble/hashes/scrypt.d.ts.map +0 -1
- package/node_modules/@noble/hashes/scrypt.js +0 -232
- package/node_modules/@noble/hashes/scrypt.js.map +0 -1
- package/node_modules/@noble/hashes/sha1.d.ts +0 -11
- package/node_modules/@noble/hashes/sha1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha1.js +0 -14
- package/node_modules/@noble/hashes/sha1.js.map +0 -1
- package/node_modules/@noble/hashes/sha2.d.ts +0 -159
- package/node_modules/@noble/hashes/sha2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha2.js +0 -384
- package/node_modules/@noble/hashes/sha2.js.map +0 -1
- package/node_modules/@noble/hashes/sha256.d.ts +0 -20
- package/node_modules/@noble/hashes/sha256.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha256.js +0 -23
- package/node_modules/@noble/hashes/sha256.js.map +0 -1
- package/node_modules/@noble/hashes/sha3-addons.d.ts +0 -142
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha3-addons.js +0 -402
- package/node_modules/@noble/hashes/sha3-addons.js.map +0 -1
- package/node_modules/@noble/hashes/sha3.d.ts +0 -53
- package/node_modules/@noble/hashes/sha3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha3.js +0 -239
- package/node_modules/@noble/hashes/sha3.js.map +0 -1
- package/node_modules/@noble/hashes/sha512.d.ts +0 -26
- package/node_modules/@noble/hashes/sha512.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha512.js +0 -29
- package/node_modules/@noble/hashes/sha512.js.map +0 -1
- package/node_modules/@noble/hashes/src/_assert.ts +0 -22
- package/node_modules/@noble/hashes/src/_blake.ts +0 -50
- package/node_modules/@noble/hashes/src/_md.ts +0 -176
- package/node_modules/@noble/hashes/src/_u64.ts +0 -91
- package/node_modules/@noble/hashes/src/argon2.ts +0 -497
- package/node_modules/@noble/hashes/src/blake1.ts +0 -534
- package/node_modules/@noble/hashes/src/blake2.ts +0 -486
- package/node_modules/@noble/hashes/src/blake2b.ts +0 -10
- package/node_modules/@noble/hashes/src/blake2s.ts +0 -20
- package/node_modules/@noble/hashes/src/blake3.ts +0 -272
- package/node_modules/@noble/hashes/src/crypto.ts +0 -9
- package/node_modules/@noble/hashes/src/cryptoNode.ts +0 -15
- package/node_modules/@noble/hashes/src/eskdf.ts +0 -187
- package/node_modules/@noble/hashes/src/hkdf.ts +0 -88
- package/node_modules/@noble/hashes/src/hmac.ts +0 -94
- package/node_modules/@noble/hashes/src/index.ts +0 -31
- package/node_modules/@noble/hashes/src/legacy.ts +0 -293
- package/node_modules/@noble/hashes/src/pbkdf2.ts +0 -122
- package/node_modules/@noble/hashes/src/ripemd160.ts +0 -12
- package/node_modules/@noble/hashes/src/scrypt.ts +0 -257
- package/node_modules/@noble/hashes/src/sha1.ts +0 -10
- package/node_modules/@noble/hashes/src/sha2.ts +0 -402
- package/node_modules/@noble/hashes/src/sha256.ts +0 -24
- package/node_modules/@noble/hashes/src/sha3-addons.ts +0 -499
- package/node_modules/@noble/hashes/src/sha3.ts +0 -258
- package/node_modules/@noble/hashes/src/sha512.ts +0 -34
- package/node_modules/@noble/hashes/src/utils.ts +0 -395
- package/node_modules/@noble/hashes/utils.d.ts +0 -161
- package/node_modules/@noble/hashes/utils.d.ts.map +0 -1
- package/node_modules/@noble/hashes/utils.js +0 -313
- package/node_modules/@noble/hashes/utils.js.map +0 -1
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@blockcast/mmt-manifest-verify",
|
|
3
|
-
"version": "0.3.0",
|
|
4
|
-
"description": "Canonical live MMT source-auth manifest verifier",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"types": "./dist/index.d.ts"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist",
|
|
16
|
-
"src",
|
|
17
|
-
"!src/**/*.test.ts",
|
|
18
|
-
"!src/**/*.spec.ts",
|
|
19
|
-
"!src/**/__tests__",
|
|
20
|
-
"!dist/**/*.test.*",
|
|
21
|
-
"!dist/**/*.spec.*"
|
|
22
|
-
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "tsc",
|
|
25
|
-
"dev": "tsc --watch",
|
|
26
|
-
"clean": "rm -rf dist",
|
|
27
|
-
"typecheck": "tsc --noEmit",
|
|
28
|
-
"test": "vitest run",
|
|
29
|
-
"test:watch": "vitest"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@noble/hashes": "^1.8.0"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@blockcast/mmt-fec": "file:../fec",
|
|
36
|
-
"typescript": "^5.3.0",
|
|
37
|
-
"vitest": "^1.0.0"
|
|
38
|
-
},
|
|
39
|
-
"license": "Apache-2.0",
|
|
40
|
-
"repository": {
|
|
41
|
-
"type": "git",
|
|
42
|
-
"url": "https://github.com/Blockcast/libmmt.git",
|
|
43
|
-
"directory": "packages/mmt-manifest-verify"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sourceAuthMerkleRoot,
|
|
3
|
-
sourceAuthObjectDigest,
|
|
4
|
-
sourceAuthSignaturePreimage,
|
|
5
|
-
trimRecoveredSourceAuthObject,
|
|
6
|
-
type SourceAuthGroupClose,
|
|
7
|
-
type SourceAuthObjectEntry,
|
|
8
|
-
} from './source-auth.js'
|
|
9
|
-
|
|
10
|
-
export type SourceAuthAdmissionState =
|
|
11
|
-
| 'pending-entry'
|
|
12
|
-
| 'pending-object'
|
|
13
|
-
| 'provisional'
|
|
14
|
-
| 'authenticated'
|
|
15
|
-
|
|
16
|
-
export interface SourceAuthObjectAdmission {
|
|
17
|
-
groupId: bigint
|
|
18
|
-
objectId: number
|
|
19
|
-
recovered: boolean
|
|
20
|
-
state: Exclude<SourceAuthAdmissionState, 'pending-object'>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface PendingSourceAuthObject {
|
|
24
|
-
bytes: Uint8Array
|
|
25
|
-
recovered: boolean
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function requireU64(name: string, value: bigint): void {
|
|
29
|
-
if (value < 0n || value > 0xffff_ffff_ffff_ffffn) {
|
|
30
|
-
throw new Error(`${name} must be an unsigned 64-bit integer`)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function equalBytes(left: Uint8Array, right: Uint8Array): boolean {
|
|
35
|
-
if (left.byteLength !== right.byteLength) return false
|
|
36
|
-
return left.every((value, index) => value === right[index])
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Bounded media/manifest rendezvous for the browser player receive path.
|
|
41
|
-
* Object digest admission is synchronous; only the group-close signature is deferred.
|
|
42
|
-
*/
|
|
43
|
-
export class SourceAuthAdmission {
|
|
44
|
-
readonly #manifestAuthenticated: boolean
|
|
45
|
-
readonly #entries = new Map<number, SourceAuthObjectEntry>()
|
|
46
|
-
readonly #pendingObjects = new Map<number, PendingSourceAuthObject>()
|
|
47
|
-
readonly #entriesAwaitingObjects = new Set<number>()
|
|
48
|
-
readonly #admissions = new Map<number, SourceAuthObjectAdmission>()
|
|
49
|
-
#groupId: bigint | null = null
|
|
50
|
-
#closed = false
|
|
51
|
-
|
|
52
|
-
constructor(options: { manifestAuthenticated: boolean }) {
|
|
53
|
-
this.#manifestAuthenticated = options.manifestAuthenticated
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
admitObject(input: {
|
|
57
|
-
groupId: bigint
|
|
58
|
-
objectId: number
|
|
59
|
-
bytes: Uint8Array
|
|
60
|
-
recovered?: boolean
|
|
61
|
-
}): SourceAuthObjectAdmission {
|
|
62
|
-
this.#requireGroup(input.groupId)
|
|
63
|
-
if (this.#closed) throw new Error('source-auth group is already closed')
|
|
64
|
-
if (this.#admissions.has(input.objectId) || this.#pendingObjects.has(input.objectId)) {
|
|
65
|
-
throw new Error(`duplicate source-auth object ${input.objectId}`)
|
|
66
|
-
}
|
|
67
|
-
const entry = this.#entries.get(input.objectId)
|
|
68
|
-
if (entry) {
|
|
69
|
-
this.#entriesAwaitingObjects.delete(input.objectId)
|
|
70
|
-
return this.#verifyObject(entry, input.bytes, input.recovered ?? false)
|
|
71
|
-
}
|
|
72
|
-
if (this.#pendingObjects.size >= 1) {
|
|
73
|
-
throw new Error('source-auth media exceeds one-object manifest skew')
|
|
74
|
-
}
|
|
75
|
-
this.#pendingObjects.set(input.objectId, {
|
|
76
|
-
bytes: input.bytes,
|
|
77
|
-
recovered: input.recovered ?? false,
|
|
78
|
-
})
|
|
79
|
-
return {
|
|
80
|
-
groupId: input.groupId,
|
|
81
|
-
objectId: input.objectId,
|
|
82
|
-
recovered: input.recovered ?? false,
|
|
83
|
-
state: 'pending-entry',
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
admitEntry(entry: SourceAuthObjectEntry): SourceAuthObjectAdmission | SourceAuthAdmissionState {
|
|
88
|
-
this.#requireGroup(entry.groupId)
|
|
89
|
-
if (this.#closed) throw new Error('source-auth group is already closed')
|
|
90
|
-
if (this.#entries.has(entry.objectId)) {
|
|
91
|
-
throw new Error(`duplicate source-auth manifest entry ${entry.objectId}`)
|
|
92
|
-
}
|
|
93
|
-
const pending = this.#pendingObjects.get(entry.objectId)
|
|
94
|
-
if (!pending && this.#entriesAwaitingObjects.size >= 1) {
|
|
95
|
-
throw new Error('source-auth manifest exceeds one-object media skew')
|
|
96
|
-
}
|
|
97
|
-
this.#entries.set(entry.objectId, entry)
|
|
98
|
-
if (!pending) {
|
|
99
|
-
this.#entriesAwaitingObjects.add(entry.objectId)
|
|
100
|
-
return 'pending-object'
|
|
101
|
-
}
|
|
102
|
-
this.#pendingObjects.delete(entry.objectId)
|
|
103
|
-
return this.#verifyObject(entry, pending.bytes, pending.recovered)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
objectState(objectId: number): SourceAuthAdmissionState | undefined {
|
|
107
|
-
if (this.#pendingObjects.has(objectId)) return 'pending-entry'
|
|
108
|
-
if (this.#entriesAwaitingObjects.has(objectId)) return 'pending-object'
|
|
109
|
-
if (this.#closed && this.#admissions.has(objectId)) return 'authenticated'
|
|
110
|
-
return this.#admissions.get(objectId)?.state
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
async verifyClose(
|
|
114
|
-
close: SourceAuthGroupClose,
|
|
115
|
-
authScope: Uint8Array,
|
|
116
|
-
publicKey: CryptoKey,
|
|
117
|
-
subtle: SubtleCrypto = globalThis.crypto.subtle,
|
|
118
|
-
): Promise<void> {
|
|
119
|
-
this.#requireGroup(close.groupId)
|
|
120
|
-
if (this.#closed) throw new Error('source-auth group is already closed')
|
|
121
|
-
if (this.#pendingObjects.size !== 0 || this.#entriesAwaitingObjects.size !== 0) {
|
|
122
|
-
throw new Error('source-auth group closed with unmatched objects or entries')
|
|
123
|
-
}
|
|
124
|
-
if (close.objectCount !== this.#entries.size || this.#admissions.size !== this.#entries.size) {
|
|
125
|
-
throw new Error('source-auth group close object count mismatch')
|
|
126
|
-
}
|
|
127
|
-
const root = sourceAuthMerkleRoot([...this.#entries.values()])
|
|
128
|
-
if (!equalBytes(root, close.root)) throw new Error('source-auth group root mismatch')
|
|
129
|
-
const verified = await subtle.verify(
|
|
130
|
-
'Ed25519',
|
|
131
|
-
publicKey,
|
|
132
|
-
new Uint8Array(close.signature).buffer,
|
|
133
|
-
new Uint8Array(
|
|
134
|
-
sourceAuthSignaturePreimage(authScope, close.groupId, close.objectCount, root),
|
|
135
|
-
).buffer,
|
|
136
|
-
)
|
|
137
|
-
if (!verified) throw new Error('source-auth group close signature failed')
|
|
138
|
-
for (const admission of this.#admissions.values()) admission.state = 'authenticated'
|
|
139
|
-
this.#closed = true
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
#requireGroup(groupId: bigint): void {
|
|
143
|
-
requireU64('groupId', groupId)
|
|
144
|
-
if (this.#groupId === null) this.#groupId = groupId
|
|
145
|
-
else if (this.#groupId !== groupId) throw new Error('source-auth group identity mismatch')
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
#verifyObject(
|
|
149
|
-
entry: SourceAuthObjectEntry,
|
|
150
|
-
bytes: Uint8Array,
|
|
151
|
-
recovered: boolean,
|
|
152
|
-
): SourceAuthObjectAdmission {
|
|
153
|
-
const authenticated = recovered
|
|
154
|
-
? trimRecoveredSourceAuthObject(bytes, entry.trueLength)
|
|
155
|
-
: bytes
|
|
156
|
-
if (!recovered && bytes.byteLength !== entry.trueLength) {
|
|
157
|
-
throw new Error(`direct source-auth object length mismatch for ${entry.objectId}`)
|
|
158
|
-
}
|
|
159
|
-
if (!equalBytes(sourceAuthObjectDigest(authenticated), entry.digest)) {
|
|
160
|
-
throw new Error(`source-auth object digest mismatch for ${entry.objectId}`)
|
|
161
|
-
}
|
|
162
|
-
const admission: SourceAuthObjectAdmission = {
|
|
163
|
-
groupId: entry.groupId,
|
|
164
|
-
objectId: entry.objectId,
|
|
165
|
-
recovered,
|
|
166
|
-
state: this.#manifestAuthenticated ? 'authenticated' : 'provisional',
|
|
167
|
-
}
|
|
168
|
-
this.#admissions.set(entry.objectId, admission)
|
|
169
|
-
return admission
|
|
170
|
-
}
|
|
171
|
-
}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { blake3 } from '@noble/hashes/blake3'
|
|
2
|
-
|
|
3
|
-
export const SOURCE_AUTH_MANIFEST_VERSION = 1
|
|
4
|
-
export const SOURCE_AUTH_OBJECT_ENTRY_FRAME = 1
|
|
5
|
-
export const SOURCE_AUTH_GROUP_CLOSE_FRAME = 2
|
|
6
|
-
export const SOURCE_AUTH_OBJECT_ENTRY_LENGTH = 52
|
|
7
|
-
export const SOURCE_AUTH_GROUP_CLOSE_LENGTH = 112
|
|
8
|
-
export const SOURCE_AUTH_MAX_OBJECTS_PER_GROUP = 4096
|
|
9
|
-
export const SOURCE_AUTH_MAX_TRUE_LENGTH = 16 * 1024 * 1024
|
|
10
|
-
export const SOURCE_AUTH_SCOPE_LENGTH = 32
|
|
11
|
-
|
|
12
|
-
const SIGNATURE_DOMAIN = new TextEncoder().encode('blockcast-mmt-root-v1\0\0\0')
|
|
13
|
-
|
|
14
|
-
export interface SourceAuthObjectEntry {
|
|
15
|
-
kind: 'object'
|
|
16
|
-
groupId: bigint
|
|
17
|
-
objectId: number
|
|
18
|
-
trueLength: number
|
|
19
|
-
digest: Uint8Array
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface SourceAuthGroupClose {
|
|
23
|
-
kind: 'close'
|
|
24
|
-
groupId: bigint
|
|
25
|
-
objectCount: number
|
|
26
|
-
root: Uint8Array
|
|
27
|
-
signature: Uint8Array
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type SourceAuthManifestFrame = SourceAuthObjectEntry | SourceAuthGroupClose
|
|
31
|
-
|
|
32
|
-
function requireBytes(name: string, value: Uint8Array, length: number): void {
|
|
33
|
-
if (value.byteLength !== length) {
|
|
34
|
-
throw new Error(`${name} must be ${length} bytes, got ${value.byteLength}`)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function requireU32(name: string, value: number): void {
|
|
39
|
-
if (!Number.isInteger(value) || value < 0 || value > 0xffff_ffff) {
|
|
40
|
-
throw new Error(`${name} must be an unsigned 32-bit integer`)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function requireU64(name: string, value: bigint): void {
|
|
45
|
-
if (value < 0n || value > 0xffff_ffff_ffff_ffffn) {
|
|
46
|
-
throw new Error(`${name} must be an unsigned 64-bit integer`)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function requireTrueLength(value: number): void {
|
|
51
|
-
requireU32('trueLength', value)
|
|
52
|
-
if (value > SOURCE_AUTH_MAX_TRUE_LENGTH) {
|
|
53
|
-
throw new Error(`trueLength exceeds the ${SOURCE_AUTH_MAX_TRUE_LENGTH}-byte profile maximum`)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function sourceAuthObjectDigest(object: Uint8Array): Uint8Array {
|
|
58
|
-
return blake3(object)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function sourceAuthLeafHash(
|
|
62
|
-
groupId: bigint,
|
|
63
|
-
objectId: number,
|
|
64
|
-
digest: Uint8Array,
|
|
65
|
-
trueLength: number,
|
|
66
|
-
): Uint8Array {
|
|
67
|
-
requireU64('groupId', groupId)
|
|
68
|
-
requireU32('objectId', objectId)
|
|
69
|
-
requireBytes('digest', digest, 32)
|
|
70
|
-
requireTrueLength(trueLength)
|
|
71
|
-
const preimage = new Uint8Array(49)
|
|
72
|
-
const view = new DataView(preimage.buffer)
|
|
73
|
-
view.setBigUint64(1, groupId)
|
|
74
|
-
view.setUint32(9, objectId)
|
|
75
|
-
preimage.set(digest, 13)
|
|
76
|
-
view.setUint32(45, trueLength)
|
|
77
|
-
return blake3(preimage)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function sourceAuthMerkleRoot(
|
|
81
|
-
entries: readonly {
|
|
82
|
-
groupId: bigint
|
|
83
|
-
objectId: number
|
|
84
|
-
digest: Uint8Array
|
|
85
|
-
trueLength: number
|
|
86
|
-
}[],
|
|
87
|
-
): Uint8Array {
|
|
88
|
-
if (entries.length === 0) throw new Error('Merkle tree requires at least one object')
|
|
89
|
-
if (entries.length > SOURCE_AUTH_MAX_OBJECTS_PER_GROUP) {
|
|
90
|
-
throw new Error(`group exceeds ${SOURCE_AUTH_MAX_OBJECTS_PER_GROUP} objects`)
|
|
91
|
-
}
|
|
92
|
-
const groupId = entries[0]!.groupId
|
|
93
|
-
const objectIds = new Set<number>()
|
|
94
|
-
const ordered = [...entries].sort((left, right) => left.objectId - right.objectId)
|
|
95
|
-
let level = ordered.map((entry) => {
|
|
96
|
-
if (entry.groupId !== groupId) throw new Error('Merkle entries must belong to one group')
|
|
97
|
-
if (objectIds.has(entry.objectId)) throw new Error(`duplicate objectId ${entry.objectId}`)
|
|
98
|
-
objectIds.add(entry.objectId)
|
|
99
|
-
return sourceAuthLeafHash(entry.groupId, entry.objectId, entry.digest, entry.trueLength)
|
|
100
|
-
})
|
|
101
|
-
while (level.length > 1) {
|
|
102
|
-
const parents: Uint8Array[] = []
|
|
103
|
-
for (let index = 0; index < level.length; index += 2) {
|
|
104
|
-
const left = level[index]!
|
|
105
|
-
const right = level[index + 1] ?? left
|
|
106
|
-
const preimage = new Uint8Array(65)
|
|
107
|
-
preimage[0] = 1
|
|
108
|
-
preimage.set(left, 1)
|
|
109
|
-
preimage.set(right, 33)
|
|
110
|
-
parents.push(blake3(preimage))
|
|
111
|
-
}
|
|
112
|
-
level = parents
|
|
113
|
-
}
|
|
114
|
-
return level[0]!
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function trimRecoveredSourceAuthObject(
|
|
118
|
-
recoveredSymbol: Uint8Array,
|
|
119
|
-
trueLength: number,
|
|
120
|
-
): Uint8Array {
|
|
121
|
-
requireTrueLength(trueLength)
|
|
122
|
-
if (trueLength > recoveredSymbol.byteLength) {
|
|
123
|
-
throw new Error(`true length ${trueLength} exceeds recovered object size ${recoveredSymbol.byteLength}`)
|
|
124
|
-
}
|
|
125
|
-
return recoveredSymbol.subarray(0, trueLength)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export function encodeSourceAuthObjectEntry(
|
|
129
|
-
entry: Omit<SourceAuthObjectEntry, 'kind'>,
|
|
130
|
-
): Uint8Array {
|
|
131
|
-
requireU32('objectId', entry.objectId)
|
|
132
|
-
requireTrueLength(entry.trueLength)
|
|
133
|
-
requireU64('groupId', entry.groupId)
|
|
134
|
-
requireBytes('digest', entry.digest, 32)
|
|
135
|
-
const frame = new Uint8Array(SOURCE_AUTH_OBJECT_ENTRY_LENGTH)
|
|
136
|
-
const view = new DataView(frame.buffer)
|
|
137
|
-
frame[0] = SOURCE_AUTH_OBJECT_ENTRY_FRAME
|
|
138
|
-
frame[1] = SOURCE_AUTH_MANIFEST_VERSION
|
|
139
|
-
view.setBigUint64(4, entry.groupId)
|
|
140
|
-
view.setUint32(12, entry.objectId)
|
|
141
|
-
view.setUint32(16, entry.trueLength)
|
|
142
|
-
frame.set(entry.digest, 20)
|
|
143
|
-
return frame
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export function encodeSourceAuthGroupClose(
|
|
147
|
-
close: Omit<SourceAuthGroupClose, 'kind'>,
|
|
148
|
-
): Uint8Array {
|
|
149
|
-
requireU32('objectCount', close.objectCount)
|
|
150
|
-
if (close.objectCount === 0 || close.objectCount > SOURCE_AUTH_MAX_OBJECTS_PER_GROUP) {
|
|
151
|
-
throw new Error(`objectCount must be between 1 and ${SOURCE_AUTH_MAX_OBJECTS_PER_GROUP}`)
|
|
152
|
-
}
|
|
153
|
-
requireU64('groupId', close.groupId)
|
|
154
|
-
requireBytes('root', close.root, 32)
|
|
155
|
-
requireBytes('signature', close.signature, 64)
|
|
156
|
-
const frame = new Uint8Array(SOURCE_AUTH_GROUP_CLOSE_LENGTH)
|
|
157
|
-
const view = new DataView(frame.buffer)
|
|
158
|
-
frame[0] = SOURCE_AUTH_GROUP_CLOSE_FRAME
|
|
159
|
-
frame[1] = SOURCE_AUTH_MANIFEST_VERSION
|
|
160
|
-
view.setBigUint64(4, close.groupId)
|
|
161
|
-
view.setUint32(12, close.objectCount)
|
|
162
|
-
frame.set(close.root, 16)
|
|
163
|
-
frame.set(close.signature, 48)
|
|
164
|
-
return frame
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export function sourceAuthSignaturePreimage(
|
|
168
|
-
authScope: Uint8Array,
|
|
169
|
-
groupId: bigint,
|
|
170
|
-
objectCount: number,
|
|
171
|
-
root: Uint8Array,
|
|
172
|
-
): Uint8Array {
|
|
173
|
-
requireU32('objectCount', objectCount)
|
|
174
|
-
if (objectCount === 0 || 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
|
-
requireU64('groupId', groupId)
|
|
178
|
-
requireBytes('authScope', authScope, SOURCE_AUTH_SCOPE_LENGTH)
|
|
179
|
-
requireBytes('root', root, 32)
|
|
180
|
-
const preimage = new Uint8Array(100)
|
|
181
|
-
const view = new DataView(preimage.buffer)
|
|
182
|
-
preimage.set(SIGNATURE_DOMAIN)
|
|
183
|
-
preimage.set(authScope, 24)
|
|
184
|
-
view.setBigUint64(56, groupId)
|
|
185
|
-
view.setUint32(64, objectCount)
|
|
186
|
-
preimage.set(root, 68)
|
|
187
|
-
return preimage
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export function decodeSourceAuthManifestFrame(frame: Uint8Array): SourceAuthManifestFrame {
|
|
191
|
-
const frameType = frame[0]
|
|
192
|
-
const expectedLength = frameType === SOURCE_AUTH_OBJECT_ENTRY_FRAME
|
|
193
|
-
? SOURCE_AUTH_OBJECT_ENTRY_LENGTH
|
|
194
|
-
: frameType === SOURCE_AUTH_GROUP_CLOSE_FRAME
|
|
195
|
-
? SOURCE_AUTH_GROUP_CLOSE_LENGTH
|
|
196
|
-
: 0
|
|
197
|
-
if (expectedLength === 0) throw new Error(`unsupported manifest frame type ${frameType}`)
|
|
198
|
-
if (frame.byteLength !== expectedLength) {
|
|
199
|
-
throw new Error(`manifest frame has invalid length ${frame.byteLength} for type ${frameType}`)
|
|
200
|
-
}
|
|
201
|
-
if (frame[1] !== SOURCE_AUTH_MANIFEST_VERSION) {
|
|
202
|
-
throw new Error(`unsupported manifest version ${frame[1]}`)
|
|
203
|
-
}
|
|
204
|
-
if (frame[2] !== 0 || frame[3] !== 0) throw new Error('manifest reserved bits must be zero')
|
|
205
|
-
|
|
206
|
-
const view = new DataView(frame.buffer, frame.byteOffset, frame.byteLength)
|
|
207
|
-
const groupId = view.getBigUint64(4)
|
|
208
|
-
if (frameType === SOURCE_AUTH_OBJECT_ENTRY_FRAME) {
|
|
209
|
-
const entry: SourceAuthObjectEntry = {
|
|
210
|
-
kind: 'object',
|
|
211
|
-
groupId,
|
|
212
|
-
objectId: view.getUint32(12),
|
|
213
|
-
trueLength: view.getUint32(16),
|
|
214
|
-
digest: frame.slice(20, 52),
|
|
215
|
-
}
|
|
216
|
-
requireTrueLength(entry.trueLength)
|
|
217
|
-
return entry
|
|
218
|
-
}
|
|
219
|
-
const close: SourceAuthGroupClose = {
|
|
220
|
-
kind: 'close',
|
|
221
|
-
groupId,
|
|
222
|
-
objectCount: view.getUint32(12),
|
|
223
|
-
root: frame.slice(16, 48),
|
|
224
|
-
signature: frame.slice(48, 112),
|
|
225
|
-
}
|
|
226
|
-
if (close.objectCount === 0 || close.objectCount > SOURCE_AUTH_MAX_OBJECTS_PER_GROUP) {
|
|
227
|
-
throw new Error(`objectCount must be between 1 and ${SOURCE_AUTH_MAX_OBJECTS_PER_GROUP}`)
|
|
228
|
-
}
|
|
229
|
-
return close
|
|
230
|
-
}
|