{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Blockfrost.Client.Types
( BlockfrostClient
, BlockfrostError (..)
, ClientConfig
, runBlockfrost
, apiClient
, api0Client
, commonClient
, cardanoClient
, ipfsClient
, nutLinkClient
, Project (..)
, Paged (..)
, SortOrder (..)
, go
, AsClientT
, fromServant
, tryError
, def
, BlockfrostClientT (..)
, MonadBlockfrost (..)
, runBlockfrostClientT
, newClientConfig
) where
import Control.Monad.Except
import Control.Monad.Reader
import Data.Default
import Servant.API.Generic
import Servant.Client
import Servant.Client.Generic
import Blockfrost.API
import Blockfrost.Client.Core
type ClientConfig = (ClientEnv, Project)
newtype BlockfrostClientT m a = BlockfrostClientT {
forall (m :: * -> *) a.
BlockfrostClientT m a
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
unBlockfrostClientT
:: ExceptT BlockfrostError
(ReaderT ClientConfig m) a
} deriving
( (forall a b.
(a -> b) -> BlockfrostClientT m a -> BlockfrostClientT m b)
-> (forall a b.
a -> BlockfrostClientT m b -> BlockfrostClientT m a)
-> Functor (BlockfrostClientT m)
forall a b. a -> BlockfrostClientT m b -> BlockfrostClientT m a
forall a b.
(a -> b) -> BlockfrostClientT m a -> BlockfrostClientT m b
forall (m :: * -> *) a b.
Functor m =>
a -> BlockfrostClientT m b -> BlockfrostClientT m a
forall (m :: * -> *) a b.
Functor m =>
(a -> b) -> BlockfrostClientT m a -> BlockfrostClientT m b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall (m :: * -> *) a b.
Functor m =>
(a -> b) -> BlockfrostClientT m a -> BlockfrostClientT m b
fmap :: forall a b.
(a -> b) -> BlockfrostClientT m a -> BlockfrostClientT m b
$c<$ :: forall (m :: * -> *) a b.
Functor m =>
a -> BlockfrostClientT m b -> BlockfrostClientT m a
<$ :: forall a b. a -> BlockfrostClientT m b -> BlockfrostClientT m a
Functor
, Functor (BlockfrostClientT m)
Functor (BlockfrostClientT m) =>
(forall a. a -> BlockfrostClientT m a)
-> (forall a b.
BlockfrostClientT m (a -> b)
-> BlockfrostClientT m a -> BlockfrostClientT m b)
-> (forall a b c.
(a -> b -> c)
-> BlockfrostClientT m a
-> BlockfrostClientT m b
-> BlockfrostClientT m c)
-> (forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b)
-> (forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m a)
-> Applicative (BlockfrostClientT m)
forall a. a -> BlockfrostClientT m a
forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m a
forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
forall a b.
BlockfrostClientT m (a -> b)
-> BlockfrostClientT m a -> BlockfrostClientT m b
forall a b c.
(a -> b -> c)
-> BlockfrostClientT m a
-> BlockfrostClientT m b
-> BlockfrostClientT m c
forall (m :: * -> *). Monad m => Functor (BlockfrostClientT m)
forall (m :: * -> *) a. Monad m => a -> BlockfrostClientT m a
forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m a
forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m (a -> b)
-> BlockfrostClientT m a -> BlockfrostClientT m b
forall (m :: * -> *) a b c.
Monad m =>
(a -> b -> c)
-> BlockfrostClientT m a
-> BlockfrostClientT m b
-> BlockfrostClientT m c
forall (f :: * -> *).
Functor f =>
(forall a. a -> f a)
-> (forall a b. f (a -> b) -> f a -> f b)
-> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
-> (forall a b. f a -> f b -> f b)
-> (forall a b. f a -> f b -> f a)
-> Applicative f
$cpure :: forall (m :: * -> *) a. Monad m => a -> BlockfrostClientT m a
pure :: forall a. a -> BlockfrostClientT m a
$c<*> :: forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m (a -> b)
-> BlockfrostClientT m a -> BlockfrostClientT m b
<*> :: forall a b.
BlockfrostClientT m (a -> b)
-> BlockfrostClientT m a -> BlockfrostClientT m b
$cliftA2 :: forall (m :: * -> *) a b c.
Monad m =>
(a -> b -> c)
-> BlockfrostClientT m a
-> BlockfrostClientT m b
-> BlockfrostClientT m c
liftA2 :: forall a b c.
(a -> b -> c)
-> BlockfrostClientT m a
-> BlockfrostClientT m b
-> BlockfrostClientT m c
$c*> :: forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
*> :: forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
$c<* :: forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m a
<* :: forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m a
Applicative
, Applicative (BlockfrostClientT m)
Applicative (BlockfrostClientT m) =>
(forall a b.
BlockfrostClientT m a
-> (a -> BlockfrostClientT m b) -> BlockfrostClientT m b)
-> (forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b)
-> (forall a. a -> BlockfrostClientT m a)
-> Monad (BlockfrostClientT m)
forall a. a -> BlockfrostClientT m a
forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
forall a b.
BlockfrostClientT m a
-> (a -> BlockfrostClientT m b) -> BlockfrostClientT m b
forall (m :: * -> *). Monad m => Applicative (BlockfrostClientT m)
forall (m :: * -> *) a. Monad m => a -> BlockfrostClientT m a
forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> (a -> BlockfrostClientT m b) -> BlockfrostClientT m b
forall (m :: * -> *).
Applicative m =>
(forall a b. m a -> (a -> m b) -> m b)
-> (forall a b. m a -> m b -> m b)
-> (forall a. a -> m a)
-> Monad m
$c>>= :: forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> (a -> BlockfrostClientT m b) -> BlockfrostClientT m b
>>= :: forall a b.
BlockfrostClientT m a
-> (a -> BlockfrostClientT m b) -> BlockfrostClientT m b
$c>> :: forall (m :: * -> *) a b.
Monad m =>
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
>> :: forall a b.
BlockfrostClientT m a
-> BlockfrostClientT m b -> BlockfrostClientT m b
$creturn :: forall (m :: * -> *) a. Monad m => a -> BlockfrostClientT m a
return :: forall a. a -> BlockfrostClientT m a
Monad
, Monad (BlockfrostClientT m)
Monad (BlockfrostClientT m) =>
(forall a. IO a -> BlockfrostClientT m a)
-> MonadIO (BlockfrostClientT m)
forall a. IO a -> BlockfrostClientT m a
forall (m :: * -> *).
Monad m =>
(forall a. IO a -> m a) -> MonadIO m
forall (m :: * -> *). MonadIO m => Monad (BlockfrostClientT m)
forall (m :: * -> *) a. MonadIO m => IO a -> BlockfrostClientT m a
$cliftIO :: forall (m :: * -> *) a. MonadIO m => IO a -> BlockfrostClientT m a
liftIO :: forall a. IO a -> BlockfrostClientT m a
MonadIO
, MonadReader ClientConfig
, MonadError BlockfrostError
)
type BlockfrostClient = BlockfrostClientT IO
class MonadIO m => MonadBlockfrost m where
liftBlockfrostClient :: ClientM a -> m a
getConf :: m ClientConfig
instance MonadIO m => MonadBlockfrost (BlockfrostClientT m) where
liftBlockfrostClient :: forall a. ClientM a -> BlockfrostClientT m a
liftBlockfrostClient ClientM a
act = ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> BlockfrostClientT m a
forall (m :: * -> *) a.
ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> BlockfrostClientT m a
BlockfrostClientT (ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> BlockfrostClientT m a)
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> BlockfrostClientT m a
forall a b. (a -> b) -> a -> b
$ do
(ClientEnv
env, Project
_proj) <- ExceptT BlockfrostError (ReaderT ClientConfig m) ClientConfig
forall r (m :: * -> *). MonadReader r m => m r
ask
IO (Either ClientError a)
-> ExceptT
BlockfrostError (ReaderT ClientConfig m) (Either ClientError a)
forall a.
IO a -> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ClientM a -> ClientEnv -> IO (Either ClientError a)
forall a. ClientM a -> ClientEnv -> IO (Either ClientError a)
runClientM ClientM a
act ClientEnv
env)
ExceptT
BlockfrostError (ReaderT ClientConfig m) (Either ClientError a)
-> (Either ClientError a
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a)
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall a b.
ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> (a -> ExceptT BlockfrostError (ReaderT ClientConfig m) b)
-> ExceptT BlockfrostError (ReaderT ClientConfig m) b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ClientError -> ExceptT BlockfrostError (ReaderT ClientConfig m) a)
-> (a -> ExceptT BlockfrostError (ReaderT ClientConfig m) a)
-> Either ClientError a
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either
(BlockfrostError
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall a.
BlockfrostError
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (BlockfrostError
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a)
-> (ClientError -> BlockfrostError)
-> ClientError
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ClientError -> BlockfrostError
fromServantClientError)
a -> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall a. a -> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
getConf :: BlockfrostClientT m ClientConfig
getConf = ExceptT BlockfrostError (ReaderT ClientConfig m) ClientConfig
-> BlockfrostClientT m ClientConfig
forall (m :: * -> *) a.
ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> BlockfrostClientT m a
BlockfrostClientT ExceptT BlockfrostError (ReaderT ClientConfig m) ClientConfig
forall r (m :: * -> *). MonadReader r m => m r
ask
instance MonadBlockfrost ClientM where
liftBlockfrostClient :: forall a. ClientM a -> ClientM a
liftBlockfrostClient = ClientM a -> ClientM a
forall a. a -> a
id
getConf :: ClientM ClientConfig
getConf = ClientM ClientConfig
forall (m :: * -> *). MonadIO m => m ClientConfig
newClientConfig
instance MonadBlockfrost IO where
liftBlockfrostClient :: forall a. ClientM a -> IO a
liftBlockfrostClient ClientM a
act =
IO ClientConfig
forall (m :: * -> *). MonadBlockfrost m => m ClientConfig
getConf
IO ClientConfig -> (ClientConfig -> IO a) -> IO a
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \(ClientEnv
env, Project
_prj) ->
ClientM a -> ClientEnv -> IO (Either ClientError a)
forall a. ClientM a -> ClientEnv -> IO (Either ClientError a)
runClientM ClientM a
act ClientEnv
env
IO (Either ClientError a) -> (Either ClientError a -> IO a) -> IO a
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ClientError -> IO a)
-> (a -> IO a) -> Either ClientError a -> IO a
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either
([Char] -> IO a
forall a. HasCallStack => [Char] -> a
error ([Char] -> IO a) -> (ClientError -> [Char]) -> ClientError -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ClientError -> [Char]
forall a. Show a => a -> [Char]
show)
a -> IO a
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
getConf :: IO ClientConfig
getConf = IO ClientConfig
forall (m :: * -> *). MonadIO m => m ClientConfig
newClientConfig
apiClient
:: MonadBlockfrost m
=> BlockfrostAPI (AsClientT m)
apiClient :: forall (m :: * -> *).
MonadBlockfrost m =>
BlockfrostAPI (AsClientT m)
apiClient = (forall x. ClientM x -> m x) -> BlockfrostAPI (AsClientT m)
forall (routes :: * -> *) (m :: * -> *) (n :: * -> *).
(HasClient m (ToServantApi routes),
GenericServant routes (AsClientT n),
Client n (ToServantApi routes) ~ ToServant routes (AsClientT n)) =>
(forall x. m x -> n x) -> routes (AsClientT n)
genericClientHoist ClientM x -> m x
forall x. ClientM x -> m x
forall (m :: * -> *) a. MonadBlockfrost m => ClientM a -> m a
liftBlockfrostClient
api0Client
:: MonadBlockfrost m
=> Project
-> BlockfrostV0API (AsClientT m)
api0Client :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> BlockfrostV0API (AsClientT m)
api0Client = ((((m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)])))
:<|> (((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval)
:<|> (TxEvalInput -> m TxEval))))))))
:<|> (((((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange))))
:<|> (((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text
-> Paged -> SortOrder -> m [(Address, NutlinkTicker)])))))
-> BlockfrostV0API (AsClientT m)
ToServant BlockfrostV0API (AsClientT m)
-> BlockfrostV0API (AsClientT m)
forall {k} (routes :: k -> *) (mode :: k).
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (((((m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)])))
:<|> (((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval)
:<|> (TxEvalInput -> m TxEval))))))))
:<|> (((((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange))))
:<|> (((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text
-> Paged -> SortOrder -> m [(Address, NutlinkTicker)])))))
-> BlockfrostV0API (AsClientT m))
-> (Project
-> (((m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)])))
:<|> (((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch
-> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval)
:<|> (TxEvalInput -> m TxEval))))))))
:<|> (((((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange))))
:<|> (((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text
-> Paged -> SortOrder -> m [(Address, NutlinkTicker)])))))
-> Project
-> BlockfrostV0API (AsClientT m)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BlockfrostAPI (AsClientT m)
-> AsClientT m
:- ("api"
:> ("v0"
:> (BlockfrostAuth
:> (UserAgent :> ToServantApi BlockfrostV0API))))
forall route.
BlockfrostAPI route
-> route
:- ("api"
:> ("v0"
:> (BlockfrostAuth
:> (UserAgent :> ToServantApi BlockfrostV0API))))
_apiV0 BlockfrostAPI (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
BlockfrostAPI (AsClientT m)
apiClient
runBlockfrost
:: Project
-> BlockfrostClientT IO a
-> IO (Either BlockfrostError a)
runBlockfrost :: forall a.
Project -> BlockfrostClientT IO a -> IO (Either BlockfrostError a)
runBlockfrost = Project -> BlockfrostClientT IO a -> IO (Either BlockfrostError a)
forall (m :: * -> *) a.
MonadIO m =>
Project -> BlockfrostClientT m a -> m (Either BlockfrostError a)
runBlockfrostClientT
runBlockfrostClientT
:: MonadIO m
=> Project
-> BlockfrostClientT m a
-> m (Either BlockfrostError a)
runBlockfrostClientT :: forall (m :: * -> *) a.
MonadIO m =>
Project -> BlockfrostClientT m a -> m (Either BlockfrostError a)
runBlockfrostClientT Project
proj BlockfrostClientT m a
act = do
ClientEnv
env <- IO ClientEnv -> m ClientEnv
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ClientEnv -> m ClientEnv) -> IO ClientEnv -> m ClientEnv
forall a b. (a -> b) -> a -> b
$ Project -> IO ClientEnv
newEnvByProject Project
proj
(ReaderT ClientConfig m (Either BlockfrostError a)
-> ClientConfig -> m (Either BlockfrostError a))
-> ClientConfig
-> ReaderT ClientConfig m (Either BlockfrostError a)
-> m (Either BlockfrostError a)
forall a b c. (a -> b -> c) -> b -> a -> c
flip ReaderT ClientConfig m (Either BlockfrostError a)
-> ClientConfig -> m (Either BlockfrostError a)
forall r (m :: * -> *) a. ReaderT r m a -> r -> m a
runReaderT (ClientEnv
env, Project
proj)
(ReaderT ClientConfig m (Either BlockfrostError a)
-> m (Either BlockfrostError a))
-> ReaderT ClientConfig m (Either BlockfrostError a)
-> m (Either BlockfrostError a)
forall a b. (a -> b) -> a -> b
$ ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> ReaderT ClientConfig m (Either BlockfrostError a)
forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
runExceptT (ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> ReaderT ClientConfig m (Either BlockfrostError a))
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
-> ReaderT ClientConfig m (Either BlockfrostError a)
forall a b. (a -> b) -> a -> b
$ BlockfrostClientT m a
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
forall (m :: * -> *) a.
BlockfrostClientT m a
-> ExceptT BlockfrostError (ReaderT ClientConfig m) a
unBlockfrostClientT BlockfrostClientT m a
act
newClientConfig
:: MonadIO m
=> m ClientConfig
newClientConfig :: forall (m :: * -> *). MonadIO m => m ClientConfig
newClientConfig = IO ClientConfig -> m ClientConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ClientConfig -> m ClientConfig)
-> IO ClientConfig -> m ClientConfig
forall a b. (a -> b) -> a -> b
$ do
Project
prj <- IO Project
projectFromEnv
ClientEnv
env <- Project -> IO ClientEnv
newEnvByProject Project
prj
ClientConfig -> IO ClientConfig
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (ClientEnv
env, Project
prj)
go :: MonadBlockfrost m
=> (Project -> m a)
-> m a
go :: forall (m :: * -> *) a.
MonadBlockfrost m =>
(Project -> m a) -> m a
go Project -> m a
act = m ClientConfig
forall (m :: * -> *). MonadBlockfrost m => m ClientConfig
getConf m ClientConfig -> (ClientConfig -> m a) -> m a
forall a b. m a -> (a -> m b) -> m b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Project -> m a
act (Project -> m a)
-> (ClientConfig -> Project) -> ClientConfig -> m a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ClientConfig -> Project
forall a b. (a, b) -> b
snd
#if !MIN_VERSION_mtl(2,3,0)
tryError :: MonadError e m => m a -> m (Either e a)
tryError action = (Right <$> action) `catchError` (pure . Left)
#endif
commonClient
:: MonadBlockfrost m
=> Project
-> CommonAPI (AsClientT m)
commonClient :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> CommonAPI (AsClientT m)
commonClient = ((m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)])))
-> CommonAPI (AsClientT m)
ToServant CommonAPI (AsClientT m) -> CommonAPI (AsClientT m)
forall {k} (routes :: k -> *) (mode :: k).
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (((m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)])))
-> CommonAPI (AsClientT m))
-> (Project
-> (m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)])))
-> Project
-> CommonAPI (AsClientT m)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BlockfrostV0API (AsClientT m)
-> (m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)]))
BlockfrostV0API (AsClientT m)
-> AsClientT m :- ToServantApi CommonAPI
forall route.
BlockfrostV0API route -> route :- ToServantApi CommonAPI
_common (BlockfrostV0API (AsClientT m)
-> (m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)])))
-> (Project -> BlockfrostV0API (AsClientT m))
-> Project
-> (m URLVersion :<|> m Healthy)
:<|> (m ServerTime :<|> (m [Metric] :<|> m [(Text, Metric)]))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> BlockfrostV0API (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> BlockfrostV0API (AsClientT m)
api0Client
cardanoClient
:: MonadBlockfrost m
=> Project
-> CardanoAPI (AsClientT m)
cardanoClient :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> CardanoAPI (AsClientT m)
cardanoClient = (((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval) :<|> (TxEvalInput -> m TxEval)))))))
-> CardanoAPI (AsClientT m)
ToServant CardanoAPI (AsClientT m) -> CardanoAPI (AsClientT m)
forall {k} (routes :: k -> *) (mode :: k).
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant ((((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval) :<|> (TxEvalInput -> m TxEval)))))))
-> CardanoAPI (AsClientT m))
-> (Project
-> ((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval) :<|> (TxEvalInput -> m TxEval)))))))
-> Project
-> CardanoAPI (AsClientT m)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BlockfrostV0API (AsClientT m)
-> ((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval) :<|> (TxEvalInput -> m TxEval))))))
BlockfrostV0API (AsClientT m)
-> AsClientT m :- ToServantApi CardanoAPI
forall route.
BlockfrostV0API route -> route :- ToServantApi CardanoAPI
_cardano (BlockfrostV0API (AsClientT m)
-> ((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval) :<|> (TxEvalInput -> m TxEval)))))))
-> (Project -> BlockfrostV0API (AsClientT m))
-> Project
-> ((((((Address -> m AccountInfo)
:<|> (Address -> Paged -> SortOrder -> m [AccountReward]))
:<|> ((Address -> Paged -> SortOrder -> m [AccountHistory])
:<|> ((Address -> Paged -> SortOrder -> m [AccountDelegation])
:<|> (Address -> Paged -> SortOrder -> m [AccountRegistration]))))
:<|> (((Address -> Paged -> SortOrder -> m [AccountWithdrawal])
:<|> (Address -> Paged -> SortOrder -> m [AccountMir]))
:<|> ((Address -> Paged -> SortOrder -> m [AddressAssociated])
:<|> ((Address -> Paged -> SortOrder -> m [Amount])
:<|> (Address -> m AddressAssociatedTotal)))))
:<|> ((((Address -> m AddressInfo)
:<|> ((Address -> m AddressInfoExtended)
:<|> (Address -> m AddressDetails)))
:<|> ((Address -> Paged -> SortOrder -> m [AddressUtxo])
:<|> ((Address -> AssetId -> Paged -> SortOrder -> m [AddressUtxo])
:<|> (Address
-> Paged
-> SortOrder
-> Maybe BlockIndex
-> Maybe BlockIndex
-> m [AddressTransaction]))))
:<|> (((Paged -> SortOrder -> m [AssetInfo])
:<|> ((AssetId -> m AssetDetails)
:<|> (AssetId -> Paged -> SortOrder -> m [AssetHistory])))
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetTransaction])
:<|> ((AssetId -> Paged -> SortOrder -> m [AssetAddress])
:<|> (PolicyId -> Paged -> SortOrder -> m [AssetInfo]))))))
:<|> (((((m Block :<|> (Paged -> SortOrder -> m [TxHash]))
:<|> ((Either Integer BlockHash -> m Block)
:<|> (Slot -> m Block)))
:<|> (((Epoch -> Slot -> m Block)
:<|> (Either Integer BlockHash -> Paged -> m [Block]))
:<|> ((Either Integer BlockHash -> Paged -> m [Block])
:<|> ((Either Integer BlockHash
-> Paged -> SortOrder -> m [TxHash])
:<|> (Either Integer BlockHash
-> Paged -> m [(Address, [TxHash])])))))
:<|> (((m EpochInfo :<|> m ProtocolParams)
:<|> ((Epoch -> m EpochInfo)
:<|> ((Epoch -> Paged -> m [EpochInfo])
:<|> (Epoch -> Paged -> m [EpochInfo]))))
:<|> (((Epoch -> Paged -> m [StakeDistribution])
:<|> (Epoch -> PoolId -> Paged -> m [PoolStakeDistribution]))
:<|> ((Epoch -> Paged -> SortOrder -> m [BlockHash])
:<|> ((Epoch -> PoolId -> Paged -> SortOrder -> m [BlockHash])
:<|> (Epoch -> m ProtocolParams))))))
:<|> (m Genesis
:<|> ((Paged -> SortOrder -> m [TxHashObject])
:<|> ((TxHash -> m MempoolTransaction)
:<|> (Address -> Paged -> SortOrder -> m [TxHashObject]))))))
:<|> ((((Paged -> SortOrder -> m [TxMeta])
:<|> ((Text -> Paged -> SortOrder -> m [TxMetaJSON])
:<|> (Text -> Paged -> SortOrder -> m [TxMetaCBOR])))
:<|> ((m Network :<|> m [NetworkEraSummary])
:<|> ((((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])))))))
:<|> (((((Paged -> SortOrder -> m ScriptHashList)
:<|> ((ScriptHash -> m Script)
:<|> (ScriptHash -> Paged -> SortOrder -> m [ScriptRedeemer])))
:<|> (((DatumHash -> m ScriptDatum)
:<|> (DatumHash -> m ScriptDatumCBOR))
:<|> ((ScriptHash -> m ScriptJSON)
:<|> (ScriptHash -> m ScriptCBOR))))
:<|> ((((TxHash -> m Transaction)
:<|> ((TxHash -> m TransactionUtxos)
:<|> (TxHash -> m [TransactionRedeemer])))
:<|> ((TxHash -> m [TransactionStake])
:<|> ((TxHash -> m [TransactionDelegation])
:<|> (TxHash -> m [TransactionWithdrawal]))))
:<|> (((TxHash -> m [TransactionMir])
:<|> ((TxHash -> m [TransactionPoolUpdate])
:<|> (TxHash -> m [TransactionPoolRetiring])))
:<|> ((TxHash -> m [TransactionMetaJSON])
:<|> ((TxHash -> m TransactionCBOR)
:<|> (TxHash -> m [TransactionMetaCBOR]))))))
:<|> ((CBORString -> m TxHash)
:<|> ((Text -> Integer -> Integer -> m DerivedAddress)
:<|> ((CBORString -> m TxEval) :<|> (TxEvalInput -> m TxEval))))))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> BlockfrostV0API (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> BlockfrostV0API (AsClientT m)
api0Client
ipfsClient
:: MonadBlockfrost m
=> Project
-> IPFSAPI (AsClientT m)
ipfsClient :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> IPFSAPI (AsClientT m)
ipfsClient = ((((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange))))
-> IPFSAPI (AsClientT m)
ToServant IPFSAPI (AsClientT m) -> IPFSAPI (AsClientT m)
forall {k} (routes :: k -> *) (mode :: k).
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (((((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange))))
-> IPFSAPI (AsClientT m))
-> (Project
-> (((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange))))
-> Project
-> IPFSAPI (AsClientT m)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BlockfrostV0API (AsClientT m)
-> (((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange)))
BlockfrostV0API (AsClientT m)
-> AsClientT m :- ("ipfs" :> ToServantApi IPFSAPI)
forall route.
BlockfrostV0API route -> route :- ("ipfs" :> ToServantApi IPFSAPI)
_ipfs (BlockfrostV0API (AsClientT m)
-> (((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange))))
-> (Project -> BlockfrostV0API (AsClientT m))
-> Project
-> (((ByteString, Form) -> m IPFSAdd)
:<|> ((Text -> m IPFSData) :<|> (Text -> m IPFSPinChange)))
:<|> ((Paged -> SortOrder -> m [IPFSPin])
:<|> ((Text -> m IPFSPin) :<|> (Text -> m IPFSPinChange)))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> BlockfrostV0API (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> BlockfrostV0API (AsClientT m)
api0Client
nutLinkClient
:: MonadBlockfrost m
=> Project
-> NutLinkAPI (AsClientT m)
nutLinkClient :: forall (m :: * -> *).
MonadBlockfrost m =>
Project -> NutLinkAPI (AsClientT m)
nutLinkClient = (((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text -> Paged -> SortOrder -> m [(Address, NutlinkTicker)])))
-> NutLinkAPI (AsClientT m)
ToServant NutLinkAPI (AsClientT m) -> NutLinkAPI (AsClientT m)
forall {k} (routes :: k -> *) (mode :: k).
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant ((((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text -> Paged -> SortOrder -> m [(Address, NutlinkTicker)])))
-> NutLinkAPI (AsClientT m))
-> (Project
-> ((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text -> Paged -> SortOrder -> m [(Address, NutlinkTicker)])))
-> Project
-> NutLinkAPI (AsClientT m)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BlockfrostV0API (AsClientT m)
-> ((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text -> Paged -> SortOrder -> m [(Address, NutlinkTicker)]))
BlockfrostV0API (AsClientT m)
-> AsClientT m
:- ("nutlink" :> (Tag "Nut.link" :> ToServantApi NutLinkAPI))
forall route.
BlockfrostV0API route
-> route
:- ("nutlink" :> (Tag "Nut.link" :> ToServantApi NutLinkAPI))
_nutLink (BlockfrostV0API (AsClientT m)
-> ((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text -> Paged -> SortOrder -> m [(Address, NutlinkTicker)])))
-> (Project -> BlockfrostV0API (AsClientT m))
-> Project
-> ((Address -> m NutlinkAddress)
:<|> (Address -> Paged -> SortOrder -> m [NutlinkAddressTicker]))
:<|> ((Address -> Text -> Paged -> SortOrder -> m [NutlinkTicker])
:<|> (Text -> Paged -> SortOrder -> m [(Address, NutlinkTicker)]))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> BlockfrostV0API (AsClientT m)
forall (m :: * -> *).
MonadBlockfrost m =>
Project -> BlockfrostV0API (AsClientT m)
api0Client