cln/doc/developers-guide/plugin-development/event-notifications.md
daywalker90 46b039d547
Some checks failed
Continuous Integration / Pre-build checks (push) Has been cancelled
Release Rust 🦀 / release_rust (push) Has been cancelled
ReadMe Sync / rdme-docs-sync (push) Has been cancelled
ReadMe RPC Sync / rdme-rpc-sync (push) Has been cancelled
Continuous Integration / Build compile-clang-sanitizers (push) Has been cancelled
Continuous Integration / Build compile-clang (push) Has been cancelled
Continuous Integration / Build compile-gcc (push) Has been cancelled
Continuous Integration / Build compile-gcc-O1 (push) Has been cancelled
Continuous Integration / Build compile-gcc-O3 (push) Has been cancelled
Continuous Integration / check-compiled-source (compile-gcc) (push) Has been cancelled
Continuous Integration / Run unit tests (push) Has been cancelled
Continuous Integration / Run unit tests-1 (push) Has been cancelled
Continuous Integration / Build 32-bit (size_t != 64-bit warnings) (push) Has been cancelled
Continuous Integration / Run fuzz regression tests (push) Has been cancelled
Continuous Integration / Check we can downgrade the node (push) Has been cancelled
Continuous Integration / Check we can downgrade the node-1 (push) Has been cancelled
Continuous Integration / Check we can downgrade the node-2 (push) Has been cancelled
Continuous Integration / First Integration Tests (1/6) (push) Has been cancelled
Continuous Integration / First Integration Tests (2/6) (push) Has been cancelled
Continuous Integration / First Integration Tests (3/6) (push) Has been cancelled
Continuous Integration / First Integration Tests (4/6) (push) Has been cancelled
Continuous Integration / First Integration Tests (5/6) (push) Has been cancelled
Continuous Integration / First Integration Tests (6/6) (push) Has been cancelled
Continuous Integration / Test CLN dual-fund Full Integration (push) Has been cancelled
Continuous Integration / Test CLN liquid Full Integration (push) Has been cancelled
Continuous Integration / Test CLN postgres Full Integration (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (1/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (10/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (11/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (12/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (2/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (3/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (4/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (5/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (6/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (7/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (8/12) (push) Has been cancelled
Continuous Integration / Valgrind Test CLN (9/12) (push) Has been cancelled
Continuous Integration / ASan/UBSan (1/6) (push) Has been cancelled
Continuous Integration / ASan/UBSan (2/6) (push) Has been cancelled
Continuous Integration / ASan/UBSan (3/6) (push) Has been cancelled
Continuous Integration / ASan/UBSan (4/6) (push) Has been cancelled
Continuous Integration / ASan/UBSan (5/6) (push) Has been cancelled
Continuous Integration / ASan/UBSan (6/6) (push) Has been cancelled
Continuous Integration / Update examples in doc schemas (disabled temporarily!) (push) Has been cancelled
Continuous Integration / Test minimum supported BTC v25.0 with clang (push) Has been cancelled
Continuous Integration / CI completion (push) Has been cancelled
schemas: add offer_id to invoice_creation notification
Also partially reverts f96099691b which was not properly rebased

Changelog-None
2026-06-10 20:04:31 +02:00

1.5 KiB

title slug privacy
Event notifications event-notifications
view
public

Event notifications allow a plugin to subscribe to events in lightningd. lightningd will then send a push notification if an event matching the subscription occurred. A notification is defined in the JSON-RPC [specification][jsonrpc-spec] as an RPC call that does not include an id parameter:

A Notification is a Request object without an "id" member. A Request object that is a Notification signifies the Client's lack of interest in the corresponding Response object, and as such no Response object needs to be returned to the client. The Server MUST NOT reply to a Notification, including those that are within a batch request.

Notifications are not confirmable by definition, since they do not have a Response object to be returned. As such, the Client would not be aware of any errors (like e.g. "Invalid params","Internal error").

Plugins subscribe by returning an array of subscriptions as part of the getmanifest response. The result for the getmanifest call above for example subscribes to the two topics connect and disconnect.

📘

This is a way of specifying that you want to subscribe to all possible event notifications. It is not recommended, but is useful for plugins which want to provide generic infrastructure for others (in future, we may add the ability to dynamically subscribe/unsubscribe).

Lookup the Notification APIs for details on each notification and their payload.