cln/plugins
daywalker90 62c1b705f2 cln-plugin: return rpc error instead of exiting on invalid json input
CLN is too permissive for serde_json when validating json:

`lightning-cli -k myplugin-cmd channels='[123456x1x0]'`

is valid for lightning-cli but is actually invalid json (bare token in array).

The cln-plugin decoder would error and end the FramedRead stream, causing the
PluginDriver loop to exit, and therefore exiting the plugin itself.

We need to recover the id from the invalid json with a separate parser to return a
json rpc error to CLN with the correct id so the rpc command does not hang.

Changelog-None
2026-08-13 12:14:14 +02:00
..
askrene askrene: explain failure: add known enabled case 2026-08-04 18:51:43 -03:00
bip353-plugin crates: formatting with new 2024 edition rules 2026-04-24 15:48:06 +02:00
bkpr common: hoist hash_str helper into its own header. 2026-08-04 18:51:43 -03:00
bwatch bwatch: gate chain polling behind --experimental-bwatch 2026-05-11 15:51:05 +09:30
currencyrate-plugin currencyrate: vendor root certificates with webpki-roots 2026-06-25 12:11:15 +09:30
examples cln-plugin: include the full error chain when given a context 2026-07-06 19:25:22 +02:00
grpc-plugin crates: bump cln-rpc, cln-grpc and cln-plugin to v0.7.0 for release 2026-05-25 17:32:59 +02:00
lsps-plugin msggen: new rust types for sat and sat_or_all 2026-07-17 10:16:18 +02:00
renepay renepay: fix CLTV value for the first hop 2026-07-18 13:09:45 +02:00
rest-plugin crates: update dependencies and upgrade quick-xml, tower-http, and tokio-tungstenite 2026-07-14 11:16:17 +02:00
spender multiwithdraw: use unique ids on requests. 2026-08-04 18:51:43 -03:00
src cln-plugin: return rpc error instead of exiting on invalid json input 2026-08-13 12:14:14 +02:00
test offers: limit invoices to 10 minutes for recurring offers in other currencies. 2026-08-04 18:51:43 -03:00
wss-proxy-plugin crates: update dependencies and upgrade quick-xml, tower-http, and tokio-tungstenite 2026-07-14 11:16:17 +02:00
xpay xpay: actually tell askrene when a payment succeeded. 2026-08-04 18:51:43 -03:00
.gitignore plugins: rename bwatch output binary to cln-bwatch 2026-06-05 12:03:38 +02:00
autoclean.c plugins: simplify datastore interfaces now callers have mkdatastorekey. 2026-03-23 14:03:17 +10:00
bcli.c Improve reliability of wait_and_check_bitcoind 2026-07-14 22:07:13 -03:00
Cargo.toml cln-subscribe-wildcard: properly handle shutdown notification with an exit 2026-06-17 18:49:59 +09:30
chanbackup.c chanbackup: Store the latest recvd peer storage only 2026-05-07 12:36:26 +10:00
channel_hint.c bitcoin: hash_scid and hash_scidd public functions. 2026-02-19 17:04:35 +10:30
channel_hint.h bitcoin: hash_scid and hash_scidd public functions. 2026-02-19 17:04:35 +10:30
commando.c libplugins: JSON ids are always strings. 2026-08-04 18:51:43 -03:00
establish_onion_path.c global: remove unnecessary includes from C files. 2025-10-23 06:44:04 +10:30
establish_onion_path.h global: remove unnecessary includes from headers. 2025-10-23 06:44:04 +10:30
exposesecret.c ccan: update to get improved grab_file API, and adapt code. 2025-10-26 12:37:58 +10:30
fetchinvoice.c fetchinvoice: handle weird labels in recurrence_label parameter. 2026-08-04 18:51:43 -03:00
fetchinvoice.h plugins: cancelrecurringinvoice command. 2025-10-01 15:31:30 +09:30
funder.c libplugin: hand command, not plugin, to parsing functions. 2026-03-23 14:03:17 +10:00
funder_policy.c libplugin: hand command, not plugin, to parsing functions. 2026-03-23 14:03:17 +10:00
funder_policy.h libplugin: hand command, not plugin, to parsing functions. 2026-03-23 14:03:17 +10:00
keysend.c keysend: deprecate in favor of xkeysend. 2026-05-11 13:51:52 +09:30
libplugin-pay.c libplugins: JSON ids are always strings. 2026-08-04 18:51:43 -03:00
libplugin-pay.h connectd, gossipd, pay, bcli: use timemono when solely measuring duration for timeouts. 2025-11-13 21:21:29 +10:30
libplugin.c libplugin: json_id: guard against weird prefixes 2026-08-04 18:51:43 -03:00
libplugin.h libplugins: JSON ids are always strings. 2026-08-04 18:51:43 -03:00
Makefile plugins: rename bwatch output binary to cln-bwatch 2026-06-05 12:03:38 +02:00
offers.c offers: limit invoices to 10 minutes for recurring offers in other currencies. 2026-08-04 18:51:43 -03:00
offers.h offers: limit invoices to 10 minutes for recurring offers in other currencies. 2026-08-04 18:51:43 -03:00
offers_inv_hook.c offers: use xpay. 2026-05-11 13:51:52 +09:30
offers_inv_hook.h offers: check they use the blinded path if one is specified. 2024-07-17 10:57:11 +02:00
offers_invreq_hook.c offers: limit expiry to offer limit, or 10 minutes with currency conversion. 2026-08-04 18:51:43 -03:00
offers_invreq_hook.h offers: check they use the blinded path if one is specified. 2024-07-17 10:57:11 +02:00
offers_offer.c lightningd: don't do previous invoice checking in createinvoicerequest. 2026-08-04 18:51:43 -03:00
offers_offer.h plugins: move fetchinvoice functionality into offers plugin. 2024-07-17 10:57:11 +02:00
offers_proof.c offers: add createproof API. 2026-05-11 11:13:55 +09:30
offers_proof.h offers: add createproof API. 2026-05-11 11:13:55 +09:30
pay.c plugins: move listpays from pay plugin to xpay plugin. 2026-05-11 13:51:52 +09:30
README.md doc: fix wording in plugins/README.md 2020-01-06 12:57:59 +01:00
recklessrpc.c reckless: fail reckless rpc if executable fails 2026-03-18 14:11:01 +01:00
recover.c global: remove unnecessary includes from C files. 2025-10-23 06:44:04 +10:30
sql.c sql: fix crash for large channelmoves tables. 2026-04-09 12:12:39 +09:30
topology.c getroute: deprecate in favor of getroutes 2026-05-11 13:51:52 +09:30
txprepare.c fix: release txprepare reservations on send failure 2026-05-11 15:54:55 +09:30

Plugin Directory

Any file in this directory which is executable and whose name only consists of alphanumeric characters, space, '.', '-' or '_' will be automatically loaded when lightningd starts (unless suppressed with commandline options).