wip some initial relay bootstrap logic
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
import SwiftUI
|
||||
import Starscream
|
||||
|
||||
let BOOTSTRAP_RELAYS = [
|
||||
"wss://relay.damus.io",
|
||||
"wss://nostr-pub.wellorder.net",
|
||||
"wss://nostr-relay.freeberty.net",
|
||||
"wss://nostr-relay.untethr.me",
|
||||
]
|
||||
|
||||
struct TimestampedProfile {
|
||||
let profile: Profile
|
||||
let timestamp: Int64
|
||||
@@ -327,14 +334,11 @@ struct ContentView: View {
|
||||
|
||||
func connect() {
|
||||
let pool = RelayPool()
|
||||
|
||||
add_relay(pool, "wss://relay.damus.io")
|
||||
//add_relay(pool, "wss://nostr-pub.wellorder.net")
|
||||
//add_relay(pool, "wss://nostr.bitcoiner.social")
|
||||
//add_relay(pool, "ws://monad.jb55.com:8080")
|
||||
//add_relay(pool, "wss://nostr-relay.freeberty.net")
|
||||
//add_relay(pool, "wss://nostr-relay.untethr.me")
|
||||
|
||||
|
||||
for relay in BOOTSTRAP_RELAYS {
|
||||
add_relay(pool, relay)
|
||||
}
|
||||
|
||||
pool.register_handler(sub_id: sub_id, handler: home.handle_event)
|
||||
|
||||
self.damus_state = DamusState(pool: pool, keypair: keypair,
|
||||
|
||||
Reference in New Issue
Block a user