Status: Accepted
Date: 2026-04-22
Branch / PR: aggregation/http-transport
The aggregation subsystem in @did-btcr2/method (see ADR 020) initially shipped with a single transport implementation: Nostr. A second transport was requested for two reasons:
fetch + streaming, no relay infrastructure.The aggregation protocol itself (MuSig2 + cohort formation) is transport-agnostic: runners, state machines, and message factories only see the Transport interface. This meant a second transport could be added without disturbing protocol code.
Option 2. Add HttpClientTransport and HttpServerTransport as new Transport implementations. Preserve Nostr as-is. Extend the transport factory with a discriminated-union config so callers opt into either transport per deployment.
No changes to AggregationService, AggregationParticipant, AggregationCohort, BeaconSigningSession, runner code, message factories, guards, or constants.
Positive
fetchImpl to server handlers.Negative
TransportFactory now carries a role discriminator ({ type: 'http', role: 'client' | 'server' }), slightly more ceremony than the original single-role shape.Neutral
packages/method/docs/http-transport.md: wire protocol, Hono mount example, client snippet.packages/method/docs/aggregation.md: the transport-agnostic protocol spec this decision extends.packages/method/src/core/aggregation/transport/http/: implementation.