feat: nostr event layer (builders + sign/publish service)

Implements ADR-0001. kinds.py pins the allocations; events.py has pure
builders (30402 listing, 30078 encrypted reservation, 31923 blocked-range
calendar, 22001 availability response); service.py signs/encrypts via
resolve_signer (spirekeeper hybrid pattern — no nsec at rest) and sketches
publish + inbound subscription. Relay plumbing marked TODO(relay).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
This commit is contained in:
Padreug 2026-07-19 00:16:39 +02:00
commit 900b682986
4 changed files with 264 additions and 0 deletions

4
nostr/__init__.py Normal file
View file

@ -0,0 +1,4 @@
"""Chatelet's Nostr layer: event kind allocations, event builders, and the
sign/publish/subscribe service. Kept in its own package so the booking
logic (crud.py) stays transport-agnostic and the REST + Nostr entry points
can share it."""