TipCounter.swift (457B)
1 // 2 // TipCounter.swift 3 // damus 4 // 5 // Created by William Casarin on 2022-05-11. 6 // 7 8 import Foundation 9 10 class TipCounter { 11 var tips: [String: Int64] = [:] 12 var user_tips: [String: Set<String>] = [:] 13 var our_tips: [String: NostrEvent] = [:] 14 var our_pubkey: String 15 16 enum CountResult { 17 case already_tipped 18 case success(Int64) 19 } 20 21 init (our_pubkey: String) { 22 self.our_pubkey = our_pubkey 23 } 24 } 25