Commit graph

55 commits

Author SHA1 Message Date
dni ⚡
35584a230f
chore: add uv, linting, fixes (#39)
Some checks failed
CI / lint (push) Has been cancelled
/ release (push) Has been cancelled
CI / tests (push) Has been cancelled
/ pullrequest (push) Has been cancelled
* chore: add uv, linting, fixes
2025-10-30 10:43:27 +01:00
PatMulligan
15079c3e58
fix(nostrrelay): use schema-qualified table name in delete_events (#38) 2025-10-27 09:54:29 +02: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
21M4TW
5a1a400f45
-Two issues were dicovered in get_config_for_all_active_relays which led (#32)
to errors while loading relay configuration from the DB and that also
caused the loaded meta information to be invalid. Mandatory fields for
NostrRelay were not selected by the query, and a dictionary
representation of the meta object should not be returned as it causes
some members such as require_auth_filter and event_requires_auth to not
be accessible, leading to breaking exceptions.
2025-06-16 11:59:13 +03:00
Vlad Stan
3dc066fbd4
[fix] Ws api tests (#31) 2024-11-11 15:25:25 +02:00
dni ⚡
73054fd5ce
feat: update to v1.0.0 (#30) 2024-11-08 15:32:04 +02:00
dni ⚡
cc6752003a
feat: improve codequality and CI (#25)
* feat: improve codequality and CI
2024-08-30 13:20:23 +02:00
Tiago Vasconcelos
3c45acc4d5 copy changes
more copy
clean debugging... prints! lol
clean console logs
fix get users

Only get users that explicitly have been allowed or blocked
UI
UI-2
prevent getting all accounts (false, false is default)
remove client side filtering


remove prints
2023-07-26 11:28:20 +03:00
Vlad Stan
1a1875e177 fix: duplicate event 2023-04-06 17:31:26 +03:00
Vlad Stan
f19fb4a18e fix: delete account 2023-04-06 16:59:15 +03:00
Vlad Stan
855812cb8f refactor: extract NostrRelay 2023-02-17 14:44:39 +02:00
Vlad Stan
2ebc83a286 refactor: extract NostrFilter 2023-02-17 14:44:39 +02:00
Vlad Stan
6be0169ea9 refactor: extract NostrEvent 2023-02-17 14:44:39 +02:00
Vlad Stan
a1d7c474b0 feat: differentiate between publisher and author 2023-02-17 09:38:49 +02:00
Vlad Stan
aed098499a chore: code format 2023-02-16 14:19:21 +02:00
Vlad Stan
d0f38346e3 feat: basic account UI 2023-02-15 14:17:01 +02:00
Vlad Stan
58723a387f chore: code format 2023-02-15 10:49:36 +02:00
Vlad Stan
23547f5187 chore: code format 2023-02-13 14:41:33 +02:00
Vlad Stan
bd5957b443 feat: update account when join invoce paid 2023-02-13 14:12:37 +02:00
Vlad Stan
ebada934b0 chore: code format 2023-02-10 17:25:02 +02:00
Vlad Stan
8678090e7b feat: create invoice to join 2023-02-10 17:20:55 +02:00
Vlad Stan
db3ad2e32f feat: public relay page updates 2023-02-10 14:47:48 +02:00
Vlad Stan
d5aff47717 refactor: class renamings 2023-02-10 13:40:15 +02:00
Vlad Stan
1eda457067 chore: force py format 2023-02-10 12:16:25 +02:00
Vlad Stan
55f9142f3d fix: query for SQLite 2023-02-10 12:09:45 +02:00
Vlad Stan
339f2b70c1 feat: restrict storage 2023-02-10 11:43:18 +02:00
Vlad Stan
9fef72ae0c doc: add comment 2023-02-10 10:10:01 +02:00
Vlad Stan
f109833a36 feat: get_storage_for_public_key 2023-02-09 15:43:39 +02:00
Vlad Stan
c488f5d5e0 feat: store message size 2023-02-09 15:16:22 +02:00
Vlad Stan
bddab70677 feat: enforce query limit on relay side 2023-02-08 18:15:43 +02:00
Vlad Stan
534cf04210 feat: use RelayConfig for active relays 2023-02-08 10:21:26 +02:00
Vlad Stan
b098dc5d77 feat: clean-up when relay deleted 2023-02-08 09:29:14 +02:00
Vlad Stan
d0341911b9 refactor: extract NostrFilter.to_sql_components 2023-02-08 09:10:04 +02:00
Vlad Stan
25dde9571c feat: save relay extra config 2023-02-07 17:50:48 +02:00
Vlad Stan
4c9d1a4395 feat: init lnbits_relay_information 2023-02-07 12:21:23 +02:00
Vlad Stan
e4197ce66d fix: created_at search 2023-02-07 11:44:26 +02:00
Vlad Stan
f56e9e2e56 feat: block access to deactivated client 2023-02-06 17:42:27 +02:00
Vlad Stan
aff949fed5 feat: allow custom relay IDs 2023-02-06 16:58:29 +02:00
Vlad Stan
bc60551313 feat: toggle relays on and off 2023-02-06 16:33:08 +02:00
Vlad Stan
a849dea99f feat: add UI for basic relay operations 2023-02-06 15:30:05 +02:00
Vlad Stan
10ef9ee2ac feat: on meta update, replace old meta 2023-02-06 11:10:14 +02:00
Vlad Stan
57197b981d refactor: mark delete using query builder 2023-02-06 10:37:06 +02:00
Vlad Stan
f01ea6a237 refactor: delete using filter 2023-02-06 10:25:28 +02:00
Vlad Stan
2dfd70c38c refactor: query builder 2023-02-06 10:19:47 +02:00
Vlad Stan
282e65954b refactor: query builder 2023-02-06 10:07:00 +02:00
Vlad Stan
b0be06580a fat: support NIP09 delete event 2023-02-03 14:26:30 +02:00
Vlad Stan
8645bb6d05 refactor: extract query builder 2023-02-03 13:21:07 +02:00
Vlad Stan
b910f287d1 fix: query by multiple tags 2023-02-01 17:46:11 +02:00
Vlad Stan
d79901b4fb fix: throw on duplicate event 2023-02-01 15:29:41 +02:00
Vlad Stan
25d41d094c feat: add get_event 2023-02-01 14:32:41 +02:00