Commit Graph

327 Commits

Author SHA1 Message Date
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
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
ShahanaFarooqui
54af71c5b3 doc: Added doc schemas with description and update proto 2025-12-19 15:28:46 -08:00
nazarevsky
bcdce8f40d cln-rpc: update schema, update proto for xpay payer_note field 2025-12-18 12:47:06 -08:00
Rusty Russell
98a188b394 doc: document the direction field in listpeerchannels.
We mentioned it in the schema (so it was allowed), but we didn't document it!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-12-12 14:20:08 +01:00
Rusty Russell
ea0b8040c2 doc: include delnetworkevent in generated documentation, and grpc.
Also added missing "added" annotation.  This meant that I had to manually
change contrib/msggen/msggen/patch.py to insert that added notation where it
was missing from .msggen.json.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: introduced this release.
2025-11-24 14:31:02 +10:30
daywalker90
b4ef5d9a8e msggen: fix primitive serialization for special names
Changelog-None
2025-11-24 14:30:29 +10:30
daywalker90
d125b3c720 msggen: add missing methods from v25.12
Changelog-None
2025-11-21 13:51:28 +10:30
daywalker90
ab73388902 msggen: add missing methods from v25.09 2025-11-21 13:51:28 +10:30
Rusty Russell
b74d32f6c4 lightningd: add withhold option to fundchannel_complete.
This is just a polite way of telling us that if we close, don't bother broadcasting
since we didn't broadcast the funding tx.

Changelog-Added: JSON-RPC: `fundchannel_complete` new parameter `withhold` (default false).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-19 07:23:39 +10:30
Rusty Russell
39349965a6 lightningd: add withheld flag to listpeerchannels and listclosedchannels.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listpeerchannels` `funding` object `withheld` flag, and `listclosedchannels` `funding_withheld` flags, indicating fundchannel_complete was called with the `withheld` parameter true.
2025-11-19 07:23:39 +10:30
Matt Whitlock
cbfe1a9996 lightningd: notify plugins when finalizing channel
Changelog-Added: Plugins now receive `channel_state_changed` notification upon final change to `CLOSED` state.
2025-11-18 14:28:22 +10:30
Rusty Russell
1102d8063e askrene: add optional layers to reservations.
We have the issue of aliases: xpay uses scids like 0x0x0 for
routehints and blinded paths, and then can apply reservations to them.  But
generally, reservations are *global*, so we need to differentiate.

Changelog-Added: Plugins: `askrene-reserve` and `askrene-unreserve` can take an optional `layer` inside `path` elements.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-17 13:52:54 +10:30
Lagrang3
4f1c8806d7 askrene: add askrene-bias-node rpc
Changelog-Added: askrene-bias-node: an RPC command to set a bias on node's outgoing or incoming channels.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2025-11-13 15:15:27 +10:30
Lagrang3
5769beb1db askrene: add timestamp to biases
We add one more field to biases: "timestamp".
With the timestamp variable old biases can be removed with the
askrene-age command.

Changelog-Added: Plugins: askrene channel biases now have an associated timestamp, and are timed out by askrene-age

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2025-11-13 15:15:27 +10:30
daywalker90
e9f3aaf8af docs: fix htlc states description regarding direction
Changelog-None
2025-11-13 12:21:44 +10:30
Rusty Russell
ec05e5da91 autoclean: clean network events (30 days by default).
We also document this in the listnetworkevents command itself.

The test_autoclean_once was getting repetitive, so I cleaned that
up too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: `autoclean` will remove networkevents after 30 days by default.
2025-11-12 13:58:43 +10:30
Rusty Russell
3b332948dd lightningd: implement listnetworkevents.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-12 13:58:43 +10:30
Sangbida Chaudhuri
de9c6305a1 exposesecret: Add support for mnemonic-based HSM secrets
Update the exposesecret plugin to work with the new unified HSM secret
format that supports BIP39 mnemonics.

Changelog-Added - exposesecret now has a mnemonic field
2025-10-26 12:37:58 +10:30
Rusty Russell
54444e4337 BOLT12: Update recurrence to latest spec draft.
Changes:
* Fields renumbered to their draft values + billion.
* offer_recurrence now comes in compulsory or optional (backwards compat) flavors.
* `proportional_amount` is now inside `offer_recurrence_base` not `offer_recurrence_paywindow`.
* New field `invreq_recurrence_cancel`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: Draft specification for recurring offers changed: old recurring offers will no longer work.
2025-10-01 15:31:30 +09:30
Rusty Russell
e7ea57e130 BOLT12: Remove start_any_period from recurrence_base.
Offer_absolute_expiry should be used if you want to require starting at the start.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `start_any_period` removed, use expiry if you need to restrict when they can start using the offer.
2025-10-01 15:31:30 +09:30
Christian Decker
45ba719068 rust: Roll the cln-grpc and cln-rpc versions due to schema changes
Commit ebaa25d9e2fd5582b7fe0e3ec482c1627996e4d7 introduced a couple of
breaking changes to the schema and proto files. The bump ensures
backwards compat for users that have indicated `~0.4` as their version
constraint.

Changelog-Changed: rust: New version of `cln-rpc==0.5` and `cln-grpc==0.5`
2025-08-19 15:47:58 +09:30
Rusty Russell
6c626b124b lightningd: add chainmoves and channelmoves to wait command.
Only makes sense to wait on creation, since they neither are deleted
nor updated.

We also enhance the list commands to take the standard index options.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `wait`: new subsystems `chainmoves` and `channelmoves`.
2025-08-19 13:37:50 +09:30
Rusty Russell
9680404fc4 doc/schemas: add websocket to type in doc/schemas/notification/connect.json
This is done by tests/test_connection.py::test_websocket:

```
{
  "jsonrpc": "2.0",
  "method": "connect",
  "params": {
    "connect": {
      "id": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
      "direction": "in",
      "address": {
        "type": "websocket",
        "subtype": "ipv4",
        "address": "127.0.0.1",
        "port": 59412
      }
    }
  }
}
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-08-18 10:01:07 +09:30
daywalker90
9ed554528f msggen: add override for connect notification in cln-rpc aswell
Changelog-None
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
Lagrang3
0c5c7a5334 askrene: add maxparts
Changelog-Added: askrene: add a new parameter maxparts to getroutes that limits the number of routes in the solution.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2025-08-15 16:13:19 +09:30
daywalker90
e3e41163e2 cln-bip353: add plugin that fetches payment instructions from human readable addresses
Changelog-Add: new plugin cln-bip353 that can fetch BIP-353 payment instructions from human readable addresses
2025-08-14 18:41:23 +09:30
daywalker90
529337a5fb msggen: add signmessagewithkey
Changelog-None
2025-05-15 13:04:13 +02:00
Lagrang3
a90de8dcc7 sendonion: add total_amount_msat parameter
Changelog-Added: sendonion: a new paramter total_amount_msat to make MPP payments with sendpay and sendonion compatible.

