No description
Find a file
2024-06-05 15:06:18 -06:00
.ci Refactor CI 2024-06-03 17:06:27 -06:00
.github/workflows CI: only tests plugins on a PR if they were changed 2024-06-05 11:09:55 -06:00
archived Fix rebalance plugin 2024-03-12 10:43:48 -06:00
backup backup: fix backup.md broken link 2024-06-03 19:31:09 -06:00
bolt12-prism@b5a27ca2fa update to latest commit 2024-06-04 18:42:37 -06:00
btcli4j@ecacb049d4 Adding Java API to the list, and another bitcoin backend 2021-06-25 11:52:50 +02:00
circular@516317cde8 circular: add tests 2024-06-05 13:16:34 -06:00
clearnet clearnet: adds clearnet plugin 2023-04-28 14:57:55 +02:00
cln-ntfy@25c3c3e043 cln-ntfy: add very basic test 2024-06-05 15:06:18 -06:00
currencyrate currencyrate: add basic test 2024-06-03 18:30:25 -06:00
datastore datastore: don't fail upgrade test if lightningd has real datastore. 2021-08-30 07:31:33 +02:00
donations build(deps): bump jinja2 from 3.1.3 to 3.1.4 in /donations 2024-06-03 18:50:32 -06:00
feeadjuster feeadjuster: always adhere to the excludelist 2024-05-25 17:00:54 -06:00
go-lnmetrics.reporter@27016cc8e6 Adding go-lnmetrics.reporter 2021-12-12 15:31:38 +01:00
graphql@12888f124b Update submodule plugins to latest version 2021-03-25 15:24:45 +01:00
holdinvoice@e057b3ceb7 holdinvoice: update to v2.0.0 2024-06-05 11:41:05 -06:00
jwt-factory@0280b228f1 Update submodule plugins to latest version 2021-03-25 15:24:45 +01:00
lightning-qt@4619f7984f Update submodule plugins to latest version 2021-03-25 15:24:45 +01:00
monitor monitor: fix cli upstream changes on listpeerchannels 2023-02-08 15:32:42 +01:00
persistent-channels persistent-channels: fix flake8 nits 2020-12-13 15:36:15 +01:00
poncho@e7795d7631 add poncho to the list. 2022-09-13 15:59:38 +02:00
rebalance Fix rebalance plugin 2024-03-12 10:43:48 -06:00
sauron Update requirements.txt 2024-03-04 12:38:24 +00:00
sitzprobe@84347d5519 sitzprobe: Add sitzprobe by @niftynei as a submodule 2019-04-01 18:35:39 +02:00
sling@0759c253f7 sling: update to v2.0.0 2024-06-05 12:42:42 -06:00
summars@e16d42a5b3 summars: update to v3.3.0 2024-06-05 11:31:54 -06:00
trustedcoin@0e240e9a70 Update submodule plugins to latest version 2021-03-25 15:24:45 +01:00
watchtower-client@c9f82bce9f rust-teos: remove deprecated python-teos submodule, use rust-teos instead 2024-04-12 08:58:52 +00:00
webhook@4b75790011 add trustedcoin, sparko and webhook to the main list. 2020-08-28 15:49:00 +02:00
zmq zmq: fix flake8 nits 2020-12-13 15:36:15 +01:00
.coveragerc pytest: Get coverage inside and outside plugins working 2020-08-28 23:06:30 +02:00
.gitignore git: Add reports to .gitignore 2021-09-25 15:03:14 +02:00
.gitmodules change module to https, not ssh 2024-06-04 18:42:37 -06:00
.mergify.yml ci(Mergify): configuration update 2023-03-20 12:25:50 +01:00
conftest.py pytest: Preparing to run integration tests using pytest 2019-03-30 00:03:16 +01:00
Dockerfile Update CLN version in Dockerfile 2024-02-06 20:29:25 +00:00
LICENSE Initial commit 2019-01-17 13:16:45 +01:00
poetry.lock Update packages in pyproject.toml and poetry.lock 2024-02-06 20:29:25 +00:00
pyproject.toml Update packages in pyproject.toml and poetry.lock 2024-02-06 20:29:25 +00:00
pytest.ini pytest: Preparing to run integration tests using pytest 2019-03-30 00:03:16 +01:00
README.md cln-ntfy: add very basic test 2024-06-05 15:06:18 -06:00
sitecustomize.py chore: flake8 nits github sitecustomize.py 2020-12-13 15:36:15 +01:00

