module Blockfrost.Client.Cardano.Network
( getNetworkInfo
) where
import Blockfrost.API
import Blockfrost.Client.Types
import Blockfrost.Types
networkClient :: MonadBlockfrost m => Project -> NetworkAPI (AsClientT m)
networkClient :: Project -> NetworkAPI (AsClientT m)
networkClient = m Network -> NetworkAPI (AsClientT m)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (m Network -> NetworkAPI (AsClientT m))
-> (Project -> m Network) -> Project -> NetworkAPI (AsClientT m)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CardanoAPI (AsClientT m) -> m Network
forall route.
CardanoAPI route
-> route
:- ("network"
:> (Tag "Cardano \187 Network" :> ToServantApi NetworkAPI))
_network (CardanoAPI (AsClientT m) -> m Network)
-> (Project -> CardanoAPI (AsClientT m)) -> Project -> m Network
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> CardanoAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> CardanoAPI (AsClientT m)
cardanoClient
getNetworkInfo_ :: MonadBlockfrost m => Project -> m Network
getNetworkInfo_ :: Project -> m Network
getNetworkInfo_ = NetworkAPI (AsClientT m) -> m Network
forall route.
NetworkAPI route
-> route
:- (Summary "Network information"
:> (Description "Return detailed network information."
:> Get '[JSON] Network))
_networkInfo (NetworkAPI (AsClientT m) -> m Network)
-> (Project -> NetworkAPI (AsClientT m)) -> Project -> m Network
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> NetworkAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> NetworkAPI (AsClientT m)
networkClient
getNetworkInfo :: MonadBlockfrost m => m Network
getNetworkInfo :: m Network
getNetworkInfo = (Project -> m Network) -> m Network
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go Project -> m Network
forall (m :: * -> *). MonadBlockfrost m => Project -> m Network
getNetworkInfo_