[ Reordered to put new parameter at the end --RR ]
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2025-05-13 15:00:50 +09:30
Rusty Russell
e20efa17e2 msggen: regenerate.
Somehow GitHub's "Enable auto-merge" merged the PR without it actually passing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-08 13:10:41 +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
daywalker90
eef3bfe561 cln-rpc: Implemented the From<u64> trait for ShortChannelId
Changelog-None
2025-05-02 15:04:29 +02:00
Rusty Russell
6bf36915fd lightningd: support index/start/end pagination for listhtlcs.
Changelog-Added: JSON-RPC: `listhtlcs` supports `index`, `start` and `end` parameters for pagination support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-29 09:38:20 +09:30
Rusty Russell
7ba6263c48 lightningd: add created_index and updated_index to listhtlcs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listhtlcs` has `created_index` and `updated_index` fields.
2025-04-29 09:38:20 +09:30
Rusty Russell
9636553c16 lightningd: wait interface for htlcs indexes.
Note that documentation says invoice expiries can batch, but that's no
longer true, so delete it.  Usually, we miss a number because the
change is too fast.

This adds the wait interface, but it doesn't actually fire until the next
commit, which wires it into the db code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `wait` now supports the `htlcs` (`listhtlcs`) subsystem.
2025-04-29 09:38:20 +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
8974375de8 lightningd: add short_channel_id option to listpeerchannels.
Requested-by: @whitslack
Closes: https://github.com/ElementsProject/lightning/issues/8233
Changelog-Added: JSON-RPC: `listpeerchannels` now has a `short_channel_id` parameter for just listing a specific channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-28 14:13:12 +09:30
Matt Whitlock
0a07da1d8b cln-rpc/Makefile: fix typo CLN_RPC_GEN_ALL=>CLN_RPC_GENALL
Changelog-None
2025-04-21 18:26:35 +02:00
Rusty Russell
f2852846d2 lightningd: remove accept-htlc-tlv-types.
Changelog-Removed: accept-htlc-tlv-types (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
daywalker90
5390882143 crates: bump versions to 0.4.0
Changelog-None
2025-03-11 11:10:11 -05:00
daywalker90
05f0100e7d msggen: comply with grpc and rust naming conventions
Changelog-Changed: Some enums, structs, functions in pyln-grpc-proto/cln-grpc/cln-rpc
have been slightly renamed so they follow grpc and rust's naming convention
2025-02-27 11:53:48 -06:00
daywalker90
3e461036b3 msggen: add InjectOnionMessage
Changelog-None
2025-02-27 11:53:48 -06:00
daywalker90
5dab24ff38 msggen: add channel_state_changed notification
Changelog-None
2025-02-27 11:53:48 -06:00
Rusty Russell
5a80223f3e setconfig: add transient option.
Changelog-Added: JSON-RPC: `setconfig` now has a `transient` flag which means it won't rewrite your config file.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-02-24 19:38:37 +10:30
Lagrang3
fe4d5036c2 add max_htlc_value_in_flight_msat to listpeerchan
Changelog-Added: JSON-RPC: `listpeerchannels` new output fields `their_max_total_htlc_out_msat` and `our_max_total_htlc_out_msat` as the value of `max_htlc_value_in_flight` (as of BOLT02) set by the local and remote nodes on channel creation.

Changelog-Deprecated: JSON-RPC: `listpeerchannels` value `max_total_htlc_in_msat`: use `our_max_total_htlc_out_msat` instead to follow spec naming convention.
2025-02-21 17:03:36 -06:00
Rusty Russell
c22cc11af5 fetchinvoice: allow user to specify bip353 name corresponding to how they got offer.
Changelog-Added: JSON-RPC: `fetchinvoice` BIP 353 name support (`bip353`).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-02-11 20:19:01 -06:00
Rusty Russell
ba3e85bb43 decode: handle new bip353 fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-02-11 20:19:01 -06:00
Rusty Russell
b78b3232e3 lightningd: implement unblacklist.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `blacklistrune` now has an option to un-blacklist (`relist`).
2025-02-05 16:43:09 -06:00