damus

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

LoginNotify.swift (445B)


      1 //
      2 //  LoginNotify.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-07-30.
      6 //
      7 
      8 import Foundation
      9 
     10 struct LoginNotify: Notify {
     11     typealias Payload = Keypair
     12     var payload: Keypair
     13 }
     14 
     15 extension NotifyHandler {
     16     static var login: NotifyHandler<LoginNotify> {
     17         .init()
     18     }
     19 }
     20 
     21 extension Notifications {
     22     static func login(_ keypair: Keypair) -> Notifications<LoginNotify> {
     23         .init(.init(payload: keypair))
     24     }
     25 }