Nostr relay publish for outbound Timmy events — zap + DM broadcast #51
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Task #29 creates signed Nostr events (zap requests kind 9734, DMs kind 4) and logs them to
timmy_nostr_events. WhenNOSTR_RELAY_URLis set, EngagementService POSTs DMs to the relay, but ZapService does not. Relay communication should be centralised and robust.Acceptance Criteria
NostrRelayClientsingleton (artifacts/api-server/src/lib/nostr-relay.ts) that wraps WebSocket or HTTP POST toNOSTR_RELAY_URLZapService.sendZap()callsnostrRelayClient.publish(event)after loggingEngagementService.sendDm()uses the same clientGET /api/identity/timmyresponse includesrelayUrl(or null) so the frontend can display relay connectivity statusRelevant files
artifacts/api-server/src/lib/zap.tsartifacts/api-server/src/lib/engagement.tsartifacts/api-server/src/routes/identity.ts