module Blockfrost.Client.Cardano.Pools
( listPools
, listPools'
, listPoolsExtended
, listPoolsExtended'
, listRetiredPools
, listRetiredPools'
, listRetiringPools
, listRetiringPools'
, getPool
, getPoolHistory
, getPoolHistory'
, getPoolMetadata
, getPoolRelays
, getPoolDelegators
, getPoolDelegators'
, getPoolBlocks
, getPoolBlocks'
, getPoolUpdates
, getPoolUpdates'
) where
import Blockfrost.API
import Blockfrost.Client.Types
import Blockfrost.Types
poolsClient :: MonadBlockfrost m => Project -> PoolsAPI (AsClientT m)
poolsClient :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient = ((((Paged -> SortOrder -> m [PoolId])
:<|> (Paged -> SortOrder -> m [Pool]))
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> (PoolId -> m PoolInfo))))
:<|> (((PoolId -> Paged -> SortOrder -> m [PoolHistory])
:<|> ((PoolId -> m (Maybe PoolMetadata))
:<|> (PoolId -> m [PoolRelay])))
:<|> ((PoolId -> Paged -> SortOrder -> m [PoolDelegator])
:<|> ((PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (PoolId -> Paged -> SortOrder -> m [PoolUpdate])))))
-> PoolsAPI (AsClientT m)
ToServant PoolsAPI (AsClientT m) -> PoolsAPI (AsClientT m)
forall {k} (routes :: k -> *) (mode :: k).
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (((((Paged -> SortOrder -> m [PoolId])
:<|> (Paged -> SortOrder -> m [Pool]))
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> (PoolId -> m PoolInfo))))
:<|> (((PoolId -> Paged -> SortOrder -> m [PoolHistory])
:<|> ((PoolId -> m (Maybe PoolMetadata))
:<|> (PoolId -> m [PoolRelay])))
:<|> ((PoolId -> Paged -> SortOrder -> m [PoolDelegator])
:<|> ((PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (PoolId -> Paged -> SortOrder -> m [PoolUpdate])))))
-> PoolsAPI (AsClientT m))
-> (Project
-> (((Paged -> SortOrder -> m [PoolId])
:<|> (Paged -> SortOrder -> m [Pool]))
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> (PoolId -> m PoolInfo))))
:<|> (((PoolId -> Paged -> SortOrder -> m [PoolHistory])
:<|> ((PoolId -> m (Maybe PoolMetadata))
:<|> (PoolId -> m [PoolRelay])))
:<|> ((PoolId -> Paged -> SortOrder -> m [PoolDelegator])
:<|> ((PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (PoolId -> Paged -> SortOrder -> m [PoolUpdate])))))
-> Project
-> PoolsAPI (AsClientT m)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CardanoAPI (AsClientT m)
-> (((Paged -> SortOrder -> m [PoolId])
:<|> (Paged -> SortOrder -> m [Pool]))
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> (PoolId -> m PoolInfo))))
:<|> (((PoolId -> Paged -> SortOrder -> m [PoolHistory])
:<|> ((PoolId -> m (Maybe PoolMetadata))
:<|> (PoolId -> m [PoolRelay])))
:<|> ((PoolId -> Paged -> SortOrder -> m [PoolDelegator])
:<|> ((PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (PoolId -> Paged -> SortOrder -> m [PoolUpdate]))))
CardanoAPI (AsClientT m)
-> AsClientT m
:- ("pools" :> (Tag "Cardano \187 Pools" :> ToServantApi PoolsAPI))
forall route.
CardanoAPI route
-> route
:- ("pools" :> (Tag "Cardano \187 Pools" :> ToServantApi PoolsAPI))
_pools (CardanoAPI (AsClientT m)
-> (((Paged -> SortOrder -> m [PoolId])
:<|> (Paged -> SortOrder -> m [Pool]))
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> (PoolId -> m PoolInfo))))
:<|> (((PoolId -> Paged -> SortOrder -> m [PoolHistory])
:<|> ((PoolId -> m (Maybe PoolMetadata))
:<|> (PoolId -> m [PoolRelay])))
:<|> ((PoolId -> Paged -> SortOrder -> m [PoolDelegator])
:<|> ((PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (PoolId -> Paged -> SortOrder -> m [PoolUpdate])))))
-> (Project -> CardanoAPI (AsClientT m))
-> Project
-> (((Paged -> SortOrder -> m [PoolId])
:<|> (Paged -> SortOrder -> m [Pool]))
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> ((Paged -> SortOrder -> m [PoolEpoch])
:<|> (PoolId -> m PoolInfo))))
:<|> (((PoolId -> Paged -> SortOrder -> m [PoolHistory])
:<|> ((PoolId -> m (Maybe PoolMetadata))
:<|> (PoolId -> m [PoolRelay])))
:<|> ((PoolId -> Paged -> SortOrder -> m [PoolDelegator])
:<|> ((PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (PoolId -> Paged -> SortOrder -> m [PoolUpdate]))))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> CardanoAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> CardanoAPI (AsClientT m)
cardanoClient
listPools_ :: MonadBlockfrost m => Project -> Paged -> SortOrder -> m [PoolId]
listPools_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [PoolId]
listPools_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "List of stake pools"
:> (Description "List of registered stake pools."
:> (Pagination :> (Sorting :> Get '[JSON] [PoolId]))))
PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [PoolId]
forall route.
PoolsAPI route
-> route
:- (Summary "List of stake pools"
:> (Description "List of registered stake pools."
:> (Pagination :> (Sorting :> Get '[JSON] [PoolId]))))
_listPools (PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [PoolId])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> Paged
-> SortOrder
-> m [PoolId]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
listPools' :: MonadBlockfrost m => Paged -> SortOrder -> m [PoolId]
listPools' :: forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [PoolId]
listPools' Paged
pg SortOrder
s = (Project -> m [PoolId]) -> m [PoolId]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> Paged -> SortOrder -> m [PoolId]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [PoolId]
listPools_ Project
p Paged
pg SortOrder
s)
listPools :: MonadBlockfrost m => m [PoolId]
listPools :: forall (m :: * -> *). MonadBlockfrost m => m [PoolId]
listPools = Paged -> SortOrder -> m [PoolId]
forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [PoolId]
listPools' Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def
listPoolsExtended_ :: MonadBlockfrost m => Project -> Paged -> SortOrder -> m [Pool]
listPoolsExtended_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [Pool]
listPoolsExtended_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "List of stake pools with additional information"
:> (Description
"List of registered stake pools with additional information."
:> ("extended"
:> (Pagination :> (Sorting :> Get '[JSON] [Pool])))))
PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [Pool]
forall route.
PoolsAPI route
-> route
:- (Summary "List of stake pools with additional information"
:> (Description
"List of registered stake pools with additional information."
:> ("extended"
:> (Pagination :> (Sorting :> Get '[JSON] [Pool])))))
_listPoolsExtended (PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [Pool])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> Paged
-> SortOrder
-> m [Pool]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
listPoolsExtended' :: MonadBlockfrost m => Paged -> SortOrder -> m [Pool]
listPoolsExtended' :: forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [Pool]
listPoolsExtended' Paged
pg SortOrder
s = (Project -> m [Pool]) -> m [Pool]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> Paged -> SortOrder -> m [Pool]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [Pool]
listPoolsExtended_ Project
p Paged
pg SortOrder
s)
listPoolsExtended :: MonadBlockfrost m => m [Pool]
listPoolsExtended :: forall (m :: * -> *). MonadBlockfrost m => m [Pool]
listPoolsExtended = Paged -> SortOrder -> m [Pool]
forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [Pool]
listPoolsExtended' Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def
listRetiredPools_ :: MonadBlockfrost m => Project -> Paged -> SortOrder -> m [PoolEpoch]
listRetiredPools_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [PoolEpoch]
listRetiredPools_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "List of retired stake pools"
:> (Description "List of already retired stake pools."
:> ("retired"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolEpoch])))))
PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [PoolEpoch]
forall route.
PoolsAPI route
-> route
:- (Summary "List of retired stake pools"
:> (Description "List of already retired stake pools."
:> ("retired"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolEpoch])))))
_listRetiredPools (PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [PoolEpoch])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> Paged
-> SortOrder
-> m [PoolEpoch]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
listRetiredPools' :: MonadBlockfrost m => Paged -> SortOrder -> m [PoolEpoch]
listRetiredPools' :: forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [PoolEpoch]
listRetiredPools' Paged
pg SortOrder
s = (Project -> m [PoolEpoch]) -> m [PoolEpoch]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> Paged -> SortOrder -> m [PoolEpoch]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [PoolEpoch]
listRetiredPools_ Project
p Paged
pg SortOrder
s)
listRetiredPools :: MonadBlockfrost m => m [PoolEpoch]
listRetiredPools :: forall (m :: * -> *). MonadBlockfrost m => m [PoolEpoch]
listRetiredPools = Paged -> SortOrder -> m [PoolEpoch]
forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [PoolEpoch]
listRetiredPools' Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def
listRetiringPools_ :: MonadBlockfrost m => Project -> Paged -> SortOrder -> m [PoolEpoch]
listRetiringPools_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [PoolEpoch]
listRetiringPools_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "List of retiring stake pools"
:> (Description
"List of stake pools retiring in the upcoming epochs"
:> ("retiring"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolEpoch])))))
PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [PoolEpoch]
forall route.
PoolsAPI route
-> route
:- (Summary "List of retiring stake pools"
:> (Description
"List of stake pools retiring in the upcoming epochs"
:> ("retiring"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolEpoch])))))
_listRetiringPools (PoolsAPI (AsClientT m) -> Paged -> SortOrder -> m [PoolEpoch])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> Paged
-> SortOrder
-> m [PoolEpoch]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
listRetiringPools' :: MonadBlockfrost m => Paged -> SortOrder -> m [PoolEpoch]
listRetiringPools' :: forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [PoolEpoch]
listRetiringPools' Paged
pg SortOrder
s = (Project -> m [PoolEpoch]) -> m [PoolEpoch]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> Paged -> SortOrder -> m [PoolEpoch]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> Paged -> SortOrder -> m [PoolEpoch]
listRetiringPools_ Project
p Paged
pg SortOrder
s)
listRetiringPools :: MonadBlockfrost m => m [PoolEpoch]
listRetiringPools :: forall (m :: * -> *). MonadBlockfrost m => m [PoolEpoch]
listRetiringPools = Paged -> SortOrder -> m [PoolEpoch]
forall (m :: * -> *).
MonadBlockfrost m =>
Paged -> SortOrder -> m [PoolEpoch]
listRetiringPools' Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def
getPool_ :: MonadBlockfrost m => Project -> PoolId -> m PoolInfo
getPool_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> m PoolInfo
getPool_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "Specific stake pool"
:> (Description "Pool information."
:> (Capture "pool_id" PoolId :> Get '[JSON] PoolInfo)))
PoolsAPI (AsClientT m) -> PoolId -> m PoolInfo
forall route.
PoolsAPI route
-> route
:- (Summary "Specific stake pool"
:> (Description "Pool information."
:> (Capture "pool_id" PoolId :> Get '[JSON] PoolInfo)))
_getPool (PoolsAPI (AsClientT m) -> PoolId -> m PoolInfo)
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> PoolId
-> m PoolInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
getPool :: MonadBlockfrost m => PoolId -> m PoolInfo
getPool :: forall (m :: * -> *). MonadBlockfrost m => PoolId -> m PoolInfo
getPool PoolId
p = (Project -> m PoolInfo) -> m PoolInfo
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (Project -> PoolId -> m PoolInfo
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> m PoolInfo
`getPool_` PoolId
p)
getPoolHistory_ :: MonadBlockfrost m => Project -> PoolId -> Paged -> SortOrder -> m [PoolHistory]
getPoolHistory_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [PoolHistory]
getPoolHistory_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "Stake pool history"
:> (Description "History of stake pool parameters over epochs."
:> (Capture "pool_id" PoolId
:> ("history"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolHistory]))))))
PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [PoolHistory]
forall route.
PoolsAPI route
-> route
:- (Summary "Stake pool history"
:> (Description "History of stake pool parameters over epochs."
:> (Capture "pool_id" PoolId
:> ("history"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolHistory]))))))
_getPoolHistory (PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [PoolHistory])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> PoolId
-> Paged
-> SortOrder
-> m [PoolHistory]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
getPoolHistory' :: MonadBlockfrost m => PoolId -> Paged -> SortOrder -> m [PoolHistory]
getPoolHistory' :: forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [PoolHistory]
getPoolHistory' PoolId
pid Paged
pg SortOrder
s = (Project -> m [PoolHistory]) -> m [PoolHistory]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> PoolId -> Paged -> SortOrder -> m [PoolHistory]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [PoolHistory]
getPoolHistory_ Project
p PoolId
pid Paged
pg SortOrder
s)
getPoolHistory :: MonadBlockfrost m => PoolId -> m [PoolHistory]
getPoolHistory :: forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> m [PoolHistory]
getPoolHistory PoolId
p = PoolId -> Paged -> SortOrder -> m [PoolHistory]
forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [PoolHistory]
getPoolHistory' PoolId
p Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def
getPoolMetadata_ :: MonadBlockfrost m => Project -> PoolId -> m (Maybe PoolMetadata)
getPoolMetadata_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> m (Maybe PoolMetadata)
getPoolMetadata_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "Stake pool metadata"
:> (Description "Stake pool registration metadata."
:> (Capture "pool_id" PoolId
:> ("metadata" :> Get '[JSON] (Maybe PoolMetadata)))))
PoolsAPI (AsClientT m) -> PoolId -> m (Maybe PoolMetadata)
forall route.
PoolsAPI route
-> route
:- (Summary "Stake pool metadata"
:> (Description "Stake pool registration metadata."
:> (Capture "pool_id" PoolId
:> ("metadata" :> Get '[JSON] (Maybe PoolMetadata)))))
_getPoolMetadata (PoolsAPI (AsClientT m) -> PoolId -> m (Maybe PoolMetadata))
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> PoolId
-> m (Maybe PoolMetadata)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
getPoolMetadata :: MonadBlockfrost m => PoolId -> m (Maybe PoolMetadata)
getPoolMetadata :: forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> m (Maybe PoolMetadata)
getPoolMetadata PoolId
p = (Project -> m (Maybe PoolMetadata)) -> m (Maybe PoolMetadata)
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (Project -> PoolId -> m (Maybe PoolMetadata)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> m (Maybe PoolMetadata)
`getPoolMetadata_` PoolId
p)
getPoolRelays_ :: MonadBlockfrost m => Project -> PoolId -> m [PoolRelay]
getPoolRelays_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> m [PoolRelay]
getPoolRelays_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "Stake pool relays"
:> (Description "Relays of a stake pool."
:> (Capture "pool_id" PoolId
:> ("relays" :> Get '[JSON] [PoolRelay]))))
PoolsAPI (AsClientT m) -> PoolId -> m [PoolRelay]
forall route.
PoolsAPI route
-> route
:- (Summary "Stake pool relays"
:> (Description "Relays of a stake pool."
:> (Capture "pool_id" PoolId
:> ("relays" :> Get '[JSON] [PoolRelay]))))
_getPoolRelays (PoolsAPI (AsClientT m) -> PoolId -> m [PoolRelay])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> PoolId
-> m [PoolRelay]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
getPoolRelays :: MonadBlockfrost m => PoolId -> m [PoolRelay]
getPoolRelays :: forall (m :: * -> *). MonadBlockfrost m => PoolId -> m [PoolRelay]
getPoolRelays PoolId
p = (Project -> m [PoolRelay]) -> m [PoolRelay]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (Project -> PoolId -> m [PoolRelay]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> m [PoolRelay]
`getPoolRelays_` PoolId
p)
getPoolDelegators_ :: MonadBlockfrost m => Project -> PoolId -> Paged -> SortOrder -> m [PoolDelegator]
getPoolDelegators_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [PoolDelegator]
getPoolDelegators_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "Stake pool delegators"
:> (Description "List of current stake pools delegators."
:> (Capture "pool_id" PoolId
:> ("delegators"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolDelegator]))))))
PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [PoolDelegator]
forall route.
PoolsAPI route
-> route
:- (Summary "Stake pool delegators"
:> (Description "List of current stake pools delegators."
:> (Capture "pool_id" PoolId
:> ("delegators"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolDelegator]))))))
_getPoolDelegators (PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [PoolDelegator])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> PoolId
-> Paged
-> SortOrder
-> m [PoolDelegator]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
getPoolDelegators' :: MonadBlockfrost m => PoolId -> Paged -> SortOrder -> m [PoolDelegator]
getPoolDelegators' :: forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [PoolDelegator]
getPoolDelegators' PoolId
pid Paged
pg SortOrder
s = (Project -> m [PoolDelegator]) -> m [PoolDelegator]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> PoolId -> Paged -> SortOrder -> m [PoolDelegator]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [PoolDelegator]
getPoolDelegators_ Project
p PoolId
pid Paged
pg SortOrder
s)
getPoolDelegators :: MonadBlockfrost m => PoolId -> m [PoolDelegator]
getPoolDelegators :: forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> m [PoolDelegator]
getPoolDelegators PoolId
p = PoolId -> Paged -> SortOrder -> m [PoolDelegator]
forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [PoolDelegator]
getPoolDelegators' PoolId
p Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def
getPoolBlocks_ :: MonadBlockfrost m => Project -> PoolId -> Paged -> SortOrder -> m [BlockHash]
getPoolBlocks_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [BlockHash]
getPoolBlocks_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "Stake pool blocks"
:> (Description "List of stake pool blocks."
:> (Capture "pool_id" PoolId
:> ("blocks"
:> (Pagination :> (Sorting :> Get '[JSON] [BlockHash]))))))
PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [BlockHash]
forall route.
PoolsAPI route
-> route
:- (Summary "Stake pool blocks"
:> (Description "List of stake pool blocks."
:> (Capture "pool_id" PoolId
:> ("blocks"
:> (Pagination :> (Sorting :> Get '[JSON] [BlockHash]))))))
_getPoolBlocks (PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [BlockHash])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> PoolId
-> Paged
-> SortOrder
-> m [BlockHash]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
getPoolBlocks' :: MonadBlockfrost m => PoolId -> Paged -> SortOrder -> m [BlockHash]
getPoolBlocks' :: forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [BlockHash]
getPoolBlocks' PoolId
pid Paged
pg SortOrder
s = (Project -> m [BlockHash]) -> m [BlockHash]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> PoolId -> Paged -> SortOrder -> m [BlockHash]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [BlockHash]
getPoolBlocks_ Project
p PoolId
pid Paged
pg SortOrder
s)
getPoolBlocks :: MonadBlockfrost m => PoolId -> m [BlockHash]
getPoolBlocks :: forall (m :: * -> *). MonadBlockfrost m => PoolId -> m [BlockHash]
getPoolBlocks PoolId
p = PoolId -> Paged -> SortOrder -> m [BlockHash]
forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [BlockHash]
getPoolBlocks' PoolId
p Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def
getPoolUpdates_ :: MonadBlockfrost m => Project -> PoolId -> Paged -> SortOrder -> m [PoolUpdate]
getPoolUpdates_ :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [PoolUpdate]
getPoolUpdates_ = PoolsAPI (AsClientT m)
-> AsClientT m
:- (Summary "Stake pool updates"
:> (Description "List of certificate updates to the stake pool."
:> (Capture "pool_id" PoolId
:> ("updates"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolUpdate]))))))
PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [PoolUpdate]
forall route.
PoolsAPI route
-> route
:- (Summary "Stake pool updates"
:> (Description "List of certificate updates to the stake pool."
:> (Capture "pool_id" PoolId
:> ("updates"
:> (Pagination :> (Sorting :> Get '[JSON] [PoolUpdate]))))))
_getPoolUpdates (PoolsAPI (AsClientT m)
-> PoolId -> Paged -> SortOrder -> m [PoolUpdate])
-> (Project -> PoolsAPI (AsClientT m))
-> Project
-> PoolId
-> Paged
-> SortOrder
-> m [PoolUpdate]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> PoolsAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolsAPI (AsClientT m)
poolsClient
getPoolUpdates' :: MonadBlockfrost m => PoolId -> Paged -> SortOrder -> m [PoolUpdate]
getPoolUpdates' :: forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [PoolUpdate]
getPoolUpdates' PoolId
pid Paged
pg SortOrder
s = (Project -> m [PoolUpdate]) -> m [PoolUpdate]
forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go (\Project
p -> Project -> PoolId -> Paged -> SortOrder -> m [PoolUpdate]
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> PoolId -> Paged -> SortOrder -> m [PoolUpdate]
getPoolUpdates_ Project
p PoolId
pid Paged
pg SortOrder
s)
getPoolUpdates :: MonadBlockfrost m => PoolId -> m [PoolUpdate]
getPoolUpdates :: forall (m :: * -> *). MonadBlockfrost m => PoolId -> m [PoolUpdate]
getPoolUpdates PoolId
p = PoolId -> Paged -> SortOrder -> m [PoolUpdate]
forall (m :: * -> *).
MonadBlockfrost m =>
PoolId -> Paged -> SortOrder -> m [PoolUpdate]
getPoolUpdates' PoolId
p Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def