{-# OPTIONS_HADDOCK prune #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
module Lightning.Protocol.BOLT7.Messages (
MsgType(..)
, msgTypeCode
, ChannelAnnouncement(..)
, NodeAnnouncement(..)
, ChannelUpdate(..)
, AnnouncementSignatures(..)
, QueryShortChannelIds(..)
, ReplyShortChannelIdsEnd(..)
, QueryChannelRange(..)
, ReplyChannelRange(..)
, GossipTimestampFilter(..)
, Message(..)
) where
import Control.DeepSeq (NFData)
import Data.ByteString (ByteString)
import Data.Word (Word8, Word16, Word32)
import GHC.Generics (Generic)
import Lightning.Protocol.BOLT1 (TlvStream)
import Lightning.Protocol.BOLT7.Types
data MsgType
= MsgChannelAnnouncement
| MsgNodeAnnouncement
| MsgChannelUpdate
| MsgAnnouncementSignatures
| MsgQueryShortChannelIds
| MsgReplyShortChannelIdsEnd
| MsgQueryChannelRange
| MsgReplyChannelRange
| MsgGossipTimestampFilter
deriving (MsgType -> MsgType -> Bool
(MsgType -> MsgType -> Bool)
-> (MsgType -> MsgType -> Bool) -> Eq MsgType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MsgType -> MsgType -> Bool
== :: MsgType -> MsgType -> Bool
$c/= :: MsgType -> MsgType -> Bool
/= :: MsgType -> MsgType -> Bool
Eq, Int -> MsgType -> ShowS
[MsgType] -> ShowS
MsgType -> String
(Int -> MsgType -> ShowS)
-> (MsgType -> String) -> ([MsgType] -> ShowS) -> Show MsgType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MsgType -> ShowS
showsPrec :: Int -> MsgType -> ShowS
$cshow :: MsgType -> String
show :: MsgType -> String
$cshowList :: [MsgType] -> ShowS
showList :: [MsgType] -> ShowS
Show, (forall x. MsgType -> Rep MsgType x)
-> (forall x. Rep MsgType x -> MsgType) -> Generic MsgType
forall x. Rep MsgType x -> MsgType
forall x. MsgType -> Rep MsgType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. MsgType -> Rep MsgType x
from :: forall x. MsgType -> Rep MsgType x
$cto :: forall x. Rep MsgType x -> MsgType
to :: forall x. Rep MsgType x -> MsgType
Generic)
instance NFData MsgType
msgTypeCode :: MsgType -> Word16
msgTypeCode :: MsgType -> Word16
msgTypeCode MsgType
MsgChannelAnnouncement = Word16
256
msgTypeCode MsgType
MsgNodeAnnouncement = Word16
257
msgTypeCode MsgType
MsgChannelUpdate = Word16
258
msgTypeCode MsgType
MsgAnnouncementSignatures = Word16
259
msgTypeCode MsgType
MsgQueryShortChannelIds = Word16
261
msgTypeCode MsgType
MsgReplyShortChannelIdsEnd = Word16
262
msgTypeCode MsgType
MsgQueryChannelRange = Word16
263
msgTypeCode MsgType
MsgReplyChannelRange = Word16
264
msgTypeCode MsgType
MsgGossipTimestampFilter = Word16
265
{-# INLINE msgTypeCode #-}
data ChannelAnnouncement = ChannelAnnouncement
{ ChannelAnnouncement -> Signature
channelAnnNodeSig1 :: !Signature
, ChannelAnnouncement -> Signature
channelAnnNodeSig2 :: !Signature
, ChannelAnnouncement -> Signature
channelAnnBitcoinSig1 :: !Signature
, ChannelAnnouncement -> Signature
channelAnnBitcoinSig2 :: !Signature
, ChannelAnnouncement -> FeatureBits
channelAnnFeatures :: !FeatureBits
, ChannelAnnouncement -> ChainHash
channelAnnChainHash :: !ChainHash
, ChannelAnnouncement -> ShortChannelId
channelAnnShortChanId :: !ShortChannelId
, ChannelAnnouncement -> NodeId
channelAnnNodeId1 :: !NodeId
, ChannelAnnouncement -> NodeId
channelAnnNodeId2 :: !NodeId
, ChannelAnnouncement -> Point
channelAnnBitcoinKey1 :: !Point
, ChannelAnnouncement -> Point
channelAnnBitcoinKey2 :: !Point
}
deriving (ChannelAnnouncement -> ChannelAnnouncement -> Bool
(ChannelAnnouncement -> ChannelAnnouncement -> Bool)
-> (ChannelAnnouncement -> ChannelAnnouncement -> Bool)
-> Eq ChannelAnnouncement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChannelAnnouncement -> ChannelAnnouncement -> Bool
== :: ChannelAnnouncement -> ChannelAnnouncement -> Bool
$c/= :: ChannelAnnouncement -> ChannelAnnouncement -> Bool
/= :: ChannelAnnouncement -> ChannelAnnouncement -> Bool
Eq, Int -> ChannelAnnouncement -> ShowS
[ChannelAnnouncement] -> ShowS
ChannelAnnouncement -> String
(Int -> ChannelAnnouncement -> ShowS)
-> (ChannelAnnouncement -> String)
-> ([ChannelAnnouncement] -> ShowS)
-> Show ChannelAnnouncement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChannelAnnouncement -> ShowS
showsPrec :: Int -> ChannelAnnouncement -> ShowS
$cshow :: ChannelAnnouncement -> String
show :: ChannelAnnouncement -> String
$cshowList :: [ChannelAnnouncement] -> ShowS
showList :: [ChannelAnnouncement] -> ShowS
Show, (forall x. ChannelAnnouncement -> Rep ChannelAnnouncement x)
-> (forall x. Rep ChannelAnnouncement x -> ChannelAnnouncement)
-> Generic ChannelAnnouncement
forall x. Rep ChannelAnnouncement x -> ChannelAnnouncement
forall x. ChannelAnnouncement -> Rep ChannelAnnouncement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ChannelAnnouncement -> Rep ChannelAnnouncement x
from :: forall x. ChannelAnnouncement -> Rep ChannelAnnouncement x
$cto :: forall x. Rep ChannelAnnouncement x -> ChannelAnnouncement
to :: forall x. Rep ChannelAnnouncement x -> ChannelAnnouncement
Generic)
instance NFData ChannelAnnouncement
data NodeAnnouncement = NodeAnnouncement
{ NodeAnnouncement -> Signature
nodeAnnSignature :: !Signature
, NodeAnnouncement -> FeatureBits
nodeAnnFeatures :: !FeatureBits
, NodeAnnouncement -> Timestamp
nodeAnnTimestamp :: !Timestamp
, NodeAnnouncement -> NodeId
nodeAnnNodeId :: !NodeId
, NodeAnnouncement -> RgbColor
nodeAnnRgbColor :: !RgbColor
, NodeAnnouncement -> Alias
nodeAnnAlias :: !Alias
, NodeAnnouncement -> [Address]
nodeAnnAddresses :: ![Address]
}
deriving (NodeAnnouncement -> NodeAnnouncement -> Bool
(NodeAnnouncement -> NodeAnnouncement -> Bool)
-> (NodeAnnouncement -> NodeAnnouncement -> Bool)
-> Eq NodeAnnouncement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NodeAnnouncement -> NodeAnnouncement -> Bool
== :: NodeAnnouncement -> NodeAnnouncement -> Bool
$c/= :: NodeAnnouncement -> NodeAnnouncement -> Bool
/= :: NodeAnnouncement -> NodeAnnouncement -> Bool
Eq, Int -> NodeAnnouncement -> ShowS
[NodeAnnouncement] -> ShowS
NodeAnnouncement -> String
(Int -> NodeAnnouncement -> ShowS)
-> (NodeAnnouncement -> String)
-> ([NodeAnnouncement] -> ShowS)
-> Show NodeAnnouncement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NodeAnnouncement -> ShowS
showsPrec :: Int -> NodeAnnouncement -> ShowS
$cshow :: NodeAnnouncement -> String
show :: NodeAnnouncement -> String
$cshowList :: [NodeAnnouncement] -> ShowS
showList :: [NodeAnnouncement] -> ShowS
Show, (forall x. NodeAnnouncement -> Rep NodeAnnouncement x)
-> (forall x. Rep NodeAnnouncement x -> NodeAnnouncement)
-> Generic NodeAnnouncement
forall x. Rep NodeAnnouncement x -> NodeAnnouncement
forall x. NodeAnnouncement -> Rep NodeAnnouncement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NodeAnnouncement -> Rep NodeAnnouncement x
from :: forall x. NodeAnnouncement -> Rep NodeAnnouncement x
$cto :: forall x. Rep NodeAnnouncement x -> NodeAnnouncement
to :: forall x. Rep NodeAnnouncement x -> NodeAnnouncement
Generic)
instance NFData NodeAnnouncement
data ChannelUpdate = ChannelUpdate
{ ChannelUpdate -> Signature
chanUpdateSignature :: !Signature
, ChannelUpdate -> ChainHash
chanUpdateChainHash :: !ChainHash
, ChannelUpdate -> ShortChannelId
chanUpdateShortChanId :: !ShortChannelId
, ChannelUpdate -> Timestamp
chanUpdateTimestamp :: !Timestamp
, ChannelUpdate -> MessageFlags
chanUpdateMsgFlags :: !MessageFlags
, ChannelUpdate -> ChannelFlags
chanUpdateChanFlags :: !ChannelFlags
, ChannelUpdate -> CltvExpiryDelta
chanUpdateCltvExpDelta :: !CltvExpiryDelta
, ChannelUpdate -> HtlcMinimumMsat
chanUpdateHtlcMinMsat :: !HtlcMinimumMsat
, ChannelUpdate -> FeeBaseMsat
chanUpdateFeeBaseMsat :: !FeeBaseMsat
, ChannelUpdate -> FeeProportionalMillionths
chanUpdateFeeProportional :: !FeeProportionalMillionths
, ChannelUpdate -> Maybe HtlcMaximumMsat
chanUpdateHtlcMaxMsat :: !(Maybe HtlcMaximumMsat)
}
deriving (ChannelUpdate -> ChannelUpdate -> Bool
(ChannelUpdate -> ChannelUpdate -> Bool)
-> (ChannelUpdate -> ChannelUpdate -> Bool) -> Eq ChannelUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChannelUpdate -> ChannelUpdate -> Bool
== :: ChannelUpdate -> ChannelUpdate -> Bool
$c/= :: ChannelUpdate -> ChannelUpdate -> Bool
/= :: ChannelUpdate -> ChannelUpdate -> Bool
Eq, Int -> ChannelUpdate -> ShowS
[ChannelUpdate] -> ShowS
ChannelUpdate -> String
(Int -> ChannelUpdate -> ShowS)
-> (ChannelUpdate -> String)
-> ([ChannelUpdate] -> ShowS)
-> Show ChannelUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChannelUpdate -> ShowS
showsPrec :: Int -> ChannelUpdate -> ShowS
$cshow :: ChannelUpdate -> String
show :: ChannelUpdate -> String
$cshowList :: [ChannelUpdate] -> ShowS
showList :: [ChannelUpdate] -> ShowS
Show, (forall x. ChannelUpdate -> Rep ChannelUpdate x)
-> (forall x. Rep ChannelUpdate x -> ChannelUpdate)
-> Generic ChannelUpdate
forall x. Rep ChannelUpdate x -> ChannelUpdate
forall x. ChannelUpdate -> Rep ChannelUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ChannelUpdate -> Rep ChannelUpdate x
from :: forall x. ChannelUpdate -> Rep ChannelUpdate x
$cto :: forall x. Rep ChannelUpdate x -> ChannelUpdate
to :: forall x. Rep ChannelUpdate x -> ChannelUpdate
Generic)
instance NFData ChannelUpdate
data AnnouncementSignatures = AnnouncementSignatures
{ AnnouncementSignatures -> ChannelId
annSigChannelId :: !ChannelId
, AnnouncementSignatures -> ShortChannelId
annSigShortChanId :: !ShortChannelId
, AnnouncementSignatures -> Signature
annSigNodeSig :: !Signature
, AnnouncementSignatures -> Signature
annSigBitcoinSig :: !Signature
}
deriving (AnnouncementSignatures -> AnnouncementSignatures -> Bool
(AnnouncementSignatures -> AnnouncementSignatures -> Bool)
-> (AnnouncementSignatures -> AnnouncementSignatures -> Bool)
-> Eq AnnouncementSignatures
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnnouncementSignatures -> AnnouncementSignatures -> Bool
== :: AnnouncementSignatures -> AnnouncementSignatures -> Bool
$c/= :: AnnouncementSignatures -> AnnouncementSignatures -> Bool
/= :: AnnouncementSignatures -> AnnouncementSignatures -> Bool
Eq, Int -> AnnouncementSignatures -> ShowS
[AnnouncementSignatures] -> ShowS
AnnouncementSignatures -> String
(Int -> AnnouncementSignatures -> ShowS)
-> (AnnouncementSignatures -> String)
-> ([AnnouncementSignatures] -> ShowS)
-> Show AnnouncementSignatures
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnnouncementSignatures -> ShowS
showsPrec :: Int -> AnnouncementSignatures -> ShowS
$cshow :: AnnouncementSignatures -> String
show :: AnnouncementSignatures -> String
$cshowList :: [AnnouncementSignatures] -> ShowS
showList :: [AnnouncementSignatures] -> ShowS
Show, (forall x. AnnouncementSignatures -> Rep AnnouncementSignatures x)
-> (forall x.
Rep AnnouncementSignatures x -> AnnouncementSignatures)
-> Generic AnnouncementSignatures
forall x. Rep AnnouncementSignatures x -> AnnouncementSignatures
forall x. AnnouncementSignatures -> Rep AnnouncementSignatures x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. AnnouncementSignatures -> Rep AnnouncementSignatures x
from :: forall x. AnnouncementSignatures -> Rep AnnouncementSignatures x
$cto :: forall x. Rep AnnouncementSignatures x -> AnnouncementSignatures
to :: forall x. Rep AnnouncementSignatures x -> AnnouncementSignatures
Generic)
instance NFData AnnouncementSignatures
data QueryShortChannelIds = QueryShortChannelIds
{ QueryShortChannelIds -> ChainHash
queryScidsChainHash :: !ChainHash
, QueryShortChannelIds -> ByteString
queryScidsData :: !ByteString
, QueryShortChannelIds -> TlvStream
queryScidsTlvs :: !TlvStream
}
deriving (QueryShortChannelIds -> QueryShortChannelIds -> Bool
(QueryShortChannelIds -> QueryShortChannelIds -> Bool)
-> (QueryShortChannelIds -> QueryShortChannelIds -> Bool)
-> Eq QueryShortChannelIds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueryShortChannelIds -> QueryShortChannelIds -> Bool
== :: QueryShortChannelIds -> QueryShortChannelIds -> Bool
$c/= :: QueryShortChannelIds -> QueryShortChannelIds -> Bool
/= :: QueryShortChannelIds -> QueryShortChannelIds -> Bool
Eq, Int -> QueryShortChannelIds -> ShowS
[QueryShortChannelIds] -> ShowS
QueryShortChannelIds -> String
(Int -> QueryShortChannelIds -> ShowS)
-> (QueryShortChannelIds -> String)
-> ([QueryShortChannelIds] -> ShowS)
-> Show QueryShortChannelIds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryShortChannelIds -> ShowS
showsPrec :: Int -> QueryShortChannelIds -> ShowS
$cshow :: QueryShortChannelIds -> String
show :: QueryShortChannelIds -> String
$cshowList :: [QueryShortChannelIds] -> ShowS
showList :: [QueryShortChannelIds] -> ShowS
Show, (forall x. QueryShortChannelIds -> Rep QueryShortChannelIds x)
-> (forall x. Rep QueryShortChannelIds x -> QueryShortChannelIds)
-> Generic QueryShortChannelIds
forall x. Rep QueryShortChannelIds x -> QueryShortChannelIds
forall x. QueryShortChannelIds -> Rep QueryShortChannelIds x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryShortChannelIds -> Rep QueryShortChannelIds x
from :: forall x. QueryShortChannelIds -> Rep QueryShortChannelIds x
$cto :: forall x. Rep QueryShortChannelIds x -> QueryShortChannelIds
to :: forall x. Rep QueryShortChannelIds x -> QueryShortChannelIds
Generic)
instance NFData QueryShortChannelIds
data ReplyShortChannelIdsEnd = ReplyShortChannelIdsEnd
{ ReplyShortChannelIdsEnd -> ChainHash
replyScidsChainHash :: !ChainHash
, ReplyShortChannelIdsEnd -> Word8
replyScidsFullInfo :: !Word8
}
deriving (ReplyShortChannelIdsEnd -> ReplyShortChannelIdsEnd -> Bool
(ReplyShortChannelIdsEnd -> ReplyShortChannelIdsEnd -> Bool)
-> (ReplyShortChannelIdsEnd -> ReplyShortChannelIdsEnd -> Bool)
-> Eq ReplyShortChannelIdsEnd
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReplyShortChannelIdsEnd -> ReplyShortChannelIdsEnd -> Bool
== :: ReplyShortChannelIdsEnd -> ReplyShortChannelIdsEnd -> Bool
$c/= :: ReplyShortChannelIdsEnd -> ReplyShortChannelIdsEnd -> Bool
/= :: ReplyShortChannelIdsEnd -> ReplyShortChannelIdsEnd -> Bool
Eq, Int -> ReplyShortChannelIdsEnd -> ShowS
[ReplyShortChannelIdsEnd] -> ShowS
ReplyShortChannelIdsEnd -> String
(Int -> ReplyShortChannelIdsEnd -> ShowS)
-> (ReplyShortChannelIdsEnd -> String)
-> ([ReplyShortChannelIdsEnd] -> ShowS)
-> Show ReplyShortChannelIdsEnd
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReplyShortChannelIdsEnd -> ShowS
showsPrec :: Int -> ReplyShortChannelIdsEnd -> ShowS
$cshow :: ReplyShortChannelIdsEnd -> String
show :: ReplyShortChannelIdsEnd -> String
$cshowList :: [ReplyShortChannelIdsEnd] -> ShowS
showList :: [ReplyShortChannelIdsEnd] -> ShowS
Show, (forall x.
ReplyShortChannelIdsEnd -> Rep ReplyShortChannelIdsEnd x)
-> (forall x.
Rep ReplyShortChannelIdsEnd x -> ReplyShortChannelIdsEnd)
-> Generic ReplyShortChannelIdsEnd
forall x. Rep ReplyShortChannelIdsEnd x -> ReplyShortChannelIdsEnd
forall x. ReplyShortChannelIdsEnd -> Rep ReplyShortChannelIdsEnd x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ReplyShortChannelIdsEnd -> Rep ReplyShortChannelIdsEnd x
from :: forall x. ReplyShortChannelIdsEnd -> Rep ReplyShortChannelIdsEnd x
$cto :: forall x. Rep ReplyShortChannelIdsEnd x -> ReplyShortChannelIdsEnd
to :: forall x. Rep ReplyShortChannelIdsEnd x -> ReplyShortChannelIdsEnd
Generic)
instance NFData ReplyShortChannelIdsEnd
data QueryChannelRange = QueryChannelRange
{ QueryChannelRange -> ChainHash
queryRangeChainHash :: !ChainHash
, QueryChannelRange -> Timestamp
queryRangeFirstBlock :: !Word32
, QueryChannelRange -> Timestamp
queryRangeNumBlocks :: !Word32
, QueryChannelRange -> TlvStream
queryRangeTlvs :: !TlvStream
}
deriving (QueryChannelRange -> QueryChannelRange -> Bool
(QueryChannelRange -> QueryChannelRange -> Bool)
-> (QueryChannelRange -> QueryChannelRange -> Bool)
-> Eq QueryChannelRange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueryChannelRange -> QueryChannelRange -> Bool
== :: QueryChannelRange -> QueryChannelRange -> Bool
$c/= :: QueryChannelRange -> QueryChannelRange -> Bool
/= :: QueryChannelRange -> QueryChannelRange -> Bool
Eq, Int -> QueryChannelRange -> ShowS
[QueryChannelRange] -> ShowS
QueryChannelRange -> String
(Int -> QueryChannelRange -> ShowS)
-> (QueryChannelRange -> String)
-> ([QueryChannelRange] -> ShowS)
-> Show QueryChannelRange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryChannelRange -> ShowS
showsPrec :: Int -> QueryChannelRange -> ShowS
$cshow :: QueryChannelRange -> String
show :: QueryChannelRange -> String
$cshowList :: [QueryChannelRange] -> ShowS
showList :: [QueryChannelRange] -> ShowS
Show, (forall x. QueryChannelRange -> Rep QueryChannelRange x)
-> (forall x. Rep QueryChannelRange x -> QueryChannelRange)
-> Generic QueryChannelRange
forall x. Rep QueryChannelRange x -> QueryChannelRange
forall x. QueryChannelRange -> Rep QueryChannelRange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryChannelRange -> Rep QueryChannelRange x
from :: forall x. QueryChannelRange -> Rep QueryChannelRange x
$cto :: forall x. Rep QueryChannelRange x -> QueryChannelRange
to :: forall x. Rep QueryChannelRange x -> QueryChannelRange
Generic)
instance NFData QueryChannelRange
data ReplyChannelRange = ReplyChannelRange
{ ReplyChannelRange -> ChainHash
replyRangeChainHash :: !ChainHash
, ReplyChannelRange -> Timestamp
replyRangeFirstBlock :: !Word32
, ReplyChannelRange -> Timestamp
replyRangeNumBlocks :: !Word32
, ReplyChannelRange -> Word8
replyRangeSyncComplete :: !Word8
, ReplyChannelRange -> ByteString
replyRangeData :: !ByteString
, ReplyChannelRange -> TlvStream
replyRangeTlvs :: !TlvStream
}
deriving (ReplyChannelRange -> ReplyChannelRange -> Bool
(ReplyChannelRange -> ReplyChannelRange -> Bool)
-> (ReplyChannelRange -> ReplyChannelRange -> Bool)
-> Eq ReplyChannelRange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReplyChannelRange -> ReplyChannelRange -> Bool
== :: ReplyChannelRange -> ReplyChannelRange -> Bool
$c/= :: ReplyChannelRange -> ReplyChannelRange -> Bool
/= :: ReplyChannelRange -> ReplyChannelRange -> Bool
Eq, Int -> ReplyChannelRange -> ShowS
[ReplyChannelRange] -> ShowS
ReplyChannelRange -> String
(Int -> ReplyChannelRange -> ShowS)
-> (ReplyChannelRange -> String)
-> ([ReplyChannelRange] -> ShowS)
-> Show ReplyChannelRange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReplyChannelRange -> ShowS
showsPrec :: Int -> ReplyChannelRange -> ShowS
$cshow :: ReplyChannelRange -> String
show :: ReplyChannelRange -> String
$cshowList :: [ReplyChannelRange] -> ShowS
showList :: [ReplyChannelRange] -> ShowS
Show, (forall x. ReplyChannelRange -> Rep ReplyChannelRange x)
-> (forall x. Rep ReplyChannelRange x -> ReplyChannelRange)
-> Generic ReplyChannelRange
forall x. Rep ReplyChannelRange x -> ReplyChannelRange
forall x. ReplyChannelRange -> Rep ReplyChannelRange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ReplyChannelRange -> Rep ReplyChannelRange x
from :: forall x. ReplyChannelRange -> Rep ReplyChannelRange x
$cto :: forall x. Rep ReplyChannelRange x -> ReplyChannelRange
to :: forall x. Rep ReplyChannelRange x -> ReplyChannelRange
Generic)
instance NFData ReplyChannelRange
data GossipTimestampFilter = GossipTimestampFilter
{ GossipTimestampFilter -> ChainHash
gossipFilterChainHash :: !ChainHash
, GossipTimestampFilter -> Timestamp
gossipFilterFirstTimestamp :: !Word32
, GossipTimestampFilter -> Timestamp
gossipFilterTimestampRange :: !Word32
}
deriving (GossipTimestampFilter -> GossipTimestampFilter -> Bool
(GossipTimestampFilter -> GossipTimestampFilter -> Bool)
-> (GossipTimestampFilter -> GossipTimestampFilter -> Bool)
-> Eq GossipTimestampFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GossipTimestampFilter -> GossipTimestampFilter -> Bool
== :: GossipTimestampFilter -> GossipTimestampFilter -> Bool
$c/= :: GossipTimestampFilter -> GossipTimestampFilter -> Bool
/= :: GossipTimestampFilter -> GossipTimestampFilter -> Bool
Eq, Int -> GossipTimestampFilter -> ShowS
[GossipTimestampFilter] -> ShowS
GossipTimestampFilter -> String
(Int -> GossipTimestampFilter -> ShowS)
-> (GossipTimestampFilter -> String)
-> ([GossipTimestampFilter] -> ShowS)
-> Show GossipTimestampFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GossipTimestampFilter -> ShowS
showsPrec :: Int -> GossipTimestampFilter -> ShowS
$cshow :: GossipTimestampFilter -> String
show :: GossipTimestampFilter -> String
$cshowList :: [GossipTimestampFilter] -> ShowS
showList :: [GossipTimestampFilter] -> ShowS
Show, (forall x. GossipTimestampFilter -> Rep GossipTimestampFilter x)
-> (forall x. Rep GossipTimestampFilter x -> GossipTimestampFilter)
-> Generic GossipTimestampFilter
forall x. Rep GossipTimestampFilter x -> GossipTimestampFilter
forall x. GossipTimestampFilter -> Rep GossipTimestampFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. GossipTimestampFilter -> Rep GossipTimestampFilter x
from :: forall x. GossipTimestampFilter -> Rep GossipTimestampFilter x
$cto :: forall x. Rep GossipTimestampFilter x -> GossipTimestampFilter
to :: forall x. Rep GossipTimestampFilter x -> GossipTimestampFilter
Generic)
instance NFData GossipTimestampFilter
data Message
= MsgChanAnn !ChannelAnnouncement
| MsgNodeAnn !NodeAnnouncement
| MsgChanUpd !ChannelUpdate
| MsgAnnSig !AnnouncementSignatures
| MsgQueryScids !QueryShortChannelIds
| MsgReplyScids !ReplyShortChannelIdsEnd
| MsgQueryRange !QueryChannelRange
| MsgReplyRange !ReplyChannelRange
| MsgGossipFilter !GossipTimestampFilter
deriving (Message -> Message -> Bool
(Message -> Message -> Bool)
-> (Message -> Message -> Bool) -> Eq Message
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Message -> Message -> Bool
== :: Message -> Message -> Bool
$c/= :: Message -> Message -> Bool
/= :: Message -> Message -> Bool
Eq, Int -> Message -> ShowS
[Message] -> ShowS
Message -> String
(Int -> Message -> ShowS)
-> (Message -> String) -> ([Message] -> ShowS) -> Show Message
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Message -> ShowS
showsPrec :: Int -> Message -> ShowS
$cshow :: Message -> String
show :: Message -> String
$cshowList :: [Message] -> ShowS
showList :: [Message] -> ShowS
Show, (forall x. Message -> Rep Message x)
-> (forall x. Rep Message x -> Message) -> Generic Message
forall x. Rep Message x -> Message
forall x. Message -> Rep Message x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Message -> Rep Message x
from :: forall x. Message -> Rep Message x
$cto :: forall x. Rep Message x -> Message
to :: forall x. Rep Message x -> Message
Generic)
instance NFData Message