Commit graph

158 commits

Author SHA1 Message Date
daywalker90
46b039d547 schemas: add offer_id to invoice_creation notification
Some checks failed
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
Also partially reverts f96099691b which was not properly rebased

Changelog-None
2026-06-10 20:04:31 +02:00
daywalker90
938bdea8c3 schemas: remove old deprecations, add missing deprecations/added fields
Also made fields not go optional if they are deprecated in the case that their parent is also deprecated. This makes more sense imo when you deprecate a whole command.

I added deprecation annotation for the .proto file as well so that later in the convert.rs file it properly annotates everything to allow for deprecated stuff.

Also fixed one propagation bug for the added/deprecated fields, that's why there are some additional changes of some fields.

Changelog-None
2026-05-20 18:40:47 +09:30
Vincenzo Palazzo
f96099691b lightningd: include offer_id in invoice_creation notification
When a BOLT 12 invoice is created via createinvoice and is associated
with a local offer, include the offer_id in the invoice_creation event
notification. This allows plugins to determine which offer triggered
an invoice creation without having to call listinvoices for every
created invoice.

For bolt11 invoices and bolt12 invoices not associated with a local
offer, the field is omitted.

Fixes #8191

Changelog-Added: The `invoice_creation` notification now includes `offer_id` when the invoice is associated with a BOLT 12 offer.
2026-05-11 15:56:31 +09:30
Rusty Russell
6eb7dc0428 renepay: deprecate.
I think Eduardo and I stole all the best bits to make xpay and askrene.

I simply enabled deprecations on all the renepay tests.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
98315531fa keysend: deprecate in favor of xkeysend.
Changelog-Deprecated: JSON-RPC: `keysend` (use `xkeysend`).  `xkeysend` will take over `keysend` in v27.03.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
e657552058 getroute: deprecate in favor of getroutes
Changelog-Deprecated: JSON-RPC: `getroute` (use `getroutes` with layers `["auto.localchans","auto.sourcefree"]` and `maxparts=1`) (since v25.09).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
eebc6eea00 pay: deprecate pay and paystatus.
Use xpay and listpays.

Some tests which are pay/paystatus specific simply enabled deprecations.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: JSON-RPC: `pay` and `paystatus`: use `xpay`, `listpays` (or `xpay`'s notifications for details of attempts).  `pay` will be replaced by `xpay` in v27.03.
2026-05-11 13:51:52 +09:30
Rusty Russell
183e1a0e60 getroutes: deprecate old vaguely named fields.
Changelog-Deprecated: JSON-RPC: `getroutes` `route` fields `next_node_id`, `amount_msat` and `delay` (use `node_id_out`, `amount_in_msat` and `cltv_in`).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
052386abaf askrene: deprecate auto.no_mpp_support layer in favor of maxparts=1.
This layer predated the maxparts parameter.

Changelog-Deprecated: JSON-RPC: `getroutes` layer `auto.no_mpp_support`: use `maxparts=1` parameter instead (available since v25.09).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
e37096494d xpay: don't use MPP for bolt12 unless the invoice explicitly supports it.
We actually changed this by default last release, and nobody noticed!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-30 20:09:31 +09:30
Christian Decker
01083cf79e doc: document UDS datagram tracing backend and envvar table
Add Backend 2 section for the new CLN_TRACE_SOCKET UDS datagram
transport. Restructure the existing USDT docs as Backend 1. Add
an environment variable reference table and a minimal Python
collector example.
2026-04-28 11:03:21 +02:00
daywalker90
5fec682cda docs: generate notification and hook documentation from schemas
and publish them to the readme.com instance of course!

Changelog-None
2026-04-24 22:34:31 +02:00
daywalker90
3a17da61c9 splice: Remove experiemental splicing feature 2026-04-09 11:04:42 +09:30
Peter Neuroth
48271d5307 doc: update pay_part_start and pay_part_end
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2026-04-02 12:20:20 +10:00
Peter Neuroth
13608c5a11 lightningd: add preimage to forward_event notification
Adds the preimage to the forward_event notification when status is
settled. This can be useful to gather some context when listening to
this event

Changelog-Changed: forward_event notification no has preimage set if
status is settled.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2026-03-19 10:46:49 +10:00
daywalker90
e63b0afd91 chore: replace v26.03 version mentions with v26.04
Allowing deprecated API's should actually allow them in test_sql_deprecated
2026-03-17 11:52:01 +10:00
Rusty Russell
f8ef6e143b lightningd: removing comment insisting plugin hooks are an array of objects, not names.
This was changed in v0.9.2 (November 2020), with a comment saying to remove.

But it turns out that the rust plugin support still uses the old
method (found this by removing it and watching everything fail!).  So
simply undeprecate and document.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-20 19:32:42 +10:30
Rusty Russell
983146791a lightningd: remove tx and txid fields from close response.
Changelog-Removed: JSON-RPC: `close` `tx` and `txid` field (use `txs` and `txids`), deprecated v24.11.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-20 19:32:42 +10:30
Rusty Russell
592f8586f4 lightningd: remove decodepay.
Changelog-Removed: JSON-RPC: `decodepay` (use `decode`), deprecated v24.11.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-20 19:32:42 +10:30
Rusty Russell
9881e04636 lightningd: remove the "listpeers.features.option_anchors_zero_fee_htlc_tx" option.
Everyone should be using the new name.

Changelog-Removed: JSON-RPC: `listpeers` `features` array string "option_anchors_zero_fee_htlc_tx": use "option_anchors" (spec renamed it). Deprecated in 24.08.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-20 19:32:42 +10:30
daywalker90
d03cf820a8 clnrest: add clnrest-register-path method for dynamic paths
Changelog-Added: clnrest: add clnrest-register-path rpc method to register dynamic paths
2026-01-19 12:55:57 +10:30
Rusty Russell
f975bb37d4 lightning-hsmtool: support extracting the mnemonic from hsm_secret.
We cannot use the codex32 or raw hex for recovery of 25.12 nodes,
since they will then use the incorrect derivation for all paths, and
be unable to spend (or even find!) their funds.

So implement `getsecret` to replace `getcodexsecret`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: `lightning-hsmtool`: `getsecret` replaces `getcodexsecret` for modern nodes (gives mnemonic).
Changelog-Deprecated: `lightning-hsmtool`: `getcodexsecret`.  Use `getsecret`.
2026-01-13 22:36:01 +10:30
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