| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Remove deletion processing logic in favor of simpler approach:
- Remove deletions table from schema
- Delete deletions.go and deletions_test.go
- Remove ProcessDeletion from EventStore interface
- Kind 5 events now stored like any other event (no special handling)
- Update storage test to expect 2 tables instead of 3
- All 41 tests passing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NIP-11 (Relay Information Document):
- Serves relay metadata at GET / with Accept: application/nostr+json
- Returns name, description, supported NIPs, limitations
- CORS headers for browser compatibility
NIP-09 (Event Deletion):
- Kind 5 events delete events referenced in 'e' tags
- Only authors can delete their own events
- Soft delete (marks deleted=1)
- Records deletion in deletions table
- Works across all protocols (gRPC, Connect, WebSocket)
Fixed deletions schema:
- deleted_event_id as PRIMARY KEY (not deletion_event_id)
- Allows one deletion event to delete multiple events
3 new tests, 44 total tests passing
Supported NIPs now: 1, 9, 11
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Query implementation:
- QueryEvents method with filter support
- Full NIP-01 filter support (ids, authors, kinds, tags, since, until, limit)
- ID and pubkey prefix matching
- Tag filtering using SQLite JSON functions
- Multiple filter UNION support
- DESC ordering by created_at
- Optional canonical JSON inclusion
23 tests passing, 1322 total lines
|
|
|
Storage implementation:
- Concrete type with constructor (consumer-side interfaces)
- Event storage: protobuf + zstd-compressed canonical JSON
- Schema: events, deletions, replaceable_events, auth_challenges, rate_limits
- WAL mode, STRICT typing, optimized indexes
- Methods: StoreEvent, GetEvent, GetEventWithCanonical, DeleteEvent
Dependencies:
- modernc.org/sqlite v1.45.0 (pure Go SQLite driver)
- github.com/klauspost/compress v1.18.4 (zstd compression)
366 lines, 10 tests passing
|