{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.Polkadot.Api.System where
import Data.Aeson (Object)
import Data.Text (Text)
import Network.JsonRpc.TinyClient (JsonRpc (..))
import Network.Polkadot.Api.Types (ChainType, Health, NodeRole,
PeerInfo)
addReservedPeer :: JsonRpc m
=> Text
-> m Text
{-# INLINE addReservedPeer #-}
addReservedPeer = remote "system_addReservedPeer"
chain :: JsonRpc m => m Text
{-# INLINE chain #-}
chain = remote "system_chain"
chainType :: JsonRpc m => m ChainType
{-# INLINE chainType #-}
chainType = remote "system_chainType"
health :: JsonRpc m => m Health
{-# INLINE health #-}
health = remote "system_health"
localListenAddresses :: JsonRpc m => m [Text]
{-# INLINE localListenAddresses #-}
localListenAddresses = remote "system_localListenAddresses"
localPeerId :: JsonRpc m => m Text
{-# INLINE localPeerId #-}
localPeerId = remote "system_localPeerId"
name :: JsonRpc m => m Text
{-# INLINE name #-}
name = remote "system_name"
networkState :: JsonRpc m => m Object
{-# INLINE networkState #-}
networkState = remote "system_networkState"
nodeRoles :: JsonRpc m => m [NodeRole]
{-# INLINE nodeRoles #-}
nodeRoles = remote "system_nodeRoles"
peers :: JsonRpc m => m [PeerInfo]
{-# INLINE peers #-}
peers = remote "system_peers"
properties :: JsonRpc m => m Object
{-# INLINE properties #-}
properties = remote "system_properties"
removeReservedPeer :: JsonRpc m
=> Text
-> m Text
{-# INLINE removeReservedPeer #-}
removeReservedPeer = remote "system_removeReservedPeer"
version :: JsonRpc m => m Text
{-# INLINE version #-}
version = remote "system_version"