Commit Graph

136 Commits

Author SHA1 Message Date
ShahanaFarooqui
ff0ee6dfa0 doc: Fix mdx format errors generated due to Readme v2 migrations
Changelog-None: Documentation fixes only.
2025-11-27 14:10:18 +10:30
Rusty Russell
213cbba5bf lightningd: allow filtering on custommsg hook too.
Changelog-Added: Plugins: "filters" can be specified on the `custommsg` hook to limit what message types the hook will be called for.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-20 16:30:50 +10:30
Rusty Russell
d9d82ac5bd lightningd: add support for filters on "rpc_command" hook.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Plugins: the `rpc_command` hook can now specify a "filter" on what commands it is interested in.
2025-11-20 16:30:50 +10:30
Rusty Russell
7c7f1e4235 lightningd: deprecate "message": null in channel_state_changed notifications.
Somehow I missed this when deprecating `short_channel_id` being null.

Changelog-Deprecated: Plugins: `channel_state_changed` notification `message` field being `null`: it will be omitted instead.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-18 14:28:22 +10:30
Joseph Goulden
1ead6791fd chore: nix flake update
Switched to nixpkgs-unstable
Replaced postgresql dependency with much smaller libpq.
Utilise new inputs.self.submodules feature to simplify flake use
Moved apps to a separate file
Changelog-None
2025-11-13 15:35:51 +10:30
ShahanaFarooqui
367efcf643 docs: Updated developers-guide docs for v10 2025-11-13 15:07:00 +10:30
Peter Neuroth
5c93f12b08 lightningd: add peer_id to htlc_accepted_hook
In some cases it is helpful to know who offered us the HTLC.

Changelog-Changed: Plugins: The `htlc_accepted` hook now knows the
`peer_id` of the peer that offered us the HTLC.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-11-11 16:36:30 +01:00
Peter Neuroth
21fb7600f3 lightningd: add invoice_amt to the htlc_accepted hook
This commit introduces a new field `invoice_msat` to the htlc_accepted
hook. If this field is specified it will replace the amount of the
invoice that belongs to the payment_hash of the HTLC on internal checks.

This is useful in scenarios where we actually expect a smaller amount
than initially specified in an invoice.

Changelog-Changed: Plugins: `htlc_accepted` hook can now override the
expected total amount of the invoice that belongs to the HTLC.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-11-10 15:05:27 +10:30
Rusty Russell
c9fdf60ac1 wallet: make p2tr the default address for newaddr.
Of course we still have to return a `bech32` for the deprecation period.

Changelog-Added: JSON-RPC: `newaddr` will now return a `p2tr` field by default.
Changelog-Deprecated: JSON-RPC: `newaddr` returning a `bech32` field if `addresstype` is not specified (use `p2tr`).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-07 10:51:04 +10:30
Sangbida Chaudhuri
218dc2fe20 hsmd: use the new mnemonic-compatible hsm_secret routines.
Changelog-Changed: hsmd: New nodes will now be created with a BIP-39 12-word phrase as their root secret.
Changelog-Deprecated: config: `encrypted-hsm` to require a passphrase (use `hsm-passphrase`).
Changelog-Added: config: `hsm-passphrase` indicates we should use a manual passphrase with the hsm secret.
2025-10-26 12:37:58 +10:30
Rusty Russell
350af1a3cf doc: pretty!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 15:32:54 +09:30
Rusty Russell
dfe6e3c293 lightningd: remove --experimental-quiesce and --experimental-offers
Deprecated 24.11, disabled 25.05 (they're the default now).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Config: --experimental-offers and --experimental-quiesce (default since v24.11)
2025-10-01 15:32:54 +09:30
Rusty Russell
d73b60c550 lightningd: remove blinding field from onion_message_recv hook.
Changelog-Removed: Plugins: `onion_message_recv` hook `blinding` field (use `first_path_key` as per modern BOLT 4 naming).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 15:32:54 +09:30
Rusty Russell
ba75f7bcf1 offers: remove blinding from decode JSON-RPC.
Deprecated in 24.11, disabled in 25.05.

Changelog-Removed: JSON-RPC: `decode` field `blinding` (use `first_path_key` as per modern BOLT naming)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 15:32:54 +09:30
Rusty Russell
5d5741e681 libplugin: correctly wrap notifications we send in the notification name.
All the core notifications changed over to wrapping the notification
fields in an object with the name of the notification, but notifications
from plugins were missed.

Changelog-Added: Plugins: `channel_hint_update`, `pay_failure` and `pay_success` notifications now have objects of the same name containing the expected fields.
Changelog-Deprecated: Plugins: `channel_hint_update`, `pay_failure` and `pay_success` notification fields outside the same-named object.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-08-18 10:01:07 +09:30
Rusty Russell
16819f345d lightningd: make notifications from plugins just like native ones.
Rather than forcing them to wrap their parameters in a "payload"
sub-object, copy in params directly.  We include the "origin" field
one level up, if they care.

The next patch restores compatibility for the one place we currently use
them, which is the pay plugin.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: pyln-client: plugin custom notifications origins and payload (use parameters directly)
2025-08-18 10:01:07 +09:30
Rusty Russell
a686bda4cb lightningd: deprecate null short_channel_id and unknown old_state in channel_state_changed notification
We always prefer to omit fields rather than use 'null' (or unknown!).

Note that before this, the schema was broken, so we have to put a special
exemption in for that case.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-08-18 10:01:07 +09:30
Rusty Russell
733bdfa67d lightningd: add channel_type to openchannel & openchannel2 hooks.
An obvious omission!

Changelog-Added: Plugins: `openchannel` and `openchannel2` hooks now expose the `channel_type` field for the offered channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-08-15 11:11:39 +09:30
Rusty Russell
841a8bd03a lightningd: extract core of coin_movement notification, for use in list functions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: JSON-RPC: `coin_movement` notification `utxo_txid`, `vout` and `txid` fields (use `utxo` and `spending_txid`).
Changelog-Added: JSON-RPC: `coin_movement` notification `utxo` field.
Changelog-Added: JSON-RPC: `coin_movement` notification `spending_txid` field.
2025-08-14 19:49:09 +09:30
Rusty Russell
650f3882dd lightningd: separate coin_movement tags array into primary_tag and extra_tags.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: JSON-RPC: `coin_movement` notification `tags` array (use `primary_tag` and `extra_tags`).
Changelog-Added: JSON-RPC: `coin_movement` notification `primary_tag` and `extra_tags`.
2025-08-14 19:49:09 +09:30
Rusty Russell
bc5e54d153 common: coin movements for payments need group id as well as part id.
The part id is *only* unique within a group.  The payment_hash / partid / groupid tuple is unique.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Plugins: `coin_movement` notification with `part_id` field now always has `group_id` field.
2025-08-14 19:49:09 +09:30
Peter Neuroth
40c01ea21b docs: Add extra_tlvs to the htlc_accepted_hook doc
Changelog-Added: The `htlc_accepted_hook` now gets the TLV-stream
attached to the HTLC passed through as `extra_tlvs` and can replace it.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-08-14 18:57:05 +09:30
Rusty Russell
e24bd9685a xpay: add pay_part_start and pay_part_end notifications.
Requested-by: Michael at Boltz
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Plugins: `xpay` now publishes `pay_part_start` and `pay_part_end` notifications on every payment send attempt.
2025-08-14 16:52:44 +09:30
Dusty Daemon
5a98d1bdf4 docs: Update the developer getting started guide
Push the beginer to the more useful `fund_nodes` instead of `connect`

Changelog-None
2025-08-12 21:03:03 -07:00
Lakshya Singh
a0fe0174dc chore: update docs for uv
update commands and usage for uv
2025-08-11 11:06:22 +09:30
ShahanaFarooqui
1fb442a9fb docs: Updated Connection URI doc to clearify certs order
Changelog-None.
2025-08-07 21:27:20 -07:00
daywalker90
2e7181d04f wss-proxy: replaced by a rust version
Changelog-Changed: wss-proxy.py was replaced by a rust version with support for multiple `wss-bind-addr`. If you install CLN from pre-compiled binaries you must remove the old wss-proxy directory first before installing CLN, usually
it is located in `/usr/local/libexec/c-lightning/plugins/wss-proxy`. If you compile from source `make` will take care of this automatically.
2025-07-24 12:42:06 -07:00
ShahanaFarooqui
cea6c81181 doc: App development updated with standard connection URI format
Changelog-None.
2025-07-11 10:51:26 +09:30
ShahanaFarooqui
87d862992a doc: Remove c-lightning-REST documentation
Changelog-None
2025-07-10 15:51:42 +09:30
ShahanaFarooqui
bd743d741e doc: Change commando plugin title
Changelog-None.
2025-06-27 11:08:16 +09:30
ShahanaFarooqui
d52e3c394b doc: Update image on App Development page 2025-06-27 11:08:16 +09:30
ShahanaFarooqui
e5ec688bf4 doc: Fix links to avoid 404 error 2025-06-26 14:21:56 +09:30
ShahanaFarooqui
adbe634453 doc: Update Commando plugin details and link 2025-06-26 14:21:56 +09:30
ShahanaFarooqui
2d73186a1e doc: Move deprecated features page from API reference list to Developer's guide 2025-06-26 14:21:56 +09:30
Rusty Russell
46fb007ea0 lightningd: remove experimental-anchors / experimental-onion-messages.
Changelog-Removed: Config: `experimental-anchors` and `experimental-onion-messages` (deprecated 24.02 / 24.08, disabled v25.05).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-06-25 09:06:31 +09:30
Rusty Russell
50e4aabe18 commando: remove old commando rune commands.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: JSON-RPC: `commando-rune`, `commando-listrunes`, `commando-blacklist` (deprecated v23.08, disabled v25.05).
2025-06-25 09:06:31 +09:30
Rusty Russell
4fc9856cf2 lightningd: remove clnrest override options.
Changelog-Removed: Config: autodetection for rest-port/rest-protocol/rest-host/rest-certs options to clnrest-* (deprecated v23.11, disabled v25.02).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-06-25 09:06:31 +09:30
Rusty Russell
b3c1728abc lightningd: remove --max-locktime-blocks.
Changelog-Removed: Config: `max-locktime-blocks` (deprecated v24.05, disabled v25.02).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-06-25 09:06:31 +09:30
Rusty Russell
884778635c deprecations: update v26.05 to v26.06.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Future release schedule moved one month: v25.05 is now v25.06, and all deprecations incremented accordingly.
2025-06-24 09:57:24 +09:30
Rusty Russell
094ac3518f deprecations: update v26.02 to v26.03.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-06-24 09:57:24 +09:30
Rusty Russell
09e03e98ef deprecations: update v25.11 to v25.12.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-06-24 09:57:24 +09:30
Rusty Russell
f69fdd2664 deprecations: update v25.08 to v25.09.
There's only one (but in multiple places!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-06-24 09:57:24 +09:30
Rusty Russell
c81ec4fe76 lightningd: deprecate (undocumented!) "unknown" old_state field in channel_state_changed notification.
Reported-by: daywalker90
Changelog-Deprecated: JSON-RPC: channel_state_changed notification field `old_state` value "unknown" (it will be omitted, instead)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-08 10:49:31 +09:30
Rusty Russell
db104aae92 lightningd: improve wait API by making details fields per-subsystem.
It makes the schema simpler, and indeed, expressable by GRPC.

Changelog-Added: JSON-RPC: `wait` now has separate `invoices`, `forwards` and `sendpays` objects for each subsystem.
Changelog-Deprecated: JSON-RPC: `wait` reply `details` object: use subsytem specific object instead.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-29 09:38:20 +09:30
Rusty Russell
0e7615b1b7 plugins/topology: remove local channels from listchannels.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: RPC `listchannels` no longer includes private local channels (deprecated v23.08, disabled by default in v24.11).
2025-03-12 09:26:08 +10:30
Rusty Russell
73fc9b0c2a plugins: all plugins must now support non-numeric JSON RPC id fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: plugins which didn't accept string JSON RPC fields (deprecated v23.08, disabled by default in v24.11).
2025-03-12 09:26:08 +10:30
Rusty Russell
d69499b558 lightningd: no longer allow plugin flag options with non-false default values.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: default settings for flag options in plugins which aren't "false".
2025-03-12 09:26:08 +10:30
Rusty Russell
f95b542c1e plugins: no longer accept 0/1 for boolean options.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: allowing 0/1 instead of false/true for plugin options (deprecated v23.08, disabled by default in v24.11).
2025-03-12 09:26:08 +10:30
Rusty Russell
c1c93a3212 lightningd: remove announce-addr-dns flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Config: `announce-addr-dns` (deprecated v23.08, disabled in v24.11).
2025-03-12 09:26:08 +10:30
Rusty Russell
7fbc814796 lightningd: remove --bind-addr and --addr munging on onions and local sockets.
Changelog-Removed: --bind-addr and --addr on onion addresses and local sockets (deprecated v23.08, disabled by default in v24.11).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-03-12 09:26:08 +10:30