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

BtcLsp.Class.Env

Documentation

class (MonadUnliftIO m, KatipContext m, Storage m) => Env m where Source #

Methods

getGsEnv :: m GSEnv Source #

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

getMsatPerByte :: m (Maybe MSat) Source #

getLspPubKeyVar :: m (MVar NodePubKey) Source #

getLndP2PSocketAddress :: m SocketAddress Source #

getLndNodeUri :: m NodeUri Source #

getLspPubKey :: m NodePubKey Source #

getLspLndEnv :: m LndEnv Source #

getYesodLog :: m YesodLog Source #

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

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

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

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

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

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

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

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

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

monitorTotalOnChainLiquidity :: WalletBalance -> m () Source #

Instances

Instances details
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 #