diff --git a/hbs2-core/hbs2-core.cabal b/hbs2-core/hbs2-core.cabal index b1935fe3..42082057 100644 --- a/hbs2-core/hbs2-core.cabal +++ b/hbs2-core/hbs2-core.cabal @@ -97,6 +97,7 @@ library , HBS2.Net.Proto.PeerMeta , HBS2.Net.Proto.Sessions , HBS2.Net.Proto.RefLog + , HBS2.Net.Proto.RefChan , HBS2.Net.Proto.Types , HBS2.OrDie , HBS2.Prelude diff --git a/hbs2-core/lib/HBS2/Net/Proto/RefChan.hs b/hbs2-core/lib/HBS2/Net/Proto/RefChan.hs new file mode 100644 index 00000000..a03d27ab --- /dev/null +++ b/hbs2-core/lib/HBS2/Net/Proto/RefChan.hs @@ -0,0 +1,41 @@ +{-# Language UndecidableInstances #-} +{-# Language AllowAmbiguousTypes #-} +{-# Language TemplateHaskell #-} +module HBS2.Net.Proto.RefChan where + +import HBS2.Prelude.Plated +-- import HBS2.Hash +-- import HBS2.Clock +-- import HBS2.Net.Proto +-- import HBS2.Net.Auth.Credentials +-- import HBS2.Base58 +-- import HBS2.Events +-- import HBS2.Net.Proto.Peer +-- import HBS2.Net.Proto.Sessions +import HBS2.Data.Types.Refs + +-- import HBS2.System.Logger.Simple + +-- import Data.Maybe +-- import Data.Hashable +-- import Data.ByteString (ByteString) +-- import Type.Reflection (someTypeRep) +import Lens.Micro.Platform + + +data RefChanACL e = + RefChanACLImmediate + deriving stock (Generic) + +data RefChanHead e = + RefChanHead + { _refChanHeadPrev :: Maybe HashRef + , _refChanHeadVersion :: Integer + , _refChanHeadHistory :: Maybe HashRef + , _refChanHeadACL :: RefChanACL e + } + deriving stock (Generic) + + +makeLenses ''RefChanHead +