Expand description
Broadcast projection registry and key management.
A ProjectedContext tracks the per-epoch broadcast keys needed to
decrypt messages from a broadcast context that this node projects over
HTTP. The projection endpoints serve decrypted content at:
GET /scp/broadcast/<routing_id_hex>/feedGET /scp/broadcast/<routing_id_hex>/messages/<blob_id_hex>
Where routing_id = SHA-256(context_id) per spec section 5.14.6.
§Activation
Projection is opt-in per context via
ApplicationNode::enable_broadcast_projection
and deactivated via
ApplicationNode::disable_broadcast_projection.
See spec sections 18.11.2 and 18.11.5.
Structs§
- Feed
Message - A single decrypted broadcast message in a
FeedResponse. - Feed
Query - Query parameters for
GET /scp/broadcast/<routing_id>/feed. - Feed
Response - JSON response body for
GET /scp/broadcast/<routing_id>/feed. - Projected
Context - A broadcast context whose messages are projected (decrypted and served) by this node’s HTTP endpoints.
Functions§
- broadcast_
projection_ router - Returns an axum
Routerserving both broadcast projection endpoints. - compute_
routing_ id - Computes the 32-byte routing ID for a broadcast context.
- feed_
handler - Axum handler for
GET /scp/broadcast/<routing_id>/feed. - hex_
decode - Decodes a hex string into a 32-byte array.
- hex_
encode - Encodes a 32-byte array as a lowercase hex string (64 characters).
- message_
handler - Axum handler for
GET /scp/broadcast/<routing_id>/messages/<blob_id>. - unix_
to_ iso8601 - Formats a Unix timestamp (seconds since epoch) as an ISO 8601 UTC string.
- validate_
projection_ policy - Validates that a projection policy is consistent with the context’s admission mode.