DotNetLightning


DotNetLightning.ClnRpc.Plugin Namespace

"DotNetLightning.ClnRpc.Plugin" contains a utility to build your own c-lightning plugins. All you have to do is 1. write a class which inherits from PluginServerBase. 2. instantiate and run StartAsync method. 3. Compile as a single binary and put it into c-lightning's plugin directory. there is also "PluginLogger" type which can be used for logging in plugin.

Type Description

FeatureSetDTO

GetClientOutputStream

InitDTO

IPluginServer

interface for plugin server It might be useful when you want to call "init"/"getmanifest" in typed client.

LightningInitConfigurationDTO

Manifest

NotificationsDTO

PluginInitializationException

PluginInitializationStatus

PluginJsonRpc

PluginJsonRpcMethodAttribute

Marker attribute for the rpc method handler. It is mostly the same with StreamJsonRpc.JsonRpcMethodAttribute Using this instead of StreamJsonRpc.JsonRpcMethodAttribute will affect the startup behavior of the plugin, so that c-lightning will expose the rpc endpoint to users and the call to c-lightning will be bypassed to the plugin. An argument description and longDescription is a message that users will see in a help call to c-lightning.

PluginJsonRpcSubscriptionAttribute

Marker attribute for the rpc handler to be an subscription handler. Using this instead of PluginJsonRpcMethod will affect the behavior of the getmanifest, so that c-lightning does not expose the method to users. Instead, c-lightning will send a notification topic to the handler with this attribute. pass the topic name of an argument to this attribute.

PluginOptions

PluginOptType

PluginServerBase

abstract base class for your c-lightning plugin. It talks to c-lightning through stdin/stdout. It will automatically create methods necessary for working as a plugin for you.

ProxyDTO

RPCMethod