Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- lightningCli :: (MonadReader Plug m, MonadIO m) => PartialCommand -> m (Maybe (Res Value))
- lightningCliDebug :: (MonadReader Plug m, MonadIO m) => (String -> IO ()) -> PartialCommand -> m (Maybe (Res Value))
- data Command = Command {}
- type PartialCommand = Id -> Command
- data Res a
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.
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.
Instances
ToJSON Command Source # | |
Defined in Control.Client | |
Show Command Source # | |
Show PartialCommand Source # | |
Defined in Control.Client showsPrec :: Int -> PartialCommand -> ShowS # show :: PartialCommand -> String # showList :: [PartialCommand] -> ShowS # |
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.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)))) |