@blockcast/mmt-container 0.4.0 → 0.4.1-main.22841c1f0a2d
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 +37 -21
- package/dist/align.d.ts +24 -18
- package/dist/align.d.ts.map +1 -1
- package/dist/align.js +23 -4
- package/dist/align.js.map +2 -2
- package/dist/browser-runtime.js +2037 -881
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +76 -39
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +321 -205
- package/dist/carp-catalog.js.map +3 -3
- package/dist/catalog-fec-params.d.ts +12 -4
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +40 -17
- package/dist/catalog-fec-params.js.map +3 -3
- package/dist/catalog-network-source.d.ts +28 -7
- package/dist/catalog-network-source.d.ts.map +1 -1
- package/dist/catalog-network-source.js +21 -1
- package/dist/catalog-network-source.js.map +2 -2
- package/dist/catalog-validator.d.ts +4 -3
- package/dist/catalog-validator.d.ts.map +1 -1
- package/dist/catalog-validator.js +0 -29
- package/dist/catalog-validator.js.map +3 -3
- package/dist/cmcd-producer.d.ts +13 -1
- package/dist/cmcd-producer.d.ts.map +1 -1
- package/dist/cmcd-producer.js +14 -0
- package/dist/cmcd-producer.js.map +2 -2
- package/dist/delivery-catalog.js +98 -234
- package/dist/delivery-catalog.js.map +4 -4
- package/dist/fec-manager.d.ts +108 -1
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +452 -66
- package/dist/fec-manager.js.map +4 -4
- package/dist/fec-state.d.ts +2 -1
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +18 -3
- package/dist/fec-state.js.map +3 -3
- package/dist/fec-worker-setup.d.ts +10 -0
- package/dist/fec-worker-setup.d.ts.map +1 -1
- package/dist/fec-worker-setup.js +15 -4
- package/dist/fec-worker-setup.js.map +2 -2
- package/dist/held-layer-admission.d.ts +58 -0
- package/dist/held-layer-admission.d.ts.map +1 -0
- package/dist/held-layer-admission.js +105 -0
- package/dist/held-layer-admission.js.map +7 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.d.ts +39 -1
- package/dist/iso-block-locator.d.ts.map +1 -1
- package/dist/iso-block-locator.js +109 -17
- package/dist/iso-block-locator.js.map +3 -3
- package/dist/mfu-reassembler.js +21 -13
- package/dist/mfu-reassembler.js.map +2 -2
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +93 -22
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +3677 -1213
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +93 -22
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-fec-session.d.ts +192 -0
- package/dist/mmtp-fec-session.d.ts.map +1 -0
- package/dist/mmtp-fec-session.js +640 -0
- package/dist/mmtp-fec-session.js.map +7 -0
- package/dist/mmtp-router.d.ts +69 -32
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +296 -192
- package/dist/mmtp-router.js.map +2 -2
- package/dist/multicast-auth-catalog.d.ts +86 -92
- package/dist/multicast-auth-catalog.d.ts.map +1 -1
- package/dist/multicast-auth-catalog.js +313 -124
- package/dist/multicast-auth-catalog.js.map +3 -3
- package/dist/multicast-input.d.ts +31 -8
- package/dist/multicast-input.d.ts.map +1 -1
- package/dist/multicast-input.js +299 -35
- package/dist/multicast-input.js.map +3 -3
- package/dist/multicast-manager.d.ts +97 -11
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +1022 -527
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.d.ts +12 -2
- package/dist/multicast-transport.d.ts.map +1 -1
- package/dist/multicast-transport.js +108 -238
- package/dist/multicast-transport.js.map +4 -4
- package/dist/multicast-unwrap.js +21 -13
- package/dist/multicast-unwrap.js.map +2 -2
- package/dist/no-modules.d.ts +5 -3
- package/dist/no-modules.d.ts.map +1 -1
- package/dist/no-modules.js +3625 -1194
- package/dist/no-modules.js.map +4 -4
- package/dist/phase14-catalog-override.d.ts +1 -1
- package/dist/phase14-catalog-override.d.ts.map +1 -1
- package/dist/phase14-catalog-override.js +2 -2
- package/dist/phase14-catalog-override.js.map +2 -2
- package/dist/repair-fetch.d.ts +81 -6
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +156 -31
- package/dist/repair-fetch.js.map +3 -3
- package/dist/repair-layers.d.ts +2 -0
- package/dist/repair-layers.d.ts.map +1 -1
- package/dist/repair-layers.js +19 -2
- package/dist/repair-layers.js.map +2 -2
- package/dist/sample-combiner.d.ts +7 -1
- package/dist/sample-combiner.d.ts.map +1 -1
- package/dist/sample-combiner.js +14 -2
- package/dist/sample-combiner.js.map +2 -2
- package/dist/signaling.d.ts +2 -2
- package/dist/signaling.d.ts.map +1 -1
- package/dist/signaling.js +3 -3
- package/dist/signaling.js.map +2 -2
- package/dist/switching-set-alignment.d.ts +1 -1
- package/dist/switching-set-alignment.js.map +1 -1
- package/dist/timestamp-codec.js +21 -13
- package/dist/timestamp-codec.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js.map +1 -1
- package/dist/wasm-mmtp-container-parser.js +93 -22
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/package.json +6 -18
- package/schemas/catalog.schema.json +133 -38
- package/src/align.ts +52 -21
- package/src/carp-catalog.ts +188 -68
- package/src/catalog-fec-params.ts +28 -3
- package/src/catalog-network-source.ts +49 -7
- package/src/catalog-validator.ts +4 -11
- package/src/cmcd-producer.ts +23 -1
- package/src/fec-manager.ts +366 -63
- package/src/fec-state.ts +11 -4
- package/src/fec-worker-setup.ts +30 -2
- package/src/held-layer-admission.ts +161 -0
- package/src/index.ts +32 -19
- package/src/iso-block-locator.ts +110 -7
- package/src/mmtp-container-parser.ts +75 -7
- package/src/mmtp-fec-session.ts +606 -0
- package/src/mmtp-router.ts +301 -240
- package/src/multicast-auth-catalog.ts +134 -238
- package/src/multicast-input.ts +148 -124
- package/src/multicast-manager.ts +271 -40
- package/src/multicast-transport.ts +17 -3
- package/src/no-modules.ts +8 -7
- package/src/phase14-catalog-override.ts +3 -3
- package/src/repair-fetch.ts +283 -39
- package/src/repair-layers.ts +22 -2
- package/src/sample-combiner.ts +15 -2
- package/src/signaling.ts +2 -2
- package/src/switching-set-alignment.ts +1 -1
- package/test-vectors/align.json +108 -32
- package/test-vectors/bc-provenance-v2.json +1526 -0
- package/test-vectors/catalog/README.md +71 -4
- package/test-vectors/catalog/negative/fec-block-profile-missing.json +1 -1
- package/test-vectors/catalog/negative/fec-block-profile-retired.json +1 -1
- package/test-vectors/catalog/negative/fec-block-profile-unknown.json +1 -1
- package/test-vectors/catalog/negative/fec-iso-symbol-size-below-floor.json +28 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-iso-symbol-size-13.json +28 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-k-plus-p-over-255.json +39 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-overlay-over-255.json +40 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-source-symbols-zero.json +43 -0
- package/test-vectors/catalog/negative/fec-repair-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-source-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-symbol-size-zero.json +28 -0
- package/test-vectors/catalog/negative/init-data-inline-without-data.json +22 -0
- package/test-vectors/catalog/negative/mmtp-mode-mpu.json +15 -0
- package/test-vectors/catalog/negative/multicast-amt-dns-without-relay.json +37 -0
- package/test-vectors/catalog/negative/multicast-amt-driad-with-relay.json +38 -0
- package/test-vectors/catalog/negative/multicast-auth-asm-missing-sender-address.json +77 -0
- package/test-vectors/catalog/negative/multicast-auth-duplicate-first-epoch.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-duplicate-kid.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-auth-without-object-auth.json +38 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-auth.json +49 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-bandwidth.json +55 -0
- package/test-vectors/catalog/negative/multicast-auth-manifest-port-equals-port.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-manifest-timer-out-of-range.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-above-max.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-below-min.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-root-dotted-key.json +55 -0
- package/test-vectors/catalog/negative/multicast-auth-sender-address-on-ssm.json +57 -0
- package/test-vectors/catalog/negative/multicast-auth-version-1.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-version-3.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-version-missing.json +55 -0
- package/test-vectors/catalog/negative/multicast-endpoint-foreign-namespace-track.json +44 -0
- package/test-vectors/catalog/negative/multicast-endpoint-protocol-amt.json +38 -0
- package/test-vectors/catalog/negative/multicast-endpoint-protocol-atsc3.json +38 -0
- package/test-vectors/catalog/negative/presentation-anchor-unsafe.json +16 -0
- package/test-vectors/catalog/positive/fec-algorithm-unimplemented.json +29 -0
- package/test-vectors/catalog/positive/fec-iso-ssbg1.json +1 -1
- package/test-vectors/catalog/positive/fec-multicast.json +1 -1
- package/test-vectors/catalog/positive/fec-reed-solomon-layered.json +50 -0
- package/test-vectors/catalog/positive/mmt01-12-1-init-ref-anchor.json +29 -0
- package/test-vectors/catalog/positive/multicast-amt-discovery-omitted.json +37 -0
- package/test-vectors/catalog/positive/multicast-amt-dns-relay.json +38 -0
- package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +3 -3
- package/test-vectors/catalog/{negative/multicast-endpoint-missing-protocol-and-source.json → positive/multicast-asm-unprotected.json} +10 -5
- package/test-vectors/catalog/positive/multicast-auth-asm-sender.json +78 -0
- package/test-vectors/catalog/positive/multicast-auth-rotation.json +39 -38
- package/test-vectors/catalog/positive/multicast-draft01-4-1-example.json +81 -0
- package/test-vectors/catalog/positive/multicast-draft01-7-2-6-example.json +70 -0
- package/test-vectors/catalog/positive/presentation-anchor-negative.json +27 -0
- package/test-vectors/catalog/section-codes.json +31 -1
- package/test-vectors/catalog-multicast-auth-v1.json +38 -20
- package/test-vectors/catalog-validation.json +101 -5
- package/test-vectors/catalog-validator-public-api.mjs +14 -9
- package/test-vectors/generate-bc-provenance-v2.mjs +252 -0
- package/dist/fec-codec.d.ts +0 -32
- package/dist/fec-codec.d.ts.map +0 -1
- package/dist/fec-codec.js +0 -47
- package/dist/fec-codec.js.map +0 -7
- package/dist/manifest-auth-plan.d.ts +0 -30
- package/dist/manifest-auth-plan.d.ts.map +0 -1
- package/dist/manifest-auth-plan.js +0 -1266
- package/dist/manifest-auth-plan.js.map +0 -7
- package/dist/source-auth.d.ts +0 -2
- package/dist/source-auth.d.ts.map +0 -1
- package/dist/source-auth.js +0 -1209
- package/dist/source-auth.js.map +0 -7
- package/src/fec-codec.ts +0 -61
- package/src/manifest-auth-plan.ts +0 -107
- package/src/source-auth.ts +0 -1
- package/test-vectors/generate-source-auth-fixture.mjs +0 -114
- package/test-vectors/source-auth-v1.json +0 -61
|
@@ -1,115 +1,109 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `multicast.auth`
|
|
3
|
-
*
|
|
2
|
+
* `multicast.auth` and an endpoint's `auth`: bc-provenance version 2, per
|
|
3
|
+
* draft-ramadan-moq-multicast-01 7.2.6 at
|
|
4
|
+
* Blockcast/moqcast-draft@fd962fd73d21ed281b60219c11ea61cc9e4e91c4.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* describe two protected tracks (e.g. audio + video) in one session.
|
|
6
|
+
* The block lives in the `multicast` object, never the root: the root dotted
|
|
7
|
+
* key `"multicast.auth"` was draft -00's (libmmt called its `tracks[]` shape
|
|
8
|
+
* "multicast.auth v2 (BLO-16700)", which is the draft's bc-provenance
|
|
9
|
+
* version 1) and is refused. `multicast.auth` declares the profile and its
|
|
10
|
+
* keys; an endpoint's `auth` marks that endpoint's flow protected and carries
|
|
11
|
+
* the flow's parameters. There is no verify-and-report mode (7.2.7): a
|
|
12
|
+
* receiver that implements the profile enforces it.
|
|
13
13
|
*
|
|
14
|
-
* `
|
|
15
|
-
*
|
|
16
|
-
* `manifestTrack` into a `tracks[]` array, one entry per protected media
|
|
17
|
-
* track, each carrying its own `manifestTrack` name, `authScope`, and
|
|
18
|
-
* `sourceSymbolFormat`. This is additive over the S3 draft shape (every
|
|
19
|
-
* top-level field the draft specified still exists at the top level) —
|
|
20
|
-
* only `manifestTrack` moves from top-level into each track entry.
|
|
21
|
-
*
|
|
22
|
-
* `manifestTrack` is carried as an opaque string field, deliberately NOT
|
|
23
|
-
* run through `parseTrackRole`/`VALID_ROLE_SUFFIXES` in ./carp-catalog.ts.
|
|
24
|
-
* `carp-catalog.ts` only recognises `base`/`delta`/`repair` role suffixes
|
|
25
|
-
* and throws on anything else (including a hypothetical `manifest` role);
|
|
26
|
-
* resolving BLO-16485's "manifest-track name collision" MANDATORY item by
|
|
27
|
-
* adding a role would force every catalog consumer to learn a fourth role
|
|
28
|
-
* and would break `validateSwitchingSet`'s base/delta/repair completeness
|
|
29
|
-
* check. Carrying it as a typed field here avoids both.
|
|
14
|
+
* The rules are `multicastCatalogIssues` in `@blockcast/mmt-base`, shared with
|
|
15
|
+
* the transport receivers; this module decodes what they admit.
|
|
30
16
|
*/
|
|
17
|
+
import type { BcpV2Key } from "@blockcast/mmt-manifest-verify";
|
|
31
18
|
export type MulticastAuthScheme = "bc-provenance";
|
|
32
|
-
export type MulticastAuthHash = "blake3";
|
|
33
19
|
export type MulticastAuthSig = "ed25519";
|
|
34
|
-
|
|
35
|
-
export
|
|
36
|
-
export
|
|
20
|
+
/** Default `maxAuthDelayMs` and `manifestTimerMs` of an endpoint's `auth`. */
|
|
21
|
+
export declare const DEFAULT_MAX_AUTH_DELAY_MS = 200;
|
|
22
|
+
export declare const DEFAULT_MANIFEST_TIMER_MS = 20;
|
|
37
23
|
/** Encode raw bytes as unpadded base64url — the one accepted encoding for
|
|
38
|
-
* `
|
|
24
|
+
* `multicast.auth.keys[].publicKey`. */
|
|
39
25
|
export declare function encodeBase64Url(bytes: Uint8Array): string;
|
|
40
26
|
/** Decode unpadded base64url text to raw bytes. Throws on any padding
|
|
41
27
|
* (`=`), standard-alphabet (`+`/`/`), or otherwise invalid character. */
|
|
42
28
|
export declare function decodeBase64Url(text: string): Uint8Array;
|
|
43
|
-
/** Decode + length-validate an `authScope` field. Throws unless it decodes
|
|
44
|
-
* to exactly `SOURCE_AUTH_SCOPE_LENGTH` (32) raw bytes. */
|
|
45
|
-
export declare function decodeAuthScope(authScope: string): Uint8Array;
|
|
46
29
|
/** Decode a catalog key in the only accepted representation: exactly 32 raw
|
|
47
30
|
* ed25519 bytes encoded as canonical, unpadded base64url. */
|
|
48
31
|
export declare function decodeEd25519PublicKey(publicKey: string): Uint8Array;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* `SourceAuthGroupClose`). Opaque string — not role-parsed.
|
|
56
|
-
* - `authScope`: this track's unique 32-byte scope, raw bytes as unpadded
|
|
57
|
-
* base64url. BLO-16481 requires a scope fresh per (publisher session,
|
|
58
|
-
* track, source-symbol format) — a track publishing under two source-
|
|
59
|
-
* symbol formats in the same session MUST appear as two entries here,
|
|
60
|
-
* each with its own scope.
|
|
61
|
-
* - `sourceSymbolFormat`: names the deployed source-symbol profile this
|
|
62
|
-
* track's authenticated bytes are derived from (e.g.
|
|
63
|
-
* `"full-mmtp-packet"` or `"fec-padded-recovery"`, the two formats
|
|
64
|
-
* BLO-16481's S0 fixture covers).
|
|
65
|
-
*/
|
|
66
|
-
export interface MulticastAuthTrackConfig {
|
|
67
|
-
mediaTrack: string;
|
|
68
|
-
manifestTrack: string;
|
|
69
|
-
authScope: string;
|
|
70
|
-
sourceSymbolFormat: string;
|
|
32
|
+
/** One `multicast.auth.keys[]` entry: `kid` and `firstEpoch` are u32,
|
|
33
|
+
* `publicKey` the 32-octet Ed25519 key in canonical unpadded base64url. */
|
|
34
|
+
export interface MulticastAuthKey {
|
|
35
|
+
kid: number;
|
|
36
|
+
publicKey: string;
|
|
37
|
+
firstEpoch: number;
|
|
71
38
|
}
|
|
72
|
-
/**
|
|
73
|
-
* `multicast.auth` v2 — supersedes the BLO-16485 draft's singular
|
|
74
|
-
* `manifestTrack`/no-`authScope` shape (BLO-16700 decision).
|
|
75
|
-
*/
|
|
39
|
+
/** `multicast.auth` (7.2.6). `hash_alg` is a record octet, not a member. */
|
|
76
40
|
export interface MulticastAuthConfig {
|
|
77
41
|
scheme: MulticastAuthScheme;
|
|
78
|
-
|
|
42
|
+
version: 2;
|
|
79
43
|
sig: MulticastAuthSig;
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
* alongside `publicKey` during a key-rotation overlap window. */
|
|
85
|
-
previousKey?: string;
|
|
86
|
-
compaction: MulticastAuthCompaction;
|
|
87
|
-
/** Player-config-wins default; catalog value only selects the default
|
|
88
|
-
* when the player hasn't pinned one (S3 enforcement precedence). */
|
|
89
|
-
enforcement?: MulticastAuthEnforcement;
|
|
90
|
-
tracks: MulticastAuthTrackConfig[];
|
|
44
|
+
/** One to four keys; `kid` and `firstEpoch` each distinct. */
|
|
45
|
+
keys: MulticastAuthKey[];
|
|
46
|
+
/** Lowest `epoch` a receiver accepts at join. */
|
|
47
|
+
minEpoch: number;
|
|
91
48
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
49
|
+
/** An endpoint's `auth` (7.2.6). A protected endpoint also declares `bandwidth`. */
|
|
50
|
+
export interface EndpointAuthConfig {
|
|
51
|
+
/** Destination port of the record datagrams on the endpoint's `(S, G)`. */
|
|
52
|
+
manifestPort: number;
|
|
53
|
+
/** u32 chosen per channel generation. */
|
|
54
|
+
streamId: number;
|
|
55
|
+
/** `S` of a protected ASM endpoint; never on SSM. */
|
|
56
|
+
senderAddress?: string;
|
|
57
|
+
/** 50..1000, default 200. */
|
|
58
|
+
maxAuthDelayMs?: number;
|
|
59
|
+
/** At least 1, default 20. */
|
|
60
|
+
manifestTimerMs?: number;
|
|
61
|
+
/** MoQ track mirroring the records. */
|
|
62
|
+
manifestTrack?: string;
|
|
63
|
+
}
|
|
64
|
+
/** Structural check of a `multicast.auth` block, duplicate `kid` and
|
|
65
|
+
* `firstEpoch` included. */
|
|
96
66
|
export declare function isMulticastAuthConfig(obj: unknown): obj is MulticastAuthConfig;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
67
|
+
/** A protected flow as a receiver binds it: one per protected endpoint. */
|
|
68
|
+
export interface ResolvedMulticastAuthFlow {
|
|
69
|
+
/** Index of the endpoint in `multicast.endpoints`. */
|
|
70
|
+
endpointIndex: number;
|
|
71
|
+
/** `S`: `sourceAddress` on SSM, `auth.senderAddress` on ASM. */
|
|
72
|
+
source: string;
|
|
73
|
+
groupAddress: string;
|
|
74
|
+
port: number;
|
|
75
|
+
bandwidth: number;
|
|
76
|
+
manifestPort: number;
|
|
77
|
+
streamId: number;
|
|
78
|
+
maxAuthDelayMs: number;
|
|
79
|
+
manifestTimerMs: number;
|
|
80
|
+
manifestTrack?: string;
|
|
81
|
+
tracks: Array<{
|
|
82
|
+
name: string;
|
|
83
|
+
packetId: number;
|
|
105
84
|
}>;
|
|
106
85
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
86
|
+
export interface ResolvedMulticastAuthConfig {
|
|
87
|
+
/** Decoded keys, ascending by `firstEpoch`. */
|
|
88
|
+
keys: BcpV2Key[];
|
|
89
|
+
minEpoch: number;
|
|
90
|
+
flows: ResolvedMulticastAuthFlow[];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Resolve `multicast.auth` and every protected endpoint into decoded keys and
|
|
94
|
+
* per-endpoint flows. Returns `undefined` for an unprotected catalog unless
|
|
95
|
+
* `requireAuth` pins authentication (7.2.7), which then throws.
|
|
96
|
+
*
|
|
97
|
+
* A catalog-level fault (no key set: a malformed block, a repeated `kid` or
|
|
98
|
+
* `firstEpoch`, the retired root key) throws, so nothing is admitted and
|
|
99
|
+
* nothing falls back to unauthenticated reception. An endpoint the rules make
|
|
100
|
+
* a receiver ignore yields no flow; the others still bind.
|
|
101
|
+
*/
|
|
102
|
+
export declare function resolveMulticastAuthCatalog(catalog: unknown, options?: {
|
|
103
|
+
requireAuth?: boolean;
|
|
104
|
+
catalogNamespace?: string;
|
|
105
|
+
}): ResolvedMulticastAuthConfig | undefined;
|
|
106
|
+
/** The key that signs a record of `kid` at `epoch`, or `undefined` when that
|
|
107
|
+
* `kid` does not sign it (7.2.7: such a record is dropped before verification). */
|
|
108
|
+
export declare function multicastAuthKeyFor(resolved: ResolvedMulticastAuthConfig, kid: number, epoch: number): Uint8Array | undefined;
|
|
115
109
|
//# sourceMappingURL=multicast-auth-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multicast-auth-catalog.d.ts","sourceRoot":"","sources":["../src/multicast-auth-catalog.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"multicast-auth-catalog.d.ts","sourceRoot":"","sources":["../src/multicast-auth-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAA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