Plugin class
UnixSocket plugin implementation is the default plugin API used to develop custom plugin for core lightning in dart.
Properties
-
configuration
↔ Map<
String, Object> -
Plugin configuration contains all the information that core
lightning sends to us.
getter/setter pair
- dynamic ↔ bool
-
Marking the plugin as dynamic means that it can be run while
core lightning is already running, if false the plugin can
only be run when core lightning is restarted.
getter/setter pair
-
features
↔ HashMap<
String, Object> -
Featurebits that this plugin will enable when is running
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hooks
↔ HashMap<
String, RPCHook> -
All the hooks where the plugin is subscribed.
getter/setter pair
-
notifications
↔ HashMap<
String, RPCNotification> -
All the notification that the plugin is able to generate.
getter/setter pair
-
onInit
↔ Future<
Map< Function(Plugin)?String, Object> > -
getter/setter pair
-
options
↔ Map<
String, Option> -
The option that the plugin use to configure itself
from the user setting.
getter/setter pair
-
rpcMethods
↔ HashMap<
String, RPCMethod> -
All the rpc method that the plugin expose.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subscriptions
↔ HashMap<
String, RPCNotification> -
All the notification where the plugin is subscribed.
getter/setter pair
Methods
-
configurePlugin(
) → void - configurePlugin is used to configure the plugin that extend this class
-
getManifest(
Plugin plugin, Map< String, Object> request) → Future<Map< String, Object> > - get manifest method used to communicate the plugin configuration to core lightning.
-
getOpt(
{required String key}) → dynamic -
init(
Plugin plugin, Map< String, Object> request) → Future<Map< String, Object> > - init method used to answer to configure the plugin with the core lightning configuration.
-
log(
{required String level, required String message}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerFeature(
{required String name, required String value}) → void -
registerHook(
{required String name, List< String> ? before, List<String> ? after, required Future<Map< callback(Plugin, Map<String, Object> >String, Object> )}) → void -
registerNotification(
{required String event, required Future< Map< onEvent(Plugin, Map<String, Object> >String, Object> )}) → void -
registerOption(
{required String name, required String type, required String def, required String description, bool deprecated = false}) → void -
registerRPCMethod(
{required String name, required String usage, required String description, required Future< Map< callback(Plugin, Map<String, Object> >String, Object> )}) → void - This method is used to register a RPC method with the plugin that could be run by the user.
-
registerSubscriptions(
{required String event, required Future< Map< callback(Plugin, Map<String, Object> >String, Object> )}) → void -
start(
) → void - This method controls the start of the plugin. The plugin's start() method is used to initialize the default configuration and receive the standard input from the core lightning and decoding the JSON from the input message and preparing the plugin object which will allow for a seamless communication between core lightning and the plugin on top of the JSONRPCv2.0 protocol.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited