Why Nostr? What is Njump?
2024-09-23 19:55:23

Silberengel on Nostr: I should probably show more devs how I did this. Tony was just pulling the API list, ...

I should probably show more devs how I did this.
Tony was just pulling the API list, on the fly, and had some relays hard-coded as a fallback, if the list wasn't reachable.

It's over 700 relays, now, though. Takes forever, unless you use threading or something. Or workers. Only really worth it for a wide search or for broadcasting delete events.

https://api.nostr.watch/
Here's how I get around using blastr. I looked where he gets the relay list from. He just uses the API from Nostr.Watch.

```
// download a list of active relays
$url = "https://api.nostr.watch/v1/online";
$page = file_get_contents($url);
$requestedRelays = json_decode($page, true);
sort($requestedRelays);
```
Author Public Key
npub1l5sga6xg72phsz5422ykujprejwud075ggrr3z2hwyrfgr7eylqstegx9z