Browse Source

Merge branch 'main' into refactor/tailwind-pinia-datamodel

develop
Sandwich 2 years ago
committed by GitHub
parent
commit
f9b1927d42
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      relays.yaml
  2. 13
      scripts/relays.js

15
relays.yaml

@ -1,4 +1,5 @@
relays: relays:
- wss://relay.nostr.vision
- wss://nostr-3.orba.ca - wss://nostr-3.orba.ca
- wss://satstacker.cloud - wss://satstacker.cloud
- wss://freedom-relay.herokuapp.com/ws - wss://freedom-relay.herokuapp.com/ws
@ -59,6 +60,7 @@ relays:
- wss://nostr-relay.nonce.academy - wss://nostr-relay.nonce.academy
- wss://nostr.rewardsbunny.com - wss://nostr.rewardsbunny.com
- wss://nostr.slothy.win - wss://nostr.slothy.win
- wss://nostr-verif.slothy.win
- wss://nostr.coinos.io - wss://nostr.coinos.io
- wss://relay.nostropolis.xyz/websocket - wss://relay.nostropolis.xyz/websocket
- wss://lv01.tater.ninja - wss://lv01.tater.ninja
@ -83,7 +85,6 @@ relays:
- wss://nostr.jiashanlu.synology.me - wss://nostr.jiashanlu.synology.me
- wss://nostr.radixrat.com - wss://nostr.radixrat.com
- wss://nostr.shawnyeager.net - wss://nostr.shawnyeager.net
- wss://nostr.pobblelabs.org
- wss://relay.dev.kronkltd.net - wss://relay.dev.kronkltd.net
- wss://nostr2.namek.link - wss://nostr2.namek.link
- wss://nostr-dev.wellorder.net - wss://nostr-dev.wellorder.net
@ -165,3 +166,15 @@ relays:
- wss://echo.obsolete.org - wss://echo.obsolete.org
- wss://brb.io - wss://brb.io
- wss://nostr.massmux.com - wss://nostr.massmux.com
- wss://no.contry.xyz
- wss://relay.nostr.bg
- wss://nostr.uselessshit.co
- wss://brb.io
- wss://nostream.gromeul.eu
- wss://relay.nostr.ro
- wss://nostr.developer.li
- wss://nostr.screaminglife.io
- wss://deschooling.us
- wss://relay-pub.deschooling.us
- wss://nostr-pub1.southflorida.ninja
- wss://nostr.ncsa.illinois.edu

13
scripts/relays.js

@ -2,7 +2,8 @@ const { RelayPool, Relay } = require('nostr'),
crypto = require('crypto'), crypto = require('crypto'),
writeYamlFile = require('write-yaml-file'), writeYamlFile = require('write-yaml-file'),
fs = require('fs'), fs = require('fs'),
fetch = require('cross-fetch') fetch = require('cross-fetch'),
yaml= require('js-yaml');
const result = {}, const result = {},
relays_endpoint = 'https://nostr.watch/relays.json' relays_endpoint = 'https://nostr.watch/relays.json'
@ -47,9 +48,13 @@ const concatRelays = function(){
} }
async function getRelays(){ async function getRelays(){
return await fetch(relays_endpoint, { method: "Get" }) // return await fetch(relays_endpoint, { method: "Get" })
.then(res => res.json()) // .then(res => res.json())
.then(json => relaysKnown = json.relays) // .then(json => relaysKnown = json.relays)
const relaysObj = yaml.load(fs.readFileSync('./relays.yaml', 'utf8'))
relaysKnown = relaysObj.relays
console.log(relaysKnown)
return
} }
async function discover(){ async function discover(){

Loading…
Cancel
Save