 
 extension Clink: ClinkPeerManager {
     public func createPeer<T: ClinkPeer>(withId peerId: String) -> T {
-        let peer = Clink.Peer(id: peerId)
+        let peer = T(id: peerId, peerData: [:])
         
         UserDefaults.standard.set(peer.toDict(), forKey: peer.id)
         

    }
    
    public func delete(peerWithId peerId: String) {
        UserDefaults.standard.removeObject(forKey: peer.id)
    }
}



            UserDefaults.standard.set(savedPeerIds, forKey: savedPeerIdsDefaultsKey)
        }
        
        return peer
    }
    
    public func update(peerWithId peerId: String, withPeerData data: [String: Any]) {
        guard let peer: Clink.Peer = self.getPeer(withId: peerId) else { return }
        
        peer.data = data
        
        UserDefaults.standard.set(peer.toDict(), forKey: peer.id)
    }
    
    public func getPeer<T: ClinkPeer>(withId peerId: String) -> T? {
        guard
            let peerDict = UserDefaults.standard.dictionary(forKey: peerId),
            let id = peerDict["id"] as? String,
            let peerData = peerDict["data"] as? [String: Any]
            else {
                return nil
        }
        
        return T(id: id, peerData: peerData)
    }
    
    public func getKnownPeers<T: ClinkPeer>() -> [T] {
