use nostr.watch api

This commit is contained in:
hzrd149 2023-02-15 14:11:46 -06:00
parent 9b46bf8bca
commit 228c3435ee
3 changed files with 3 additions and 315 deletions

View File

@ -1,312 +0,0 @@
{
"_": "Download from https://nostr.watch/relays.json",
"relays": [
"was://nostr.pleb.network",
"wss://astral.ninja",
"wss://bitcoiner.social",
"wss://blg.nostr.sx",
"wss://brb.io",
"wss://btc.klendazu.com",
"wss://deconomy-netser.ddns.net:2121",
"wss://deschooling.us",
"wss://e.nos.lol",
"wss://eden.nostr.land",
"wss://eden.nostr.land",
"wss://expensive-relay.fiatjaf.com",
"wss://foolay.nostr.moe",
"wss://freedom-relay.herokuapp.com/ws",
"wss://freespeech.casa",
"wss://global.relay.red",
"wss://jiggytom.ddns.net",
"wss://knostr.neutrine.com:8880",
"wss://knostr.neutrine.com",
"wss://lightningrelay.com",
"wss://lv01.tater.ninja",
"wss://Merrcurr.up.railway.app",
"wss://middling.myddns.me:8080",
"wss://mule.platanito.org",
"wss://no-str.org",
"wss://no.contry.xyz",
"wss://no.str.cr",
"wss://no.str.watch",
"wss://node01.nostress.cc",
"wss://nos.lol",
"wss://nostr-01.bolt.observer",
"wss://nostr-01.dorafactory.org",
"wss://nostr-1.nbo.angani.co",
"wss://nostr-2.orba.ca",
"wss://nostr-2.zebedee.cloud",
"wss://nostr-3.orba.ca",
"wss://nostr-alpha.gruntwerk.org",
"wss://nostr-bg01.ciph.rs",
"wss://nostr-dev.wellorder.net",
"wss://nostr-pub.semisol.dev",
"wss://nostr-pub.wellorder.net",
"wss://nostr-pub1.southflorida.ninja",
"wss://nostr-relay.alekberg.net",
"wss://nostr-relay.australiaeast.cloudapp.azure.com",
"wss://nostr-relay.bitcoin.ninja",
"wss://nostr-relay.derekross.me",
"wss://nostr-relay.digitalmob.ro",
"wss://nostr-relay.freeberty.net",
"wss://nostr-relay.freedomnode.com",
"wss://nostr-relay.gkbrk.com",
"wss://nostr-relay.j3s7m4n.com",
"wss://nostr-relay.lnmarkets.com",
"wss://nostr-relay.nonce.academy",
"wss://nostr-relay.pcdkd.fyi",
"wss://nostr-relay.schnitzel.world",
"wss://nostr-relay.smoove.net",
"wss://nostr-relay.texashedge.xyz",
"wss://nostr-relay.trustbtc.org",
"wss://nostr-relay.untethr.me",
"wss://nostr-relay.usebitcoin.space",
"wss://nostr-relay.wolfandcrow.tech",
"wss://nostr-sg.com",
"wss://nostr-sg.com",
"wss://nostr-verif.slothy.win",
"wss://nostr-verified.wellorder.net",
"wss://nostr.1f52b.xyz",
"wss://nostr.21crypto.ch",
"wss://nostr.21m.fr",
"wss://nostr.8e23.net",
"wss://nostr.actn.io",
"wss://nostr.ahaspharos.de",
"wss://nostr.aozing.com",
"wss://nostr.app.runonflux.io",
"wss://nostr.argdx.net",
"wss://nostr.arguflow.gg",
"wss://nostr.bch.ninja",
"wss://nostr.bingtech.tk",
"wss://nostr.bitcoin-21.org",
"wss://nostr.bitcoin-21.org",
"wss://nostr.bitcoin.sex",
"wss://nostr.bitcoinplebs.de",
"wss://nostr.blockchaincaffe.it",
"wss://nostr.blockpower.capital",
"wss://nostr.blocs.fr",
"wss://nostr.bongbong.com",
"wss://nostr.bostonbtc.com",
"wss://nostr.cercatrova.me",
"wss://nostr.chainofimmortals.net",
"wss://nostr.chaker.net",
"wss://nostr.cheeserobot.org",
"wss://nostr.cizmar.net",
"wss://nostr.coinos.io",
"wss://nostr.coinsamba.com.br",
"wss://nostr.com.de",
"wss://nostr.coollamer.com",
"wss://nostr.corebreach.com",
"wss://nostr.cro.social",
"wss://nostr.d11n.net",
"wss://nostr.datamagik.com",
"wss://nostr.delo.software",
"wss://nostr.demovement.net",
"wss://nostr.developer.li",
"wss://nostr.digitalreformation.info",
"wss://nostr.drss.io",
"wss://nostr.easydns.ca",
"wss://nostr.einundzwanzig.space",
"wss://nostr.ethtozero.fr",
"wss://nostr.f44.dev",
"wss://nostr.fly.dev",
"wss://nostr.fmt.wiz.biz",
"wss://nostr.formigator.eu",
"wss://nostr.fractalized.ovh",
"wss://nostr.globals.fans",
"wss://nostr.gromeul.eu",
"wss://nostr.gruntwerk.org",
"wss://nostr.hackerman.pro",
"wss://nostr.handyjunky.com",
"wss://nostr.hugo.md",
"wss://nostr.hyperlingo.com",
"wss://nostr.inosta.cc",
"wss://nostr.island.network",
"wss://nostr.itssilvestre.com",
"wss://nostr.jiashanlu.synology.me",
"wss://nostr.jimc.me",
"wss://nostr.klabo.blog",
"wss://nostr.kollider.xyz",
"wss://nostr.lapalomilla.mx",
"wss://nostr.leximaster.com",
"wss://nostr.lnorb.com",
"wss://nostr.lnprivate.network",
"wss://nostr.localhost.re",
"wss://nostr.lordkno.ws",
"wss://nostr.lu.ke",
"wss://nostr.mado.io",
"wss://nostr.massmux.com",
"wss://nostr.mikedilger.com",
"wss://nostr.milou.lol",
"wss://nostr.milou.lol",
"wss://nostr.mom",
"wss://nostr.mouton.dev",
"wss://nostr.mrbits.it",
"wss://nostr.mustardnodes.com",
"wss://nostr.mwmdev.com",
"wss://nostr.namek.link",
"wss://nostr.ncsa.illinois.edu",
"wss://nostr.nikolaj.online",
"wss://nostr.nodeofsven.com",
"wss://nostr.noones.com",
"wss://nostr.nordlysln.net",
"wss://nostr.nymsrelay.com",
"wss://nostr.ono.re",
"wss://nostr.onsats.org",
"wss://nostr.oooxxx.ml",
"wss://nostr.openchain.fr",
"wss://nostr.orba.ca",
"wss://nostr.oxtr.dev",
"wss://nostr.pleb.network",
"wss://nostr.plebchain.org",
"wss://nostr.pobblelabs.org",
"wss://nostr.radixrat.com",
"wss://nostr.randomdevelopment.biz",
"wss://nostr.rdfriedl.com",
"wss://nostr.relayer.se",
"wss://nostr.rewardsbunny.com",
"wss://nostr.robotechy.com",
"wss://nostr.rocks",
"wss://nostr.roundrockbitcoiners.com",
"wss://nostr.sandwich.farm",
"wss://nostr.satoshi.fun",
"wss://nostr.satsophone.tk",
"wss://nostr.screaminglife.io",
"wss://nostr.sebastix.dev",
"wss://nostr.sectiontwo.org",
"wss://nostr.semisol.dev",
"wss://nostr.sg",
"wss://nostr.shadownode.org",
"wss://nostr.shawnyeager.net",
"wss://nostr.shmueli.org",
"wss://nostr.sidnlabs.nl",
"wss://nostr.simatime.com",
"wss://nostr.slothy.win",
"wss://nostr.snblago.com",
"wss://nostr.sovbit.com",
"wss://nostr.supremestack.xyz",
"wss://nostr.swiss-enigma.ch",
"wss://nostr.thesimplekid.com",
"wss://nostr.thibautrey.fr",
"wss://nostr.tunnelsats.com",
"wss://nostr.unknown.place",
"wss://nostr.up.railway.app",
"wss://nostr.uselessshit.co",
"wss://nostr.utxo.lol",
"wss://nostr.vulpem.com",
"wss://nostr.w3ird.tech",
"wss://nostr.walletofsatoshi.com",
"wss://nostr.whoop.ph",
"wss://nostr.wine",
"wss://nostr.wine",
"wss://nostr.xpersona.net",
"wss://nostr.yael.at",
"wss://nostr.zaprite.io",
"wss://nostr.zebedee.cloud",
"wss://nostr.zenon.wtf",
"wss://nostr.zerofeerouting.com",
"wss://nostr.zkid.social",
"wss://nostr.zoomout.chat",
"wss://nostr1.starbackr.me",
"wss://nostr1.tunnelsats.com",
"wss://nostr2.actn.io",
"wss://nostr2.namek.link",
"wss://nostr21.com",
"wss://nostr3.actn.io",
"wss://nostrafrica.pcdkd.fyi",
"wss://nostream.gromeul.eu",
"wss://nostream.kinchie.snowinning.com",
"wss://nostream.nostrly.io",
"wss://nostrex.fly.dev",
"wss://nostrical.com",
"wss://nostrich.friendship.tw",
"wss://nostrrelay.com",
"wss://offchain.pub",
"wss://paid.no.str.cr",
"wss://paid.spore.ws",
"wss://pow32.nostr.land",
"wss://private-nostr.v0l.io",
"wss://private.red.gb.net",
"wss://public.nostr.swissrouting.com",
"wss://relay-pub.deschooling.us",
"wss://relay.21spirits.io",
"wss://relay.bitid.nz",
"wss://relay.bleskop.com",
"wss://relay.boring.surf",
"wss://relay.cryptocculture.com",
"wss://relay.current.fyi",
"wss://relay.cynsar.foundation",
"wss://relay.damus.io",
"wss://relay.dev.kronkltd.net",
"wss://relay.farscapian.com",
"wss://relay.futohq.com",
"wss://relay.grunch.dev",
"wss://relay.honk.pw",
"wss://relay.koreus.social",
"wss://relay.kronkltd.net",
"wss://relay.lexingtonbitcoin.org",
"wss://relay.minds.com/nostr/v1/ws",
"wss://relay.minds.io/nostr/v1/ws",
"wss://relay.n057r.club",
"wss://relay.nosphr.com",
"wss://relay.nostr-latam.link",
"wss://relay.nostr.ae",
"wss://relay.nostr.africa",
"wss://relay.nostr.au",
"wss://relay.nostr.band",
"wss://relay.nostr.band/restricted",
"wss://relay.nostr.bg",
"wss://relay.nostr.ch",
"wss://relay.nostr.express",
"wss://relay.nostr.hu",
"wss://relay.nostr.info",
"wss://relay.nostr.lu",
"wss://relay.nostr.moe",
"wss://relay.nostr.nu",
"wss://relay.nostr.or.jp",
"wss://relay.nostr.pro",
"wss://relay.nostr.ro",
"wss://relay.nostr.scot",
"wss://relay.nostr.vision",
"wss://relay.nostr.wf",
"wss://relay.nostr.wirednet.jp",
"wss://relay.nostr.xyz",
"wss://relay.nostrgraph.net",
"wss://relay.nostrgraph.net",
"wss://relay.nostrich.de",
"wss://relay.nostrich.land",
"wss://relay.nostriches.org",
"wss://relay.nostrid.com",
"wss://relay.nostrmoto.xyz",
"wss://relay.nostrology.org",
"wss://relay.nostropolis.xyz/websocket",
"wss://relay.nostrprotocol.net",
"wss://relay.nostrview.com",
"wss://relay.nostrzoo.com",
"wss://relay.nyx.ma",
"wss://relay.oldcity-bitcoiners.info",
"wss://relay.orangepill.dev",
"wss://relay.plebstr.com",
"wss://relay.r3d.red",
"wss://relay.ryzizub.com",
"wss://relay.sendstr.com",
"wss://relay.snort.social",
"wss://relay.sovereign-stack.org",
"wss://relay.stoner.com",
"wss://relay.taxi",
"wss://relay.thes.ai",
"wss://relay.valireum.net",
"wss://relay.zeh.app",
"wss://rsr.uyky.net:30443",
"wss://rsslay.nostr.moe",
"wss://rsslay.nostr.net",
"wss://satstacker.cloud",
"wss://sg.qemura.xyz",
"wss://spleenrider.herokuapp.com",
"wss://spore.ws",
"wss://student.chadpolytechnic.com",
"wss://tmp-relay.cesc.trade",
"wss://wizards.wormrobot.org",
"wss://zur.nostr.sx"
]
}

View File

@ -6,9 +6,9 @@ export type RelayUrlInputProps = Omit<InputProps, "type">;
export const RelayUrlInput = ({ ...props }: RelayUrlInputProps) => {
const { value: relaysJson, loading: loadingRelaysJson } = useAsync(async () =>
fetch("/relays.json").then((res) => res.json() as Promise<{ relays: string[] }>)
fetch("https://api.nostr.watch/v1/online").then((res) => res.json() as Promise<string[]>)
);
const relaySuggestions = relaysJson?.relays ? unique(relaysJson?.relays) : [];
const relaySuggestions = unique(relaysJson ?? []);
return (
<>

View File

@ -39,7 +39,7 @@ export function linkEvents(events: NostrEvent[]) {
reply.replies = idToChildren[id]?.map((e) => replies.get(e.id) as ThreadItem) ?? [];
reply.replies.sort((a, b) => a.event.created_at - b.event.created_at);
reply.replies.sort((a, b) => b.event.created_at - a.event.created_at);
}
return replies;