7b2c791dcf
This allows the next patch (which makes the schemas stricter) to not break our tests. We add some missing fields (including dev fields, but they're empty and hidden), and add a few minor clarifications and a spelling fix. Most of these are new schemas for this release, so no mention in Changelog. Here is the difference in the man pages: --- doc/lightning-askrene-inform-channel.7.md.old 2024-10-29 17:33:07.714521584 +1030 +++ doc/lightning-askrene-inform-channel.7.md 2024-10-29 17:42:37.434280109 +1030 @@ -24,6 +24,8 @@ - **short\_channel\_id\_dir** (short\_channel\_id\_dir): The short channel id and direction +- **layer** (string): The name of the layer to apply this change to. +- **timestamp** (u64): The UNIX timestamp when this constraint was created. - **maximum\_msat** (msat, optional): The maximum value which this channel could pass. --- doc/lightning-askrene-listlayers.7.md.old 2024-10-29 17:33:07.716521571 +1030 +++ doc/lightning-askrene-listlayers.7.md 2024-10-29 17:42:37.424280316 +1030 @@ -29,13 +29,16 @@ - **channel\_updates** (array of objects): + - **short\_channel\_id\_dir** (short\_channel\_id\_dir): The short channel id and direction this update applies to. + - **enabled** (boolean, optional): True if this can be used, false otherwise. - **htlc\_minimum\_msat** (msat, optional): The minimum value allowed in this direction. - **htlc\_maximum\_msat** (msat, optional): The maximum value allowed in this direction. - **fee\_base\_msat** (msat, optional): The base fee to apply to use the channel in this direction. - **fee\_proportional\_millionths** (u32, optional): The proportional fee (in parts per million) to apply to use the channel in this direction. - - **delay** (u16, optional): The CLTV delay required for this direction. + - **cltv\_expiry\_delta** (u16, optional): The CLTV delay required for this direction. - **constraints** (array of objects): - **short\_channel\_id\_dir** (short\_channel\_id\_dir): The short channel id and direction + - **timestamp** (u64, optional): The UNIX timestamp when this constraint was created. - **maximum\_msat** (msat, optional): The maximum value which this channel could pass. --- doc/lightning-askrene-listreservations.7.md.old 2024-10-29 17:33:07.719521550 +1030 +++ doc/lightning-askrene-listreservations.7.md 2024-10-29 17:42:37.428280233 +1030 @@ -16,7 +16,7 @@ -On success, an object containing **layers** is returned. It is an array of objects, where each object contains: +On success, an object containing **reservations** is returned. It is an array of objects, where each object contains: --- doc/lightning-autoclean-status.7.md.old 2024-10-29 17:33:07.732521462 +1030 +++ doc/lightning-autoclean-status.7.md 2024-10-29 17:42:37.441279965 +1030 @@ -9,7 +9,7 @@ -The **autoclean-status** RPC command tells you about the status of the autclean plugin, optionally for only one subsystem. +The **autoclean-status** RPC command tells you about the status of the autoclean plugin, optionally for only one subsystem. --- doc/lightning-renepay.7.md.old 2024-10-29 17:33:07.927520140 +1030 +++ doc/lightning-renepay.7.md 2024-10-29 17:42:37.996268504 +1030 @@ -58,6 +58,9 @@ - **status** (string) (one of "complete", "pending", "failed"): Status of payment. +- **bolt11** (string, optional): The bolt11 invoice paid. *(added v23.08)* +- **bolt12** (string, optional): The bolt12 invoice paid. *(added v23.08)* +- **groupid** (u64, optional): The groupid used for these payment parts (as can be seen in listsendpays) *(added v23.08)* - **destination** (pubkey, optional): The final destination of the payment. --- doc/lightning-sendonion.7.md.old 2024-10-29 17:33:07.937520073 +1030 +++ doc/lightning-sendonion.7.md 2024-10-29 17:42:37.957269309 +1030 @@ -22,7 +22,7 @@ -- **first\_hop** (object): Instructs Core Lightning which peer to send the onion to. It is a JSON dictionary that corresponds to the first element of the route array returned by *getroute*.: +- **first\_hop** (object): Instructs Core Lightning which peer to send the onion to. It is a JSON dictionary that corresponds to the first element of the route array returned by *getroute* (so fields not mentioned here are ignored).: Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: `renepay` return fields documented in schema (`bolt11`, `bolt12` and `groupid`) |
||
---|---|---|
.. | ||
proto | ||
src | ||
build.rs | ||
Cargo.toml | ||
Makefile | ||
README.md |
cln-grpc - Secure Networked RPC Interface
This plugin provides a standardized API that apps, plugins, and other tools could use to interact with Core Lightning. We always had a JSON-RPC, with a very exhaustive API, but it was exposed only locally over a Unix-domain socket. Some plugins chose to re-expose the API over a variety of protocols, ranging from REST to gRPC, but it was additional work to install them.
So with v0.11.0, we released a new interface: cln-grpc
, a Rust-based plugin that exposes the existing interface over the network in a secure manner. The gRPC API is automatically generated from our existing JSON-RPC API, so it has the same low-level and high-level access that app devs are accustomed to but uses a more efficient binary encoding where possible and is secured via mutual TLS authentication.
To use it, just add the --grpc-port
option, and it’ll automatically start alongside Core Lightning and generate the appropriate mTLS certificates. To use the gRPC interface, copy the client key and certificate, generate your client bindings from the protobuf definition and connect to the port you specified earlier.
While all previous built-in plugins were written in C, the cln-grpc
plugin is written in Rust, a language that will be much more prominent in the project going forward. In order to kick off the use of Rust, we also built a number of crates:
- cln-rpc: native bindings to the JSON-RPC interface, used for things running on the same system as CLN.
- cln-plugin: a library that facilitates the creation of plugins in Rust, with async/await support, for low-footprint plugins.
- cln-grpc: of course, the library used to create the gRPC plugin can also be used directly as a client library.
All of these crates are published on crates.io and will be maintained as part of the project moving forward.