Skip to content

Actinium-project/ln-plugin-js

Repository files navigation

ln-plugin-js

A simple Lightning Network plugin based on JS

Installation

  • Install node packages with npm install
  • Install mongodb database for your OS
Running
  • Start the web-server with npm start
  • Navigate to http://localhost:3000 in your browser
  • Start ligthningd with ln-plugin-js together, for example: lightningd --conf=YOUR_CONFIG --plugin=./plugin.js
  • Connect or Disconnect with a peer node
  • Refresh the page to see new entries from mongodb

lightning-log

Event Handling

By default the plugin only subscribes to connect and disconnect events from c-lightning. These are defined in the config.json and can be expanded. More info on events and other options can be found here. This plugin can be expanded to do more than only waiting for events. For example, it could define methods to be registered in the lightningd daemon.

LICENSE

MIT