NostrAuth.swift (425B)
1 // 2 // NostrAuth.swift 3 // damus 4 // 5 // Created by Charlie Fish on 12/18/23. 6 // 7 8 import Foundation 9 10 func make_auth_request(keypair: FullKeypair, challenge_string: String, relay: Relay) -> NostrEvent? { 11 let tags: [[String]] = [["relay", relay.descriptor.url.absoluteString],["challenge", challenge_string]] 12 let event = NostrEvent(content: "", keypair: keypair.to_keypair(), kind: 22242, tags: tags) 13 return event 14 }