~haskell-guy/ssb-haskell

ref: 41cde99ec6189dbecca6803a5aa4f6f18142e8ba ssb-haskell/src/Ssb/Discovery.hs -rw-r--r-- 541 bytes
41cde99e — Haskell Guy initial commit 10 months ago
                                                                                
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)