aboutsummaryrefslogtreecommitdiff
path: root/src/Ssb/Discovery.hs
blob: 352020ed24b7d76678bb2a1fd60a174eafe5c8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- | This module implements local discovery of Scuttlebutt peers.
--
-- https://ssbc.github.io/scuttlebutt-protocol-guide/#discovery

module Ssb.Discovery where

import           Protolude

import           Ssb.Network
import           Ssb.Identity

-- | default Scuttlebutt Server Port
defaultPort :: Port
defaultPort = "8008"

-- | Advertisement messages are emitted on the local network for discovery of
-- peers.
data Advertisement = Advertisement
  { ipAddress :: Host
  , port      :: Port
  , publicKey :: PublicKey
  } deriving (Eq)