Plugins for Core-Lightning

Community curated plugins for Core-Lightning.

Integration Tests (latest) Nightly Integration Tests (master)

Available plugins

Name Short description CLN
GitHub Release
CLN
Static Badge
backup A simple and reliable backup plugin
bolt12-prism Split payments triggered manually or by paying a BOLT 12 invoice
btcli4j A Bitcoin Backend to enable safely the pruning mode, and support also rest APIs.
circular A smart rebalancing plugin for Core Lightning routing nodes
clearnet A plugin that can be used to enforce clearnet connections when possible
cln-ntfy Core Lightning plugin for sending ntfy alerts.
currencyrate A plugin to convert other currencies to BTC using web requests
datastore The Datastore Plugin
donations A simple donations page to accept donations from the web
event-websocket Exposes notifications over a Websocket
feeadjuster Dynamic fees to keep your channels more balanced
go-lnmetrics.reporter Collect and report of the lightning node metrics
graphql Exposes the Core-Lightning API over graphql
holdinvoice Holds htlcs for invoices until settle or cancel is called (aka Hodlinvoices) via RPC/GRPC
invoice-queue Listen to lightning invoices from multiple nodes and send to a redis queue for processing
lightning-qt A bitcoin-qt-like GUI for lightningd
listmempoolfunds Track unconfirmed wallet deposits
monitor helps you analyze the health of your peers and channels
nloop Generic Lightning Loop for boltz
paythrough Pay an invoice through a specific channel, regardless of better routes
persistent-channels Maintains a number of channels to peers
poncho Turns CLN into a hosted channels provider
pruning This plugin manages pruning of bitcoind such that it can always sync
rebalance Keeps your channels balanced
reckless An experimental plugin manager (search/install plugins)
sauron A Bitcoin backend relying on Esplora's API
sitzprobe A Lightning Network payment rehearsal utility
sling Rebalance your channels with smart rules and built-in background tasks
summars Print configurable summary of node, channels and optionally forwards, invoices, payments
trustedcoin Replace your Bitcoin Core with data from public block explorers
watchtower-client Watchtower client for The Eye of Satoshi
webhook Dispatches webhooks based from event notifications
zmq Publishes notifications via ZeroMQ to configured endpoints

Archived plugins

The following is a list of archived plugins that are no longer maintained and reside inside the 'archived' subdirectory. Any plugins that fail CI will be archived.

If you like a plugin from that list, feel free to update and fix it, so we can un-archive it.

Name Short description
autopilot An autopilot that suggests channels that should be established
commando This plugin allows to send commands between nodes
drain Draining, filling and balancing channels with automatic chunks.
helpme This plugin is designed to walk you through setting up a fresh Core-Lightning node
historian Archiving the Lightning Network
jitrebalance The JITrebalance plugin
noise Chat with your fellow node operators
paytest A plugin to benchmark the performance of the pay plugin
probe Regularly probes the network for stability
prometheus Lightning node exporter for the prometheus timeseries server
sparko RPC over HTTP with fine-grained permissions, SSE and spark-wallet support
summary Print a nice summary of the node status

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:

  • The plugin_file_name.py must have executable permissions: chmod a+x plugin_file_name.py
  • A plugin can be written in any programming language, as it interacts with lightningd purely using stdin/stdout pipes.

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:

  • Using pip tools: pip3 install pyln-client pyln-testing
  • Using the PYTHONPATH environment variable to include your clightning's shipped pyln-* libraries:
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:

  • The framework will look for unittest filenames starting with test_.
  • The test functions should also start with test_.
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.

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.

More Plugins from the Community

Plugin Builder Resources