| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Api.Network
Synopsis
- data NetworkId
- newtype NetworkMagic = NetworkMagic {}
- fromNetworkMagic :: NetworkMagic -> NetworkId
- toNetworkMagic :: NetworkId -> NetworkMagic
- mainnetNetworkMagic :: NetworkMagic
- data LedgerPeerSnapshot (a :: LedgerPeersKind) where
- LedgerPeerSnapshotV2 :: (WithOrigin SlotNo, [(AccPoolStake, (PoolStake, NonEmpty LedgerRelayAccessPoint))]) -> LedgerPeerSnapshot 'BigLedgerPeers
- LedgerBigPeerSnapshotV23 :: !(Point RawBlockHash) -> !NetworkMagic -> ![(AccPoolStake, (PoolStake, NonEmpty LedgerRelayAccessPoint))] -> LedgerPeerSnapshot 'BigLedgerPeers
- LedgerAllPeerSnapshotV23 :: !(Point RawBlockHash) -> !NetworkMagic -> ![(PoolStake, NonEmpty LedgerRelayAccessPoint)] -> LedgerPeerSnapshot 'AllLedgerPeers
- data SomeLedgerPeerSnapshot = SomeLedgerPeerSnapshot !(LedgerPeerSnapshot k)
- data LedgerPeersKind
- data SingLedgerPeersKind (k :: LedgerPeersKind) where
- data Target point
- = VolatileTip
- | SpecificPoint point
- | ImmutableTip
- newtype Serialised (a :: k) = Serialised {}
- data SubmitResult reason
- = SubmitSuccess
- | SubmitFail reason
- toByronProtocolMagicId :: NetworkId -> ProtocolMagicId
- toByronNetworkMagic :: NetworkId -> NetworkMagic
- toByronRequiresNetworkMagic :: NetworkId -> RequiresNetworkMagic
- toShelleyNetwork :: NetworkId -> Network
- fromShelleyNetwork :: Network -> NetworkMagic -> NetworkId
Network types
newtype NetworkMagic #
Constructors
| NetworkMagic | |
Fields | |
Instances
network reexports
data LedgerPeerSnapshot (a :: LedgerPeersKind) where #
Constructors
| LedgerPeerSnapshotV2 :: (WithOrigin SlotNo, [(AccPoolStake, (PoolStake, NonEmpty LedgerRelayAccessPoint))]) -> LedgerPeerSnapshot 'BigLedgerPeers | |
| LedgerBigPeerSnapshotV23 :: !(Point RawBlockHash) -> !NetworkMagic -> ![(AccPoolStake, (PoolStake, NonEmpty LedgerRelayAccessPoint))] -> LedgerPeerSnapshot 'BigLedgerPeers | |
| LedgerAllPeerSnapshotV23 :: !(Point RawBlockHash) -> !NetworkMagic -> ![(PoolStake, NonEmpty LedgerRelayAccessPoint)] -> LedgerPeerSnapshot 'AllLedgerPeers |
Instances
| FromJSON (LedgerPeerSnapshot 'AllLedgerPeers) # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods parseJSON :: Value -> Parser (LedgerPeerSnapshot 'AllLedgerPeers) # parseJSONList :: Value -> Parser [LedgerPeerSnapshot 'AllLedgerPeers] # omittedField :: Maybe (LedgerPeerSnapshot 'AllLedgerPeers) # | |
| FromJSON (LedgerPeerSnapshot 'BigLedgerPeers) # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods parseJSON :: Value -> Parser (LedgerPeerSnapshot 'BigLedgerPeers) # parseJSONList :: Value -> Parser [LedgerPeerSnapshot 'BigLedgerPeers] # omittedField :: Maybe (LedgerPeerSnapshot 'BigLedgerPeers) # | |
| ToJSON (LedgerPeerSnapshot a) # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods toJSON :: LedgerPeerSnapshot a -> Value # toEncoding :: LedgerPeerSnapshot a -> Encoding # toJSONList :: [LedgerPeerSnapshot a] -> Value # toEncodingList :: [LedgerPeerSnapshot a] -> Encoding # omitField :: LedgerPeerSnapshot a -> Bool # | |
| Eq (LedgerPeerSnapshot a) # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods (==) :: LedgerPeerSnapshot a -> LedgerPeerSnapshot a -> Bool Source # (/=) :: LedgerPeerSnapshot a -> LedgerPeerSnapshot a -> Bool Source # | |
| Show (LedgerPeerSnapshot a) # | |
data SomeLedgerPeerSnapshot #
Constructors
| SomeLedgerPeerSnapshot !(LedgerPeerSnapshot k) |
Instances
data LedgerPeersKind #
Constructors
| AllLedgerPeers | |
| BigLedgerPeers |
data SingLedgerPeersKind (k :: LedgerPeersKind) where #
Constructors
| SingAllLedgerPeers :: SingLedgerPeersKind 'AllLedgerPeers | |
| SingBigLedgerPeers :: SingLedgerPeersKind 'BigLedgerPeers |
Instances
| Eq (SingLedgerPeersKind k) # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods (==) :: SingLedgerPeersKind k -> SingLedgerPeersKind k -> Bool Source # (/=) :: SingLedgerPeersKind k -> SingLedgerPeersKind k -> Bool Source # | |
| Show (SingLedgerPeersKind k) # | |
Constructors
| VolatileTip | |
| SpecificPoint point | |
| ImmutableTip |
Instances
| Functor Target # | |||||
| Foldable Target # | |||||
Defined in Ouroboros.Network.Protocol.LocalStateQuery.Type Methods fold :: Monoid m => Target m -> m Source # foldMap :: Monoid m => (a -> m) -> Target a -> m Source # foldMap' :: Monoid m => (a -> m) -> Target a -> m Source # foldr :: (a -> b -> b) -> b -> Target a -> b Source # foldr' :: (a -> b -> b) -> b -> Target a -> b Source # foldl :: (b -> a -> b) -> b -> Target a -> b Source # foldl' :: (b -> a -> b) -> b -> Target a -> b Source # foldr1 :: (a -> a -> a) -> Target a -> a Source # foldl1 :: (a -> a -> a) -> Target a -> a Source # toList :: Target a -> [a] Source # null :: Target a -> Bool Source # length :: Target a -> Int Source # elem :: Eq a => a -> Target a -> Bool Source # maximum :: Ord a => Target a -> a Source # minimum :: Ord a => Target a -> a Source # | |||||
| Traversable Target # | |||||
| NFData point => NFData (Target point) # | |||||
| Eq point => Eq (Target point) # | |||||
| Ord point => Ord (Target point) # | |||||
Defined in Ouroboros.Network.Protocol.LocalStateQuery.Type Methods compare :: Target point -> Target point -> Ordering Source # (<) :: Target point -> Target point -> Bool Source # (<=) :: Target point -> Target point -> Bool Source # (>) :: Target point -> Target point -> Bool Source # (>=) :: Target point -> Target point -> Bool Source # max :: Target point -> Target point -> Target point Source # min :: Target point -> Target point -> Target point Source # | |||||
| Generic (Target point) # | |||||
Defined in Ouroboros.Network.Protocol.LocalStateQuery.Type Associated Types
| |||||
| Show point => Show (Target point) # | |||||
| type Rep (Target point) # | |||||
Defined in Ouroboros.Network.Protocol.LocalStateQuery.Type type Rep (Target point) = D1 ('MetaData "Target" "Ouroboros.Network.Protocol.LocalStateQuery.Type" "ouroboros-network-1.1.0.0-l-protocols-eea6fd64d997294f0e6ca3ec561d56d3f5494af8f274c965364aa04e42de9e0b" 'False) (C1 ('MetaCons "VolatileTip" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SpecificPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 point)) :+: C1 ('MetaCons "ImmutableTip" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
newtype Serialised (a :: k) #
Constructors
| Serialised | |
Fields | |
Instances
| SerialiseNodeToClient ByronBlock (Serialised ByronBlock) # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation Methods encodeNodeToClient :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> Serialised ByronBlock -> Encoding Source # decodeNodeToClient :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> forall s. Decoder s (Serialised ByronBlock) Source # | |
| SerialiseNodeToNode ByronBlock (Serialised ByronBlock) # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation Methods encodeNodeToNode :: CodecConfig ByronBlock -> BlockNodeToNodeVersion ByronBlock -> Serialised ByronBlock -> Encoding Source # decodeNodeToNode :: CodecConfig ByronBlock -> BlockNodeToNodeVersion ByronBlock -> forall s. Decoder s (Serialised ByronBlock) Source # | |
| StandardHash block => StandardHash (Serialised block :: Type) # | |
Defined in Ouroboros.Network.Block | |
| ShowProxy a => ShowProxy (Serialised a :: Type) # | |
Defined in Ouroboros.Network.Block Methods showProxy :: Proxy (Serialised a) -> String # | |
| DecodeDiskDepIx f blk => DecodeDisk blk (GenDepPair (Serialised :: Type -> Type) (f blk)) Source # | |
Defined in Ouroboros.Consensus.Storage.Serialisation Methods decodeDisk :: CodecConfig blk -> forall s. Decoder s (GenDepPair (Serialised :: Type -> Type) (f blk)) Source # | |
| EncodeDiskDepIx f blk => EncodeDisk blk (GenDepPair (Serialised :: Type -> Type) (f blk)) Source # | |
Defined in Ouroboros.Consensus.Storage.Serialisation Methods encodeDisk :: CodecConfig blk -> GenDepPair (Serialised :: Type -> Type) (f blk) -> Encoding Source # | |
| SerialiseHFC xs => SerialiseNodeToClient (HardForkBlock xs) (Serialised (HardForkBlock xs)) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient Methods encodeNodeToClient :: CodecConfig (HardForkBlock xs) -> BlockNodeToClientVersion (HardForkBlock xs) -> Serialised (HardForkBlock xs) -> Encoding Source # decodeNodeToClient :: CodecConfig (HardForkBlock xs) -> BlockNodeToClientVersion (HardForkBlock xs) -> forall s. Decoder s (Serialised (HardForkBlock xs)) Source # | |
| SerialiseHFC xs => SerialiseNodeToNode (HardForkBlock xs) (Serialised (HardForkBlock xs)) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToNode Methods encodeNodeToNode :: CodecConfig (HardForkBlock xs) -> BlockNodeToNodeVersion (HardForkBlock xs) -> Serialised (HardForkBlock xs) -> Encoding Source # decodeNodeToNode :: CodecConfig (HardForkBlock xs) -> BlockNodeToNodeVersion (HardForkBlock xs) -> forall s. Decoder s (Serialised (HardForkBlock xs)) Source # | |
| Eq (Serialised a) # | |
Defined in Ouroboros.Network.Block Methods (==) :: Serialised a -> Serialised a -> Bool Source # (/=) :: Serialised a -> Serialised a -> Bool Source # | |
| Show (Serialised a) # | |
Defined in Ouroboros.Network.Block | |
| Serialise (Serialised a) # | |
Defined in Ouroboros.Network.Block Methods encode :: Serialised a -> Encoding decode :: Decoder s (Serialised a) encodeList :: [Serialised a] -> Encoding decodeList :: Decoder s [Serialised a] | |
| SerialiseNodeToClient (ShelleyBlock proto era) (Serialised (ShelleyBlock proto era)) # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToClientVersion (ShelleyBlock proto era) -> Serialised (ShelleyBlock proto era) -> Encoding Source # decodeNodeToClient :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToClientVersion (ShelleyBlock proto era) -> forall s. Decoder s (Serialised (ShelleyBlock proto era)) Source # | |
| SerialiseNodeToNode (ShelleyBlock proto era) (Serialised (ShelleyBlock proto era)) # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToNode :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToNodeVersion (ShelleyBlock proto era) -> Serialised (ShelleyBlock proto era) -> Encoding Source # decodeNodeToNode :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToNodeVersion (ShelleyBlock proto era) -> forall s. Decoder s (Serialised (ShelleyBlock proto era)) Source # | |
| type HeaderHash (Serialised block :: Type) # | |
Defined in Ouroboros.Network.Block | |
data SubmitResult reason #
Constructors
| SubmitSuccess | |
| SubmitFail reason |
Instances
| Functor SubmitResult # | |||||
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type Methods fmap :: (a -> b) -> SubmitResult a -> SubmitResult b Source # (<$) :: a -> SubmitResult b -> SubmitResult a Source # | |||||
| NFData reason => NFData (SubmitResult reason) # | |||||
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type Methods rnf :: SubmitResult reason -> () Source # | |||||
| Eq reason => Eq (SubmitResult reason) # | |||||
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type Methods (==) :: SubmitResult reason -> SubmitResult reason -> Bool Source # (/=) :: SubmitResult reason -> SubmitResult reason -> Bool Source # | |||||
| Generic (SubmitResult reason) # | |||||
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type Associated Types
Methods from :: SubmitResult reason -> Rep (SubmitResult reason) x Source # to :: Rep (SubmitResult reason) x -> SubmitResult reason Source # | |||||
| Show a => Show (SubmitResult a) Source # | |||||
Defined in Cardano.Api.Internal.Orphans.Serialisation | |||||
| type Rep (SubmitResult reason) # | |||||
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type type Rep (SubmitResult reason) = D1 ('MetaData "SubmitResult" "Ouroboros.Network.Protocol.LocalTxSubmission.Type" "ouroboros-network-1.1.0.0-l-protocols-eea6fd64d997294f0e6ca3ec561d56d3f5494af8f274c965364aa04e42de9e0b" 'False) (C1 ('MetaCons "SubmitSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SubmitFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 reason))) | |||||
Internal conversion functions
toShelleyNetwork :: NetworkId -> Network Source #
fromShelleyNetwork :: Network -> NetworkMagic -> NetworkId Source #