damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 72676623307990cd81a24f1dacc34fd124bb5ebe
parent 1da0a8ee52a401a310037c36d4dee6ed2bf0a45d
Author: William Casarin <jb55@jb55.com>
Date:   Tue,  9 May 2023 18:39:00 -0700

relay: introduce ephemeral relays

Epehmeral relays are relays that are connected in your relay pool but
not a part of your official relay list. This will be used by
nostr-wallet-connect to communicate with an NWC relay to pay invoices.

Diffstat:
Mdamus/Nostr/Relay.swift | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/damus/Nostr/Relay.swift b/damus/Nostr/Relay.swift @@ -10,8 +10,16 @@ import Foundation public struct RelayInfo: Codable { let read: Bool let write: Bool + let ephemeral: Bool + + init(read: Bool, write: Bool, ephemeral: Bool = false) { + self.read = read + self.write = write + self.ephemeral = ephemeral + } - static let rw = RelayInfo(read: true, write: true) + static let rw = RelayInfo(read: true, write: true, ephemeral: false) + static let ephemeral = RelayInfo(read: true, write: true, ephemeral: true) } public struct RelayDescriptor {