I need a tool that can compile a long list of nostr relays ... can anyone point me to some code? (nostr-watch feels too big)

Reply to this note

Please Login to reply.

Discussion

Relay monitors. There's a NIP for it too. I have a stupid simple go bot that you can set up as a monitor.

I need the code sir. I need a tool that can build a gresh list every 24 hours

i think a quick nak | grep | uniq would get you something quick

I want that. but it needs crawling. how do I get the relay list?

i think itโ€™s kind 10002

nak req -k 10002 wss://nos.lol | jq '.tags[]' | grep 'wss://' | sort | uniq

I've been thinking that what we need is a bot that keeps an event updated with a list of available relays in the event tags. Then your software could just grab the event.

I need to do it myself

I had a python script that sampled some amount of relay list events, appended non traversed relays to a queue and count up the users for each relay.

I need that, can you share it?

just vibe coded a bash script for that using "nak" in the backend:

https://github.com/girino/nostr_relay_traverser

(it starts with one relay and gets all events of kind 3 and 10002 from it, then gets the new relays from this list and repeats for up to "THRESHOLD " levels.

That's amazing. Does it also use nip 66? Would you add that if not?

I currently does not (i was not aware of nip 66). I'll try to vibe code something that uses nip 66 exclusivelly.

added https://github.com/girino/nostr_relay_traverser/blob/main/nip66crawler.sh

this one uses exclusively nip66 (also vibe coded)