wip some initial relay bootstrap logic

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-06-18 08:20:20 -07:00
parent 4da93b7630
commit 4cd48d3143
6 changed files with 73 additions and 11 deletions

View File

@@ -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,