Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- lightningCli :: (MonadReader PlugInfo m, MonadIO m) => PartialCommand -> m (Maybe (Res Value))
- lightningCliDebug :: (String -> IO ()) -> PartialCommand -> PluginMonad a (Maybe (Res Value))
- data Command = Command {}
- type PartialCommand = Id -> Command
- data Res a
Documentation
lightningCli :: (MonadReader PlugInfo m, MonadIO m) => PartialCommand -> m (Maybe (Res Value)) Source #
interface with lightning-rpc.
lightningCliDebug :: (String -> IO ()) -> PartialCommand -> PluginMonad a (Maybe (Res Value)) Source #
log wrapper for easier debugging during development.
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.
type PartialCommand = Id -> Command Source #
Instances
FromJSON a => FromJSON (Res a) Source # | |
ToJSON (Res Value) Source # | |
Generic (Res a) Source # | |
Show a => Show (Res a) Source # | |
type Rep (Res a) Source # | |
Defined in Control.Internal.Conduit type Rep (Res a) = D1 ('MetaData "Res" "Control.Internal.Conduit" "clplug-0.3.1.0-88NRFjkOHTbCuV3xl0kS7v" '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)))) |