-- | Node client support for the Cardano protocol
--
module Cardano.Api.Protocol.Cardano
  ( -- * Client support
    mkNodeClientProtocolCardano
  , mkSomeNodeClientProtocolCardano
  ) where

import           Cardano.Api.Protocol.Types (ProtocolClient(..),
                     ProtocolClientInfoArgs(ProtocolClientInfoArgsCardano),
                     SomeNodeClientProtocol (..))
import           Cardano.Chain.Slotting (EpochSlots)
import           Ouroboros.Consensus.Cardano.Block (CardanoBlock)
import           Cardano.Ledger.Crypto (StandardCrypto)

mkNodeClientProtocolCardano :: EpochSlots
                            -> ProtocolClientInfoArgs (CardanoBlock StandardCrypto)
mkNodeClientProtocolCardano :: EpochSlots -> ProtocolClientInfoArgs (CardanoBlock StandardCrypto)
mkNodeClientProtocolCardano = EpochSlots -> ProtocolClientInfoArgs (CardanoBlock StandardCrypto)
ProtocolClientInfoArgsCardano

mkSomeNodeClientProtocolCardano :: EpochSlots
                                -> SomeNodeClientProtocol
mkSomeNodeClientProtocolCardano :: EpochSlots -> SomeNodeClientProtocol
mkSomeNodeClientProtocolCardano EpochSlots
epochSlots =
    ProtocolClientInfoArgs (CardanoBlock StandardCrypto)
-> SomeNodeClientProtocol
forall blk.
(RunNode blk, ProtocolClient blk) =>
ProtocolClientInfoArgs blk -> SomeNodeClientProtocol
SomeNodeClientProtocol
      (EpochSlots -> ProtocolClientInfoArgs (CardanoBlock StandardCrypto)
mkNodeClientProtocolCardano EpochSlots
epochSlots)