btc-lsp-0.1.0.0: Lightning service provider
Safe HaskellSafe-Inferred
LanguageHaskell2010

BtcLsp.Data.AppM

Documentation

runApp :: Env -> AppM m a -> m a Source #

newtype AppM m a Source #

Constructors

AppM 

Fields

Instances

Instances details
Monad m => MonadReader Env (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

ask :: AppM m Env #

local :: (Env -> Env) -> AppM m a -> AppM m a #

reader :: (Env -> a) -> AppM m a #

MonadIO m => MonadIO (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

liftIO :: IO a -> AppM m a #

Applicative m => Applicative (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

pure :: a -> AppM m a #

(<*>) :: AppM m (a -> b) -> AppM m a -> AppM m b #

liftA2 :: (a -> b -> c) -> AppM m a -> AppM m b -> AppM m c #

(*>) :: AppM m a -> AppM m b -> AppM m b #

(<*) :: AppM m a -> AppM m b -> AppM m a #

Functor m => Functor (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

fmap :: (a -> b) -> AppM m a -> AppM m b #

(<$) :: a -> AppM m b -> AppM m a #

Monad m => Monad (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

(>>=) :: AppM m a -> (a -> AppM m b) -> AppM m b #

(>>) :: AppM m a -> AppM m b -> AppM m b #

return :: a -> AppM m a #

MonadUnliftIO m => Env (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

getGsEnv :: AppM m GSEnv Source #

getSwapIntoLnMinAmt :: AppM m (Money 'Usr 'OnChain 'Fund) Source #

getMsatPerByte :: AppM m (Maybe MSat) Source #

getLspPubKeyVar :: AppM m (MVar NodePubKey) Source #

getLndP2PSocketAddress :: AppM m SocketAddress Source #

getLndNodeUri :: AppM m NodeUri Source #

getLspPubKey :: AppM m NodePubKey Source #

getLspLndEnv :: AppM m LndEnv Source #

getYesodLog :: AppM m YesodLog Source #

setGrpcCtx :: HasField msg "ctx" Ctx => msg -> AppM m msg Source #

setGrpcCtxT :: HasField msg "ctx" Ctx => msg -> ExceptT Failure (AppM m) msg Source #

withLnd :: (LndEnv -> a) -> (a -> AppM m (Either LndError b)) -> AppM m (Either Failure b) Source #

withLndT :: (LndEnv -> a) -> (a -> AppM m (Either LndError b)) -> ExceptT Failure (AppM m) b Source #

withLndServerT :: GrpcRes res failure specific => (LndEnv -> a) -> (a -> AppM m (Either LndError b)) -> ExceptT res (AppM m) b Source #

withBtc :: (Client -> a) -> (a -> IO b) -> AppM m (Either Failure b) Source #

withBtcT :: (Client -> a) -> (a -> IO b) -> ExceptT Failure (AppM m) b Source #

monitorTotalExtOutgoingLiquidity :: Liquidity 'Outgoing -> AppM m () Source #

monitorTotalExtIncomingLiquidity :: Liquidity 'Incoming -> AppM m () Source #

monitorTotalOnChainLiquidity :: WalletBalance -> AppM m () Source #

MonadUnliftIO m => Storage (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

MonadIO m => Katip (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

getLogEnv :: AppM m LogEnv #

localLogEnv :: (LogEnv -> LogEnv) -> AppM m a -> AppM m a #

MonadIO m => KatipContext (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

MonadUnliftIO m => MonadUnliftIO (AppM m) Source # 
Instance details

Defined in BtcLsp.Data.AppM

Methods

withRunInIO :: ((forall a. AppM m a -> IO a) -> IO b) -> AppM m b #