-- | Node client support for the Byron protocol
--
module Cardano.Api.Protocol.Byron
  ( -- * Client support
    mkNodeClientProtocolByron
  , mkSomeNodeClientProtocolByron
  ) where

import           Cardano.Api.Protocol.Types (ProtocolClient(..),
                     ProtocolClientInfoArgs(ProtocolClientInfoArgsByron),
                     SomeNodeClientProtocol(..))
import           Cardano.Chain.Slotting (EpochSlots)
import           Ouroboros.Consensus.Cardano.ByronHFC

mkNodeClientProtocolByron :: EpochSlots
                          -> ProtocolClientInfoArgs ByronBlockHFC
mkNodeClientProtocolByron :: EpochSlots -> ProtocolClientInfoArgs ByronBlockHFC
mkNodeClientProtocolByron = EpochSlots -> ProtocolClientInfoArgs ByronBlockHFC
ProtocolClientInfoArgsByron

mkSomeNodeClientProtocolByron :: EpochSlots
                              -> SomeNodeClientProtocol
mkSomeNodeClientProtocolByron :: EpochSlots -> SomeNodeClientProtocol
mkSomeNodeClientProtocolByron EpochSlots
epochSlots =
    ProtocolClientInfoArgs ByronBlockHFC -> SomeNodeClientProtocol
forall blk.
(RunNode blk, ProtocolClient blk) =>
ProtocolClientInfoArgs blk -> SomeNodeClientProtocol
SomeNodeClientProtocol
      (EpochSlots -> ProtocolClientInfoArgs ByronBlockHFC
mkNodeClientProtocolByron EpochSlots
epochSlots)