hydra-node-0.19.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Network.Message

Documentation

data NetworkEvent msg Source #

Constructors

ConnectivityEvent Connectivity 
ReceivedMessage 

Fields

Instances

Instances details
Arbitrary msg => Arbitrary (NetworkEvent msg) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

arbitrary :: Gen (NetworkEvent msg)

shrink :: NetworkEvent msg -> [NetworkEvent msg]

FromJSON msg => FromJSON (NetworkEvent msg) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

parseJSON :: Value -> Parser (NetworkEvent msg)

parseJSONList :: Value -> Parser [NetworkEvent msg]

omittedField :: Maybe (NetworkEvent msg)

ToJSON msg => ToJSON (NetworkEvent msg) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

toJSON :: NetworkEvent msg -> Value

toEncoding :: NetworkEvent msg -> Encoding

toJSONList :: [NetworkEvent msg] -> Value

toEncodingList :: [NetworkEvent msg] -> Encoding

omitField :: NetworkEvent msg -> Bool

Generic (NetworkEvent msg) Source # 
Instance details

Defined in Hydra.Network.Message

Associated Types

type Rep (NetworkEvent msg) :: Type -> Type Source #

Methods

from :: NetworkEvent msg -> Rep (NetworkEvent msg) x Source #

to :: Rep (NetworkEvent msg) x -> NetworkEvent msg Source #

Show msg => Show (NetworkEvent msg) Source # 
Instance details

Defined in Hydra.Network.Message

Eq msg => Eq (NetworkEvent msg) Source # 
Instance details

Defined in Hydra.Network.Message

type Rep (NetworkEvent msg) Source # 
Instance details

Defined in Hydra.Network.Message

type Rep (NetworkEvent msg) = D1 ('MetaData "NetworkEvent" "Hydra.Network.Message" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "ConnectivityEvent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Connectivity)) :+: C1 ('MetaCons "ReceivedMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "sender") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Party) :*: S1 ('MetaSel ('Just "msg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 msg)))

newtype HydraVersionedProtocolNumber Source #

Instances

Instances details
Arbitrary HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

FromJSON HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

ToJSON HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

Generic HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

Associated Types

type Rep HydraVersionedProtocolNumber :: Type -> Type Source #

Show HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

Eq HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

Ord HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

type Rep HydraVersionedProtocolNumber Source # 
Instance details

Defined in Hydra.Network.Message

