This is a non-functional refactor that organizes some classes and structs used by RelayPool under the same namespace. Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
15 lines
435 B
Swift
15 lines
435 B
Swift
//
|
|
// NostrAuth.swift
|
|
// damus
|
|
//
|
|
// Created by Charlie Fish on 12/18/23.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
func make_auth_request(keypair: FullKeypair, challenge_string: String, relay: RelayPool.Relay) -> NostrEvent? {
|
|
let tags: [[String]] = [["relay", relay.descriptor.url.absoluteString],["challenge", challenge_string]]
|
|
let event = NostrEvent(content: "", keypair: keypair.to_keypair(), kind: 22242, tags: tags)
|
|
return event
|
|
}
|