HeadlessDamusState.swift (769B)
1 // 2 // HeadlessDamusState.swift 3 // damus 4 // 5 // Created by Daniel D’Aquino on 2023-11-27. 6 // 7 8 import Foundation 9 10 /// HeadlessDamusState 11 /// 12 /// A protocl for a lighter headless alternative to DamusState that does not have dependencies on View objects or UI logic. 13 /// This is useful in limited environments (e.g. Notification Service Extension) where we do not want View/UI dependencies 14 protocol HeadlessDamusState { 15 var ndb: Ndb { get } 16 var settings: UserSettingsStore { get } 17 var contacts: Contacts { get } 18 var mutelist_manager: MutelistManager { get } 19 var keypair: Keypair { get } 20 var profiles: Profiles { get } 21 var zaps: Zaps { get } 22 var lnurls: LNUrls { get } 23 24 @discardableResult 25 func add_zap(zap: Zapping) -> Bool 26 }