Files
grimoire/tsconfig.node.tsbuildinfo
Claude 42694be80d feat: Add NIP-28 public chat channel support
Implements full NIP-28 public chat channel support alongside existing NIP-29 relay groups and NIP-53 live activity chat.

## Implementation

**Adapter** (src/lib/chat/adapters/nip-28-adapter.ts):
- Multi-relay channel coordination (no single authority)
- Parses note1/nevent1 identifiers (kind 40 creation events)
- Resolves channel metadata from kind 41 events
- Loads kind 42 messages with NIP-10 threading
- Supports reply threading via marked e-tags (root/reply)
- Publishes messages with proper NIP-10 tag structure

**Feed Renderers**:
- Kind40Renderer (ChannelCreationRenderer) - Channel creation events with "Open Channel" button
- Kind41Renderer (ChannelMetadataRenderer) - Channel metadata updates
- Kind42Renderer (ChannelMessageRenderer) - Channel messages with threading and channel context

**Detail Renderers**:
- Kind40DetailRenderer (ChannelCreationDetailRenderer) - Full channel info with metadata, relays, and open button
- Kind42DetailRenderer (ChannelMessageDetailRenderer) - Message with thread context and channel info

**Integration**:
- Updated renderer registry (src/components/nostr/kinds/index.tsx)
- Enabled Nip28Adapter in chat-parser.ts (Phase 3 priority)
- Added kind 42 to CHAT_KINDS constant
- Updated chat command documentation with NIP-28 examples

**Tests**:
- Comprehensive unit tests for Nip28Adapter identifier parsing
- Protocol and capability verification

## Usage

```bash
chat note1xyz...                  # Open channel by event ID
chat nevent1xyz...                # Open channel with relay hints
```

## Architecture Notes

NIP-28 vs NIP-29:
- NIP-28: Multi-relay, open participation, client-side moderation
- NIP-29: Single relay authority, membership enforcement, server-side moderation
- Both coexist - users choose based on censorship resistance vs moderation needs

Threading:
- Uses NIP-10 marked e-tags (root → kind 40, reply → parent message)
- Different from NIP-29's simpler q-tag replies
- Fully integrated with ChatViewer's reply preview system
2026-01-18 07:53:09 +00:00

1 line
61 B
Plaintext

{"root":["./vite.config.ts"],"errors":true,"version":"5.9.3"}