diff --git a/.env-sample b/.env-sample index 4767d96..cc8ae54 100644 --- a/.env-sample +++ b/.env-sample @@ -1,2 +1,6 @@ +# User private key in nsec format NSEC_PRIVKEY='nsec1...' -MOSTRO_PUBKEY='npub1...' \ No newline at end of file +# Mostro pubkey in npub format +MOSTRO_PUBKEY='npub1...' +# Comma-separated list of relays +RELAYS='wss://relay.nostr.vision,wss://nostr.zebedee.cloud,wss://nostr.slothy.win,wss://nostr.rewardsbunny.com,wss://nostr.supremestack.xyz,wss://nostr.shawnyeager.net,wss://relay.nostrmoto.xyz,wss://nostr.roundrockbitcoiners.com' \ No newline at end of file diff --git a/src/util.rs b/src/util.rs index e0713f2..a36ecd3 100644 --- a/src/util.rs +++ b/src/util.rs @@ -45,29 +45,8 @@ pub async fn connect_nostr() -> Result { // Create new client let client = Client::new(&my_keys); - - let relays = vec![ - "wss://relay.nostr.vision", - "wss://nostr.zebedee.cloud", - "wss://nostr.slothy.win", - "wss://nostr.rewardsbunny.com", - "wss://nostr.supremestack.xyz", - "wss://nostr.shawnyeager.net", - "wss://relay.nostrmoto.xyz", - "wss://nostr.roundrockbitcoiners.com", - "wss://nostr.utxo.lol", - "wss://nostr-relay.schnitzel.world", - "wss://sg.qemura.xyz", - "wss://nostr.digitalreformation.info", - "wss://nostr-relay.usebitcoin.space", - "wss://nostr.bch.ninja", - "wss://nostr.massmux.com", - "wss://nostr-pub1.southflorida.ninja", - "wss://relay.nostr.nu", - "wss://nostr.easydns.ca", - "wss://nostrical.com", - "wss://relay.damus.io", - ]; + let relays = var("RELAYS").expect("RELAYS is not set"); + let relays = relays.split(',').collect::>(); // Add relays for r in relays.into_iter() {