Commit graph

20 commits

Author SHA1 Message Date
Patrick Mulligan
8547864254 docs: Update README with complete NIP-09 deletion support
Updated NIP-09 section to document full implementation including:
  - 'e' tags for deleting regular events by event ID
  - 'a' tags for deleting addressable events by address format (kind:pubkey:d-identifier)

  This reflects the implementation added in commits 3ba3318 and 538fe42 which brought the relay into full NIP-09 compliance.
2025-11-17 00:01:21 +01:00
PatMulligan
22df5868de
FEAT: Implement NIP-01 Addressable Events Support (#33)
* Implement NIP-16 parameterized replaceable events

Add support for parameterized replaceable events (kinds 30000-39999) to
properly
handle Nostr marketplace product and stall updates according to NIP-16
specification.

Changes:
- Add is_parameterized_replaceable_event property to NostrEvent
- Implement automatic deletion of previous versions when new
parameterized replaceable event is received
- Add 'd' tag filtering support to NostrFilter for parameterized
replacement logic
- Update SQL query generation to handle 'd' tag joins

Fixes issue where product updates would create duplicate entries instead
of
replacing previous versions, ensuring only the latest version remains
visible.

* Refactor event handling for addressable events

Renamed the property is_parameterized_replaceable_event to is_addressable_event in NostrEvent to align with NIP-01 specifications (previously NIP-16). Updated the client_connection.py to utilize the new property for extracting 'd' tag values for addressable replacement, ensuring proper event handling in the relay system.

* Refactor tag filtering logic in NostrFilter

Updated the tag filtering mechanism to ensure that the filter only fails if the specified tags ('e' and 'p') are not found. This change improves clarity and maintains functionality by allowing for more precise control over event filtering.

* update readme

* Fix addressable event deletion and SQL schema issues

- Fix Pydantic field alias usage for d tag filtering (use #d instead of
d)
- Remove nostrrelay schema prefixes from SQL table references
- Implement subquery approach for DELETE operations with JOINs
- Resolve SQLite DELETE syntax incompatibility with JOIN statements
- Ensure NIP-33 compliance: only delete events with matching d tag
values
2025-09-10 16:40:40 +03:00
Vlad Stan
ffb0177003 chore: code format 2023-02-21 16:20:19 +02:00
Vlad Stan
2d4e836676
doc: summary 2023-02-17 15:13:37 +02:00
Vlad Stan
8c24109dd3
doc: fix headers 2023-02-17 12:21:02 +02:00
Vlad Stan
eaf0979254
doc: small fixes 2023-02-17 12:19:45 +02:00
Vlad Stan
012d861d16
doc: small fixes 2023-02-17 12:17:47 +02:00
Vlad Stan
bae7d284b3
doc: add accounts 2023-02-17 12:13:39 +02:00
Vlad Stan
d38b3c73ff
doc: add Config 2023-02-17 12:06:07 +02:00
Vlad Stan
de25a7a12d
doc: basic config tab 2023-02-17 11:54:05 +02:00
Vlad Stan
fd18ebe015
doc: payment basics 2023-02-17 11:40:09 +02:00
Vlad Stan
1dc6ddf9c5
doc: create relay 2023-02-17 11:08:32 +02:00
Vlad Stan
afde9ae37c
doc: mark NIP16 done 2023-02-17 09:55:57 +02:00
Vlad Stan
b5f7aa0c78
doc: updated NIP 04 2023-02-16 18:09:48 +02:00
Vlad Stan
a120394304
doc: more nips 2023-02-16 16:56:04 +02:00
Vlad Stan
6130de3987
doc: nip 15 & 16 2023-02-16 16:36:02 +02:00
Vlad Stan
1a300d4528
doc: nore NIP updates 2023-02-16 16:30:30 +02:00
Vlad Stan
1099fe7e87
doc: supported nips 1 2023-02-16 14:50:40 +02:00
Vlad Stan
dfda2367a2 feat: add payment for stoeage 2023-02-13 17:49:10 +02:00
Vlad Stan
4b82905f78 feat: extracted 2023-01-30 14:40:55 +02:00