nostrrelay/relay
Patrick Mulligan 8bfd792548 Add NIP-09 support for parameterized replaceable events (NIP-33)
Extended NIP-09 deletion event handling to support both regular events
and parameterized replaceable events (NIP-33).

**Previous behavior:**
- Only handled 'e' tags (regular event IDs)
- Did not support 'a' tags for addressable/replaceable events

**New behavior:**
- Handles both 'e' tags (event IDs) and 'a' tags (event addresses)
- Parses 'a' tag format: kind:pubkey:d-identifier
- Validates deletion author matches event address pubkey (NIP-09 requirement)
- Creates appropriate filters for each deletion type

**Implementation:**
- Added parsing for 'a' tag event addresses
- Extract kind, pubkey, and d-tag from address format
- Build NostrFilter with authors, kinds, and d-tag parameters
- Collect all event IDs to delete from both 'e' and 'a' tags
- Mark matching events as deleted in single operation

This enables proper deletion of parameterized replaceable events like
calendar events (kind 31922-31924), long-form content (kind 30023),
and other addressable event kinds.

Implements NIP-09: https://github.com/nostr-protocol/nips/blob/master/09.md
Supports NIP-33: https://github.com/nostr-protocol/nips/blob/master/33.md
2025-11-17 00:01:21 +01:00
..
__init__.py refactor: extract client_connection 2023-02-17 14:44:39 +02:00
client_connection.py Add NIP-09 support for parameterized replaceable events (NIP-33) 2025-11-17 00:01:21 +01:00
client_manager.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00
event.py refactor: get rid of secp lib (#40) 2025-11-04 10:30:43 +02:00
event_validator.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00
filter.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00
relay.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00