Home

Awesome

Plugins for Core-Lightning

Community curated plugins for Core-Lightning.

Integration Tests (latest) Nightly Integration Tests (master)

Available plugins

NameShort descriptionCLN<br>24.02/24.05/24.08/master
backupA simple and reliable backup plugin
bolt12-prismSplit payments triggered manually or by paying a BOLT 12
btcli4jA Bitcoin Backend to enable safely the pruning mode, and support also rest APIs.
clearnetA plugin that can be used to enforce clearnet connections when possible
cln-ntfyCore Lightning plugin for sending ntfy alerts.
clnrest-rsDrop-in rust implementation of CLN's clnrest.py
clnrodChannel acceptor plugin. Configurable with external data from amboss/1ml and notifications
currencyrateA plugin to convert other currencies to BTC using web requests
datastoreThe Datastore Plugin
donationsA simple donations page to accept donations from the web
event-websocketExposes notifications over a Websocket
feeadjusterDynamic fees to keep your channels more balanced
go-lnmetrics.reporterCollect and report of the lightning node metrics
graphqlExposes the Core-Lightning API over graphql
holdHold invoices that do not require the preimage to be known when created
holdinvoiceHolds htlcs for invoices until settle or cancel is called (aka Hodlinvoices) via RPC/GRPC
invoice-queueListen to lightning invoices from multiple nodes and send to a redis queue for processing
lightning-qtA bitcoin-qt-like GUI for lightningd
ln-address-payAllows payments to lightning addresses
monitorhelps you analyze the health of your peers and channels
nloopGeneric Lightning Loop for boltz
persistent-channelsMaintains a number of channels to peers
ponchoTurns CLN into a hosted channels provider
pruningThis plugin manages pruning of bitcoind such that it can always sync
rebalanceKeeps your channels balanced
sauronA Bitcoin backend relying on Esplora's API
sitzprobeA Lightning Network payment rehearsal utility
slingRebalance your channels with smart rules and built-in background tasks
summarsPrint configurable summary of node, channels and optionally forwards, invoices, payments
summaryPrint a nice summary of the node status
torq-pluginBetter CLN integration into Torq
trustedcoinReplace your Bitcoin Core with data from public block explorers
watchtower-clientWatchtower client for The Eye of Satoshi
webhookDispatches webhooks based from event notifications
zmqPublishes notifications via ZeroMQ to configured endpoints

Plugin Managers

This is a list of plugin managers that can help you install these plugins:

NameShort description
coffeeReference implementation for a flexible core lightning plugin manager
recklessComes with CLN. Reckless currently supports python and javascript plugins.

Archived plugins

If you can't find a plugin you're looking for, it may have been archived. Plugins are archived when they start to fail integration testing with the latest CLN release, at which point they will be considered unmaintained.

Installation

To install and activate a plugin you need to stop your lightningd and restart it with the plugin argument like this:

lightningd --plugin=/path/to/plugin/directory/plugin_file_name.py

Notes:

Automatic plugin initialization

Alternatively, especially when you use multiple plugins, you can copy or symlink all plugin directories into your ~/.lightning/plugins directory. The daemon will load each executable it finds in sub-directories as a plugin. In this case you don't need to manage all the --plugin=... parameters.

Dynamic plugin initialization

Most of the plugins can be managed using the RPC interface. Use

lightning-cli plugin start /path/to/plugin/directory/plugin_file_name

to start it, and

lightning-cli plugin stop /path/to/plugin/directory/plugin_file_name

to stop it.

As a plugin developer this option is configurable with all the available plugin libraries, and defaults to true.

PYTHONPATH and pyln

To simplify plugin development you can rely on pyln-client for the plugin implementation, pyln-proto if you need to parse or write lightning protocol messages, and pyln-testing in order to write tests. These libraries can be retrieved in a number of different ways:

export PYTHONPATH=/path/to/lightnind/contrib/pyln-client:/path/to/lightnind/contrib/pyln-testing:$PYTHONPATH

Writing tests

The pyln-testing library provides a number of helpers and fixtures to write tests. While not strictly necessary, writing a test will ensure that your plugin is working correctly against a number of configurations (both with and without DEVELOPER, COMPAT and EXPERIMENTAL_FEATURES), and more importantly that they will continue to work with newly release versions of Core-Lightning.

Writing a test is as simple as this:

from pyln.testing.fixtures import *

pluginopt = {'plugin': os.path.join(os.path.dirname(__file__), "YOUR_PLUGIN.py")}

def test_your_plugin(node_factory, bitcoind):
    l1 = node_factory.get_node(options=pluginopt)
    s = l1.rpc.getinfo()
    assert(s['network'] == 'regtest') # or whatever you want to test

Tests are run against pull requests, all commits on master, as well as once ever 24 hours to test against the latest master branch of the Core-Lightning development tree.

Running tests locally can be done like this: (make sure the PYTHONPATH env variable is correct)

pytest YOUR_PLUGIN/YOUR_TEST.py

Python plugins specifics

Additional dependencies

Additionally, some Python plugins come with a requirements.txt which can be used to install the plugin's dependencies using the pip tools:

pip3 install -r requirements.txt

Note: You might need to also specify the --user command line flag depending on your environment.

Contributing

Minimum supported Python version

The minimum supported version of Python for this repository is currently 3.8.x (14 Oct 2019). Python plugins users must ensure to have a version >= 3.8. Python plugins developers must ensure their plugin to work with all Python versions >= 3.8.

Recommended commits format

Whenever submitting code contributions for this repository, we should try to stick to the format 'lightning' uses, something like:

plugin name: One subject line
        (empty line)
more detailed description (if any)

More Plugins from the Community

Plugin Builder Resources