type Rep HydraVersionedProtocolNumber = D1 ('MetaData "HydraVersionedProtocolNumber" "Hydra.Network.Message" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'True) (C1 ('MetaCons "MkHydraVersionedProtocolNumber" 'PrefixI 'True) (S1 ('MetaSel ('Just "hydraVersionedProtocolNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))

data KnownHydraVersions Source #

Instances

Instances details
Arbitrary KnownHydraVersions Source # 
Instance details

Defined in Hydra.Network.Message

FromJSON KnownHydraVersions Source # 
Instance details

Defined in Hydra.Network.Message

ToJSON KnownHydraVersions Source # 
Instance details

Defined in Hydra.Network.Message

Generic KnownHydraVersions Source # 
Instance details

Defined in Hydra.Network.Message

Associated Types

type Rep KnownHydraVersions :: Type -> Type Source #

Show KnownHydraVersions Source # 
Instance details

Defined in Hydra.Network.Message

Eq KnownHydraVersions Source # 
Instance details

Defined in Hydra.Network.Message

type Rep KnownHydraVersions Source # 
Instance details

Defined in Hydra.Network.Message

type Rep KnownHydraVersions = D1 ('MetaData "KnownHydraVersions" "Hydra.Network.Message" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "KnownHydraVersions" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromKnownHydraVersions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [HydraVersionedProtocolNumber])) :+: C1 ('MetaCons "NoKnownHydraVersions" 'PrefixI 'False) (U1 :: Type -> Type))

data HydraHandshakeRefused Source #

Instances

Instances details
Arbitrary HydraHandshakeRefused Source # 
Instance details

Defined in Hydra.Network.Message

FromJSON HydraHandshakeRefused Source # 
Instance details

Defined in Hydra.Network.Message

ToJSON HydraHandshakeRefused Source # 
Instance details

Defined in Hydra.Network.Message

Generic HydraHandshakeRefused Source # 
Instance details

Defined in Hydra.Network.Message

Associated Types

type Rep HydraHandshakeRefused :: Type -> Type Source #

Show HydraHandshakeRefused Source # 
Instance details

Defined in Hydra.Network.Message

Eq HydraHandshakeRefused Source # 
Instance details

Defined in Hydra.Network.Message

type Rep HydraHandshakeRefused Source # 
Instance details

Defined in Hydra.Network.Message

type Rep HydraHandshakeRefused = D1 ('MetaData "HydraHandshakeRefused" "Hydra.Network.Message" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "HydraHandshakeRefused" 'PrefixI 'True) (S1 ('MetaSel ('Just "remoteHost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Host) :*: (S1 ('MetaSel ('Just "ourVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HydraVersionedProtocolNumber) :*: S1 ('MetaSel ('Just "theirVersions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KnownHydraVersions))))

data Connectivity Source #

Instances

Instances details
Arbitrary Connectivity Source # 
Instance details

Defined in Hydra.Network.Message

FromJSON Connectivity Source # 
Instance details

Defined in Hydra.Network.Message

Methods

parseJSON :: Value -> Parser Connectivity

parseJSONList :: Value -> Parser [Connectivity]

omittedField :: Maybe Connectivity

ToJSON Connectivity Source # 
Instance details

Defined in Hydra.Network.Message

Methods

toJSON :: Connectivity -> Value

toEncoding :: Connectivity -> Encoding

toJSONList :: [Connectivity] -> Value

toEncodingList :: [Connectivity] -> Encoding

omitField :: Connectivity -> Bool

Generic Connectivity Source # 
Instance details

Defined in Hydra.Network.Message

Associated Types

type Rep Connectivity :: Type -> Type Source #

Show Connectivity Source # 
Instance details

Defined in Hydra.Network.Message

Eq Connectivity Source # 
Instance details

Defined in Hydra.Network.Message

type Rep Connectivity Source # 
Instance details

Defined in Hydra.Network.Message

type Rep Connectivity = D1 ('MetaData "Connectivity" "Hydra.Network.Message" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "Connected" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NodeId)) :+: (C1 ('MetaCons "Disconnected" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NodeId)) :+: C1 ('MetaCons "HandshakeFailure" 'PrefixI 'True) (S1 ('MetaSel ('Just "remoteHost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Host) :*: (S1 ('MetaSel ('Just "ourVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HydraVersionedProtocolNumber) :*: S1 ('MetaSel ('Just "theirVersions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KnownHydraVersions)))))

data Message tx Source #

Constructors

ReqTx 

Fields

ReqSn 

Fields

AckSn 

Fields

ReqDec 

Fields

Instances

Instances details
ArbitraryIsTx tx => Arbitrary (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

arbitrary :: Gen (Message tx)

shrink :: Message tx -> [Message tx]

IsTx tx => FromJSON (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

parseJSON :: Value -> Parser (Message tx)

parseJSONList :: Value -> Parser [Message tx]

omittedField :: Maybe (Message tx)

IsTx tx => ToJSON (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

toJSON :: Message tx -> Value

toEncoding :: Message tx -> Encoding

toJSONList :: [Message tx] -> Value

toEncodingList :: [Message tx] -> Encoding

omitField :: Message tx -> Bool

Generic (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

Associated Types

type Rep (Message tx) :: Type -> Type Source #

Methods

from :: Message tx -> Rep (Message tx) x Source #

to :: Rep (Message tx) x -> Message tx Source #

IsTx tx => Show (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

(FromCBOR tx, FromCBOR (UTxOType tx), FromCBOR (TxIdType tx)) => FromCBOR (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

fromCBOR :: Decoder s (Message tx)

label :: Proxy (Message tx) -> Text

(ToCBOR tx, ToCBOR (UTxOType tx), ToCBOR (TxIdType tx)) => ToCBOR (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

toCBOR :: Message tx -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Message tx) -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Message tx] -> Size

IsTx tx => SignableRepresentation (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

IsTx tx => Eq (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

Methods

(==) :: Message tx -> Message tx -> Bool Source #

(/=) :: Message tx -> Message tx -> Bool Source #

type Rep (Message tx) Source # 
Instance details

Defined in Hydra.Network.Message

type Rep (Message tx) = D1 ('MetaData "Message" "Hydra.Network.Message" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) ((C1 ('MetaCons "ReqTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "transaction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tx)) :+: C1 ('MetaCons "ReqSn" 'PrefixI 'True) ((S1 ('MetaSel ('Just "snapshotVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotVersion) :*: S1 ('MetaSel ('Just "snapshotNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber)) :*: (S1 ('MetaSel ('Just "transactionIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxIdType tx]) :*: S1 ('MetaSel ('Just "decommitTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe tx))))) :+: (C1 ('MetaCons "AckSn" 'PrefixI 'True) (S1 ('MetaSel ('Just "signed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Signature (Snapshot tx))) :*: S1 ('MetaSel ('Just "snapshotNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber)) :+: C1 ('MetaCons "ReqDec" 'PrefixI 'True) (S1 ('MetaSel ('Just "transaction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tx))))