module Tendermint.SDK.Modules.Bank
(
Bank
, bankModule
, module Tendermint.SDK.Modules.Bank.Keeper
, module Tendermint.SDK.Modules.Bank.Messages
, module Tendermint.SDK.Modules.Bank.Query
, module Tendermint.SDK.Modules.Bank.Router
, module Tendermint.SDK.Modules.Bank.Types
) where
import Data.Proxy
import Polysemy (Members)
import Tendermint.SDK.Application (Module (..), ModuleEffs)
import Tendermint.SDK.BaseApp (DefaultCheckTx (..))
import qualified Tendermint.SDK.Modules.Auth as Auth
import Tendermint.SDK.Modules.Bank.Keeper
import Tendermint.SDK.Modules.Bank.Messages
import Tendermint.SDK.Modules.Bank.Query
import Tendermint.SDK.Modules.Bank.Router
import Tendermint.SDK.Modules.Bank.Types
type Bank =
Module BankName MessageApi MessageApi QueryApi BankEffs '[Auth.Auth]
bankModule
:: Members (ModuleEffs Bank) r
=> Bank r
bankModule :: Bank r
bankModule = Module :: forall (name :: Symbol) check deliver query (es :: EffectRow)
(deps :: [Component]) (r :: EffectRow).
RouteTx check r
-> RouteTx deliver r
-> RouteQ query r
-> (forall (s :: EffectRow) a.
(Members TxEffs s, Members BaseEffs s,
Members (DependencyEffs deps) s) =>
Sem (es :& s) a -> Sem s a)
-> Module name check deliver query es deps r
Module
{ moduleTxDeliverer :: RouteTx MessageApi r
moduleTxDeliverer = RouteTx MessageApi r
forall (r :: EffectRow). Members BankEffs r => RouteTx MessageApi r
messageHandlers
, moduleTxChecker :: RouteTx MessageApi r
moduleTxChecker = Proxy MessageApi -> Proxy r -> DefaultCheckTxT MessageApi r
forall k (api :: k) (r :: EffectRow).
DefaultCheckTx api r =>
Proxy api -> Proxy r -> DefaultCheckTxT api r
defaultCheckTx (Proxy MessageApi
forall k (t :: k). Proxy t
Proxy :: Proxy MessageApi) (forall k (t :: k). Proxy t
Proxy :: Proxy r)
, moduleQuerier :: RouteQ QueryApi r
moduleQuerier = RouteQ QueryApi r
forall (r :: EffectRow). Member BankKeeper r => RouteQ QueryApi r
querier
, moduleEval :: forall (s :: EffectRow) a.
(Members TxEffs s, Members BaseEffs s,
Members (DependencyEffs '[Auth]) s) =>
Sem (BankEffs :& s) a -> Sem s a
moduleEval = forall (r :: EffectRow) a.
(Members '[Logger, Output Event, Error AppError] r,
Members AuthEffs r) =>
Sem (BankKeeper : Error BankError : r) a -> Sem r a
forall (s :: EffectRow) a.
(Members TxEffs s, Members BaseEffs s,
Members (DependencyEffs '[Auth]) s) =>
Sem (BankEffs :& s) a -> Sem s a
eval
}