SkateSpots/src/components/crew
shakespeare.diy 50d8d9e614 Wire live Cordn encrypted crew chat over the coordinator (ContextVM)
The crew coordinator is no longer just a pointer — when a crew configures one,
the Chat tab runs through it for real.

- src/lib/cordn: clean transport/crypto split so an MLS (ts-mls) upgrade is a
  drop-in swap of the crypto layer only.
  - types.ts: CordnMessage/CordnEndpoint + envelope kind 4497 + app tag.
  - crypto.ts: sealGroupMessage/openGroupMessage — real NIP-44 group encryption
    (per-recipient sealing), the exact seam MLS encrypt-to-epoch slots into.
  - client.ts: buildEnvelope/publishEnvelope/fetchGroupMessages with per-group
    cursor ordering and ciphertext→author sender binding (anti-spoof).
  - endpoint.ts: resolve a crew's `coordinator` to a usable relay endpoint
    (wss/ws direct; https falls back to the ContextVM relay).
- useCordnChat: fetch-then-poll hook mirroring the NIP-17 chat API.
- CrewChat: uses Cordn when the crew has a coordinator, NIP-17 fallback
  otherwise; header badge shows the active transport (Cordn vs Private).
- CrewCoordinatorCard: reflects that private chat is live.
- NIP.md: document envelope kind 4497, delivery (fetch-then-poll + cursors),
  the nip44-group sealed content, and the honest crypto→MLS seam.

Real encryption, real coordinator routing, non-breaking (fallback intact),
with the MLS ratchet as a clearly-marked next step.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-09-03 00:15:22 +07:00
..
CrewCoordinatorCard.tsx Wire live Cordn encrypted crew chat over the coordinator (ContextVM) 2026-09-03 00:15:22 +07:00
CrewHero.tsx Redesign crew detail + crews page (Phase 2: visual) 2026-09-02 23:07:27 +07:00
CrewLeadership.tsx Add skate roles to the crew roster (filmer, photographer, etc.) 2026-09-03 00:07:30 +07:00
CrewSponsorBanner.tsx Add crew roles & relationships (Phase 3: sponsor + Cordn coordinator) 2026-09-02 23:52:33 +07:00
CrewVideoSection.tsx Add "The Part" — crew video/montage (YouTube + Instagram) 2026-09-02 23:59:50 +07:00