mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-06-30 21:39:30 +00:00
The send pipeline still reached into `waku.node` for its publish handles (`wakuRelay`, `wakuRlnRelay`, `wakuLightpushClient`, `peerManager`) when building the processor chain -- the last node coupling the previous step had to leave in place with a comment. Add `waku/api/publish.nim`, a Waku-layer surface for the send pipeline: relay/lightpush availability (`hasRelay`/`hasLightpush`), the relay push handler factory (`relayPushHandler`, which folds in the RLN proof), and lightpush peer selection + publish (`lightpushPeerAvailable`, `lightpushPublishToAny`). These keep the rich `WakuLightPushResult` the processors branch on for retry decisions. `SendService` and `LightpushSendProcessor` now drive that surface and hold only a `Waku`; no part of the send pipeline inspects `waku.node` anymore. "No lightpush peer" now surfaces as SERVICE_NOT_AVAILABLE, which the processor already maps to NextRoundRetry, so behaviour is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>