-- | Account queries

module Blockfrost.Client.Cardano.Accounts
  ( getAccount
  , getAccountRewards
  , getAccountRewards'
  , getAccountHistory
  , getAccountHistory'
  , getAccountDelegations
  , getAccountDelegations'
  , getAccountRegistrations
  , getAccountRegistrations'
  , getAccountWithdrawals
  , getAccountWithdrawals'
  , getAccountMirs
  , getAccountMirs'
  , getAccountAssociatedAddresses
  , getAccountAssociatedAddresses'
  , getAccountAssociatedAssets
  , getAccountAssociatedAssets'
  ) where

import Blockfrost.API
import Blockfrost.Client.Types
import Blockfrost.Types

accountsClient :: Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient :: Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient = ((((Address
    -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
   :<|> (Address
         -> Paged
         -> SortOrder
         -> ExceptT
              BlockfrostError (ReaderT ClientConfig IO) [AccountReward]))
  :<|> ((Address
         -> Paged
         -> SortOrder
         -> ExceptT
              BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
        :<|> (Address
              -> Paged
              -> SortOrder
              -> ExceptT
                   BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])))
 :<|> (((Address
         -> Paged
         -> SortOrder
         -> ExceptT
              BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
        :<|> (Address
              -> Paged
              -> SortOrder
              -> ExceptT
                   BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]))
       :<|> ((Address
              -> Paged
              -> SortOrder
              -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
             :<|> ((Address
                    -> Paged
                    -> SortOrder
                    -> ExceptT
                         BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
                   :<|> (Address
                         -> Paged
                         -> SortOrder
                         -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount])))))
-> AccountsAPI (AsClientT BlockfrostClient)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (((((Address
     -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
    :<|> (Address
          -> Paged
          -> SortOrder
          -> ExceptT
               BlockfrostError (ReaderT ClientConfig IO) [AccountReward]))
   :<|> ((Address
          -> Paged
          -> SortOrder
          -> ExceptT
               BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
         :<|> (Address
               -> Paged
               -> SortOrder
               -> ExceptT
                    BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])))
  :<|> (((Address
          -> Paged
          -> SortOrder
          -> ExceptT
               BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
         :<|> (Address
               -> Paged
               -> SortOrder
               -> ExceptT
                    BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]))
        :<|> ((Address
               -> Paged
               -> SortOrder
               -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
              :<|> ((Address
                     -> Paged
                     -> SortOrder
                     -> ExceptT
                          BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
                    :<|> (Address
                          -> Paged
                          -> SortOrder
                          -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount])))))
 -> AccountsAPI (AsClientT BlockfrostClient))
-> (Project
    -> (((Address
          -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
         :<|> (Address
               -> Paged
               -> SortOrder
               -> ExceptT
                    BlockfrostError (ReaderT ClientConfig IO) [AccountReward]))
        :<|> ((Address
               -> Paged
               -> SortOrder
               -> ExceptT
                    BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
              :<|> (Address
                    -> Paged
                    -> SortOrder
                    -> ExceptT
                         BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])))
       :<|> (((Address
               -> Paged
               -> SortOrder
               -> ExceptT
                    BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
              :<|> (Address
                    -> Paged
                    -> SortOrder
                    -> ExceptT
                         BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]))
             :<|> ((Address
                    -> Paged
                    -> SortOrder
                    -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
                   :<|> ((Address
                          -> Paged
                          -> SortOrder
                          -> ExceptT
                               BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
                         :<|> (Address
                               -> Paged
                               -> SortOrder
                               -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount])))))
-> Project
-> AccountsAPI (AsClientT BlockfrostClient)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CardanoAPI (AsClientT BlockfrostClient)
-> (((Address
      -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
     :<|> (Address
           -> Paged
           -> SortOrder
           -> ExceptT
                BlockfrostError (ReaderT ClientConfig IO) [AccountReward]))
    :<|> ((Address
           -> Paged
           -> SortOrder
           -> ExceptT
                BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
          :<|> (Address
                -> Paged
                -> SortOrder
                -> ExceptT
                     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])))
   :<|> (((Address
           -> Paged
           -> SortOrder
           -> ExceptT
                BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
          :<|> (Address
                -> Paged
                -> SortOrder
                -> ExceptT
                     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]))
         :<|> ((Address
                -> Paged
                -> SortOrder
                -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
               :<|> ((Address
                      -> Paged
                      -> SortOrder
                      -> ExceptT
                           BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
                     :<|> (Address
                           -> Paged
                           -> SortOrder
                           -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]))))
forall route.
CardanoAPI route
-> route
   :- ("accounts"
       :> (Tag "Cardano \187 Accounts" :> ToServantApi AccountsAPI))
_accounts (CardanoAPI (AsClientT BlockfrostClient)
 -> (((Address
       -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
      :<|> (Address
            -> Paged
            -> SortOrder
            -> ExceptT
                 BlockfrostError (ReaderT ClientConfig IO) [AccountReward]))
     :<|> ((Address
            -> Paged
            -> SortOrder
            -> ExceptT
                 BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
           :<|> (Address
                 -> Paged
                 -> SortOrder
                 -> ExceptT
                      BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])))
    :<|> (((Address
            -> Paged
            -> SortOrder
            -> ExceptT
                 BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
           :<|> (Address
                 -> Paged
                 -> SortOrder
                 -> ExceptT
                      BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]))
          :<|> ((Address
                 -> Paged
                 -> SortOrder
                 -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
                :<|> ((Address
                       -> Paged
                       -> SortOrder
                       -> ExceptT
                            BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
                      :<|> (Address
                            -> Paged
                            -> SortOrder
                            -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount])))))
-> (Project -> CardanoAPI (AsClientT BlockfrostClient))
-> Project
-> (((Address
      -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
     :<|> (Address
           -> Paged
           -> SortOrder
           -> ExceptT
                BlockfrostError (ReaderT ClientConfig IO) [AccountReward]))
    :<|> ((Address
           -> Paged
           -> SortOrder
           -> ExceptT
                BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
          :<|> (Address
                -> Paged
                -> SortOrder
                -> ExceptT
                     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])))
   :<|> (((Address
           -> Paged
           -> SortOrder
           -> ExceptT
                BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
          :<|> (Address
                -> Paged
                -> SortOrder
                -> ExceptT
                     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]))
         :<|> ((Address
                -> Paged
                -> SortOrder
                -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
               :<|> ((Address
                      -> Paged
                      -> SortOrder
                      -> ExceptT
                           BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
                     :<|> (Address
                           -> Paged
                           -> SortOrder
                           -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]))))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> CardanoAPI (AsClientT BlockfrostClient)
cardanoClient

getAccount_ :: Project -> Address -> BlockfrostClient AccountInfo
getAccount_ :: Project
-> Address
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo
getAccount_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo
forall route.
AccountsAPI route
-> route
   :- (Summary "Specific account address"
       :> (Description
             "Obtain information about a specific stake account."
           :> (Capture "stake_address" Address :> Get '[JSON] AccountInfo)))
_account (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about a specific stake account.
getAccount :: Address -> BlockfrostClient AccountInfo
getAccount :: Address
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo
getAccount Address
a = (Project
 -> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo)
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (Project
-> Address
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) AccountInfo
`getAccount_` Address
a)

getAccountRewards_ :: Project -> Address -> Paged -> SortOrder -> BlockfrostClient [AccountReward]
getAccountRewards_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
getAccountRewards_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
forall route.
AccountsAPI route
-> route
   :- (Summary "Specific reward history"
       :> (Description
             "Obtain information about the reward history of a specific account."
           :> (Capture "stake_address" Address
               :> ("rewards"
                   :> (Pagination :> (Sorting :> Get '[JSON] [AccountReward]))))))
_accountRewards (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountReward])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about the history of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountRewards' :: Address -> Paged -> SortOrder -> BlockfrostClient [AccountReward]
getAccountRewards' :: Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
getAccountRewards' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountReward])
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
getAccountRewards_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about the history of a specific account.
getAccountRewards :: Address -> BlockfrostClient [AccountReward]
getAccountRewards :: Address
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
getAccountRewards Address
a = Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountReward]
getAccountRewards' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def

getAccountHistory_ :: Project -> Address -> Paged -> SortOrder -> BlockfrostClient [AccountHistory]
getAccountHistory_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
getAccountHistory_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
forall route.
AccountsAPI route
-> route
   :- (Summary "Account history"
       :> (Description
             "Obtain information about the history of a specific account."
           :> (Capture "stake_address" Address
               :> ("history"
                   :> (Pagination :> (Sorting :> Get '[JSON] [AccountHistory]))))))
_accountHistory (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about the history of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountHistory' :: Address -> Paged -> SortOrder -> BlockfrostClient [AccountHistory]
getAccountHistory' :: Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
getAccountHistory' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountHistory])
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
getAccountHistory_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about the history of a specific account.
getAccountHistory :: Address -> BlockfrostClient [AccountHistory]
getAccountHistory :: Address
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
getAccountHistory Address
a = Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountHistory]
getAccountHistory' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def

getAccountDelegations_ :: Project -> Address -> Paged -> SortOrder -> BlockfrostClient [AccountDelegation]
getAccountDelegations_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
getAccountDelegations_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
forall route.
AccountsAPI route
-> route
   :- (Summary "Account delegation history"
       :> (Description
             "Obtain information about the delegation of a specific account."
           :> (Capture "stake_address" Address
               :> ("delegations"
                   :> (Pagination :> (Sorting :> Get '[JSON] [AccountDelegation]))))))
_accountDelegations (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about the delegation of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountDelegations' :: Address -> Paged -> SortOrder -> BlockfrostClient [AccountDelegation]
getAccountDelegations' :: Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
getAccountDelegations' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation])
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
getAccountDelegations_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about the delegation of a specific account.
getAccountDelegations :: Address -> BlockfrostClient [AccountDelegation]
getAccountDelegations :: Address
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
getAccountDelegations Address
a = Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountDelegation]
getAccountDelegations' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def

getAccountRegistrations_ :: Project -> Address -> Paged -> SortOrder -> BlockfrostClient [AccountRegistration]
getAccountRegistrations_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
getAccountRegistrations_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
forall route.
AccountsAPI route
-> route
   :- (Summary "Account registration history"
       :> (Description
             "Obtain information about the registrations and deregistrations of a specific account."
           :> (Capture "stake_address" Address
               :> ("registrations"
                   :> (Pagination
                       :> (Sorting :> Get '[JSON] [AccountRegistration]))))))
_accountRegistrations (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about the registrations and deregistrations of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountRegistrations' :: Address -> Paged -> SortOrder -> BlockfrostClient [AccountRegistration]
getAccountRegistrations' :: Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
getAccountRegistrations' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration])
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
getAccountRegistrations_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about the registrations and deregistrations of a specific account.
getAccountRegistrations :: Address -> BlockfrostClient [AccountRegistration]
getAccountRegistrations :: Address
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
getAccountRegistrations Address
a = Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountRegistration]
getAccountRegistrations' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def

getAccountWithdrawals_ :: Project -> Address -> Paged -> SortOrder ->  BlockfrostClient [AccountWithdrawal]
getAccountWithdrawals_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
getAccountWithdrawals_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
forall route.
AccountsAPI route
-> route
   :- (Summary "Account withdrawal history"
       :> (Description
             "Obtain information about the withdrawals of a specific account."
           :> (Capture "stake_address" Address
               :> ("withdrawals"
                   :> (Pagination :> (Sorting :> Get '[JSON] [AccountWithdrawal]))))))
_accountWithdrawals (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about the withdrawals of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountWithdrawals' :: Address -> Paged -> SortOrder -> BlockfrostClient [AccountWithdrawal]
getAccountWithdrawals' :: Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
getAccountWithdrawals' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal])
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
getAccountWithdrawals_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about the withdrawals of a specific account.
getAccountWithdrawals :: Address -> BlockfrostClient [AccountWithdrawal]
getAccountWithdrawals :: Address
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
getAccountWithdrawals Address
a = Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AccountWithdrawal]
getAccountWithdrawals' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def

getAccountMirs_ :: Project -> Address -> Paged -> SortOrder -> BlockfrostClient [AccountMir]
getAccountMirs_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
getAccountMirs_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
forall route.
AccountsAPI route
-> route
   :- (Summary "Account MIR history"
       :> (Description
             "Obtain information about the MIRs of a specific account."
           :> (Capture "stake_address" Address
               :> ("mirs"
                   :> (Pagination :> (Sorting :> Get '[JSON] [AccountMir]))))))
_accountMirs (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about the MIRs of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountMirs' :: Address -> Paged -> SortOrder -> BlockfrostClient [AccountMir]
getAccountMirs' :: Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
getAccountMirs' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir])
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
getAccountMirs_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about the MIRs of a specific account.
getAccountMirs :: Address -> BlockfrostClient [AccountMir]
getAccountMirs :: Address
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
getAccountMirs Address
a = Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [AccountMir]
getAccountMirs' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def

getAccountAssociatedAddresses_ :: Project -> Address -> Paged -> SortOrder -> BlockfrostClient [AddressAssociated]
getAccountAssociatedAddresses_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
getAccountAssociatedAddresses_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
forall route.
AccountsAPI route
-> route
   :- (Summary "Account associated addresses"
       :> (Description
             "Obtain information about the addresses of a specific account."
           :> (Capture "stake_address" Address
               :> ("addresses"
                   :> (Pagination :> (Sorting :> Get '[JSON] [AddressAssociated]))))))
_accountAssociatedAddresses (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about the addresses of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountAssociatedAddresses' :: Address -> Paged -> SortOrder -> BlockfrostClient [AddressAssociated]
getAccountAssociatedAddresses' :: Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
getAccountAssociatedAddresses' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT
      BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated])
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
getAccountAssociatedAddresses_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about the addresses of a specific account.
getAccountAssociatedAddresses :: Address -> BlockfrostClient [AddressAssociated]
getAccountAssociatedAddresses :: Address
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
getAccountAssociatedAddresses Address
a = Address
-> Paged
-> SortOrder
-> ExceptT
     BlockfrostError (ReaderT ClientConfig IO) [AddressAssociated]
getAccountAssociatedAddresses' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def

getAccountAssociatedAssets_ :: Project -> Address -> Paged -> SortOrder -> BlockfrostClient [Amount]
getAccountAssociatedAssets_ :: Project
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
getAccountAssociatedAssets_ = AccountsAPI (AsClientT BlockfrostClient)
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
forall route.
AccountsAPI route
-> route
   :- (Summary "Assets associated with the account addresses"
       :> (Description
             "Obtain information about assets associated with addresses of a specific account."
           :> (Capture "stake_address" Address
               :> ("addresses"
                   :> ("assets"
                       :> (Pagination :> (Sorting :> Get '[JSON] [Amount])))))))
_accountAssociatedAssets (AccountsAPI (AsClientT BlockfrostClient)
 -> Address
 -> Paged
 -> SortOrder
 -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount])
-> (Project -> AccountsAPI (AsClientT BlockfrostClient))
-> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Project -> AccountsAPI (AsClientT BlockfrostClient)
accountsClient

-- | Obtain information about assets associated with addresses of a specific account.
-- Allows custom paging and ordering using @Paged@ and @SortOrder@.
getAccountAssociatedAssets' :: Address -> Paged -> SortOrder -> BlockfrostClient [Amount]
getAccountAssociatedAssets' :: Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
getAccountAssociatedAssets' Address
a Paged
pg SortOrder
s = (Project
 -> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount])
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
forall a. (Project -> BlockfrostClient a) -> BlockfrostClient a
go (\Project
p -> Project
-> Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
getAccountAssociatedAssets_ Project
p Address
a Paged
pg SortOrder
s)

-- | Obtain information about assets associated with addresses of a specific account.
getAccountAssociatedAssets :: Address -> BlockfrostClient [Amount]
getAccountAssociatedAssets :: Address
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
getAccountAssociatedAssets Address
a = Address
-> Paged
-> SortOrder
-> ExceptT BlockfrostError (ReaderT ClientConfig IO) [Amount]
getAccountAssociatedAssets' Address
a Paged
forall a. Default a => a
def SortOrder
forall a. Default a => a
def