fix: implement proper NIP-51 bookmark fetching from nostr relays

- Add RelayPool to connect to nostr relays (damus.io, nos.lol, snort.social)
- Fix bookmark fetching to actually query relays instead of empty local store
- Use eventStore.filters() with Observable subscription to fetch kind 10003 events
- Add proper RxJS imports for takeUntil and timer
- Implement 5-second timeout for relay queries
- Add applesauce-relay dependency for relay connectivity
- Fix critical bug where bookmarks were never fetched from network

This ensures we're actually displaying kind:10003 bookmark events from the
logged-in user as specified in NIP-51, not just querying an empty local store.
This commit is contained in:
Gigi
2025-10-02 07:28:12 +02:00
parent 0369ece6f4
commit b245a11ade
6 changed files with 88 additions and 20 deletions

17
node_modules/.package-lock.json generated vendored
View File

@@ -1943,6 +1943,23 @@
"url": "lightning:nostrudel@geyser.fund"
}
},
"node_modules/applesauce-relay": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/applesauce-relay/-/applesauce-relay-3.1.0.tgz",
"integrity": "sha512-YseV51O3pc9IIX9MoP4XrVmkUq6a0u8h7n/B4zg0Y3bCQEs415LbM3UwIwZzF1DAEnphOu2xXgkH/9QCg5HvFg==",
"license": "MIT",
"dependencies": {
"@noble/hashes": "^1.7.1",
"applesauce-core": "^3.1.0",
"nanoid": "^5.0.9",
"nostr-tools": "~2.15",
"rxjs": "^7.8.1"
},
"funding": {
"type": "lightning",
"url": "lightning:nostrudel@geyser.fund"
}
},
"node_modules/applesauce-signers": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/applesauce-signers/-/applesauce-signers-3.1.0.tgz",