clplug-0.4.0.0: Create Core Lightning Plugins
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Client

Synopsis

Documentation

lightningCli :: (MonadReader Plug m, MonadIO m) => PartialCommand -> m (Maybe (Res Value)) Source #

interface with lightning-rpc.

lightningCliDebug :: (MonadReader Plug m, MonadIO m) => (String -> IO ()) -> PartialCommand -> m (Maybe (Res Value)) Source #

log wrapper for easier debugging during development.

data Command Source #

commands to core lightning are defined by the set of plugins and version of core lightning so this is generic and you should refer to lightning-cli help command for the details of the command you are interested in. A filter object is used to specify the data you desire returned (i.e. {"id":True}) and params are the named fields of the command.

Constructors

Command 

Instances

Instances details
ToJSON Command Source # 
Instance details

Defined in Control.Client

Show Command Source # 
Instance details

Defined in Control.Client

Show PartialCommand Source # 
Instance details

Defined in Control.Client

data Res a Source #

Constructors

Res 

Fields

ErrRes 

Fields

Instances

Instances details
FromJSON a => FromJSON (Res a) Source # 
Instance details

Defined in Control.Internal.Conduit

Methods

parseJSON :: Value -> Parser (Res a) #

parseJSONList :: Value -> Parser [Res a] #

ToJSON (Res Value) Source # 
Instance details

Defined in Control.Internal.Conduit

Generic (Res a) Source # 
Instance details

Defined in Control.Internal.Conduit

Associated Types

type Rep (Res a) :: Type -> Type #

Methods

from :: Res a -> Rep (Res a) x #

to :: Rep (Res a) x -> Res a #

Show a => Show (Res a) Source # 
Instance details

Defined in Control.Internal.Conduit

Methods

showsPrec :: Int -> Res a -> ShowS #

show :: Res a -> String #

showList :: [Res a] -> ShowS #

type Rep (Res a) Source # 
Instance details

Defined in Control.Internal.Conduit

type Rep (Res a) = D1 ('MetaData "Res" "Control.Internal.Conduit" "clplug-0.4.0.0-H13vPirYGUVJvxm1SbyeXI" 'False) (C1 ('MetaCons "Res" 'PrefixI 'True) (S1 ('MetaSel ('Just "getResBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "getResId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)) :+: C1 ('MetaCons "ErrRes" 'PrefixI 'True) (S1 ('MetaSel ('Just "errMsg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "errId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Value))))