52 Commits

Author SHA1 Message Date
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
Peter Neuroth
b7be5ef3a2 plugins: lsps: refactor lsps2 and lsps0 error enums
Split them up how they are actually defined.

This commit is part of a series that refactor the lsp plugin crate into
a modularized crate with the goal to separate the actual plugin runtime
as much as possible from library code to make it accessible for 3rd
party plugin implementations.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-12-17 05:56:01 +10:30
Peter Neuroth
17a9a928f5 lsp_plugin: add lsps2 models
Add models and options to enable lsps2 on the lsp

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-11-13 10:58:49 +10:30
Peter Neuroth
e36fdeff81 lsp_plugin: add primitives for messages
Adds some primitives defined in lsps0 for other protocol messages.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-11-13 10:58:49 +10:30
ShahanaFarooqui
76592eafcb clnrest: do not install dependencies from git url
This reverts [commit](cd1ec7216b), as an alternative fix has already been introduced in PR [#8547](https://github.com/ElementsProject/lightning/pull/8547) to restore reproducible builds.

This reversion is necessary because otherwise Docker image building will fail with GitHub Actions or via build-release.sh. The issue arises from Cargo’s inability to resolve the git URL dependencies for clnrest’s utoipa and utoipa-swagger-ui packages within these build contexts. While direct `docker buildx` commands succeeds, Github Action or build-release.sh modifies the build context in a way that prevents Cargo from locating the specific git commit for these dependencies.

References:
https://github.com/ElementsProject/lightning/pull/8530#issuecomment-3248713576
https://github.com/ElementsProject/lightning/actions/runs/17435823432
Added fixed SOURCE_DATE_EPOCH flag for reproducible ubuntu builds [8547](https://github.com/ElementsProject/lightning/pull/8547)

Changelog-None.
2025-11-12 13:12:38 +10:30
daywalker90
9d897b07f4 crates: bump cln-grpc-plugin to v0.5.0
Changelog-None
2025-11-07 11:01:50 +10:30
Rusty Russell
cb5141ff25 clnrest: change utoipa to my GH branch with daywalker90's deterministic PR merged.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Build: release builds with tools/build-release.sh are deterministic again.
2025-10-26 20:31:45 +10:30
ShahanaFarooqui
9f75c99266 docker: Dockerfile fixes after poetry to uv migration
Cargo utilizes `git ls-remote` to resolve git dependencies specified by commit hashes. GitHub only advertises commits that are reachable from branches, tags, or PR references. The `bip353-plugin` was referencing an orphaned commit in the `bitcoin-payment-instructions` dependency that was unreachable through any advertised reference. This can be resolved by installing the tarball release v0.5.0.

Changelog-None.
2025-09-09 10:46:23 +09:30
Christian Decker
516861c5ec rust: Bump cln-plugin==0.5
Due to the breaking change in 9dcc264d4c8e244f0cb827c8a81e61f977011486.
2025-08-19 15:47:58 +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
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
bf37d41c7e clnrest: add more valid request and response types
Changelog-Added: clnrest can now return successful responses as xml, yaml, or form-encoded in addition to json defined in the 'Accept' header. The same goes for request types defined in the 'Content-type' header.
2025-07-25 08:18:44 -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
Peter Neuroth
4d9ed8e2fb lsps: Implement the transport layer for lsps0
For lsps0 we send JSON-RPC messages via custom messages over the
lightning network. This commit adds a basic implementation based
on custom messages.
2025-05-02 13:34:21 -07:00
Peter Neuroth
68ca86ca4f lsps: Add JSON-RPC V2 server 2025-05-02 13:34:21 -07:00
Peter Neuroth
203621a629 lsps: Implement JSON-RPC V2 client
Adds an async safe JSON-RPC V2 client for a generic transport layer. The
transport layer we will use later on are BOLT8 lightning messages.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-05-02 13:34:21 -07:00
Peter Neuroth
ea5635c4c8 lsps: Implement JSON-RPC message structure
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-05-02 13:34:21 -07:00
Peter Neuroth
030a114781 rs: Export NotificationStream
Services that want to wrap the server implementation will need
access to the `NotificationStream` struct in order to pass
the stream through.

Changelog-Added: `cln-grpc` Exposed NotificationStream in the server module

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-04-21 18:33:34 +02:00
Peter Neuroth
b8c39bb12d rs: Refine lib.rs checking for server flag
The `cfg-if` macro allows us to organise feature flag related
exports in a more concise way.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2025-04-21 18:33:34 +02:00
daywalker90
5390882143 crates: bump versions to 0.4.0
Changelog-None
2025-03-11 11:10:11 -05:00
daywalker90
cac9315c00 clnrest: replace with rust plugin
Changelog-Changed: clnrest is now a rust plugin
2025-01-29 18:32:23 -08:00
daywalker90
dcb6f2cb2e rust: bump versions for 24.11 release
Changelog-None
2024-12-10 09:37:30 +01:00
daywalker90
c4e67c0b96 add listing options to listpays
Changelog-Added: JSON-RPC: `listpays` has `index`, `start` and `limit` parameters for listing control.
2024-11-12 10:43:37 +01:00
Tommy Volk
6bd5933a50 chore: bump rust bitcoin to 0.31 2024-10-08 18:56:05 +02:00
Peter Neuroth
0a6870f13d rust-libs: Bump versions
We bump the version to minor version 0.2 to allow ourselves to bump on
patch level when we need to fix a bug or update a dependency.

Changelog-Changed: Plugins: `cln-grpc` Upgrade tonic version and
introduce new versioning scheme.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-09-22 00:12:39 -07:00
Peter Neuroth
a6366c2814 rust-libs: Upgrade tonic to v0.12
Tonic had some breaking changes since 0.8. We want to be closer to newer
versions for downstream consumers to be able to benefit from changes in tonic.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-09-22 00:12:39 -07:00
michael1011
27df5aa03b grpc-plugin: Update rcgen
The version of rcgen that was used before does not compile with
the latest stable Rust release v1.80
2024-07-31 08:53:12 +02:00
Alex Myers
b17bc9cc69 meta: bump rust versions for 24.05 release 2024-06-04 20:23:24 -05:00
Erik De Smedt
505be716aa grpc-plugin: Implement notifications
Use the changes in the `cln-grpc`-crate to support
notifications.
2024-05-16 14:00:18 +02:00
Erik De Smedt
521ac6a12a msggen: Implement notification-server 2024-05-16 14:00:18 +02:00
daywalker90
12f50ee20c rs: bump crate versions for v24.02.1 2024-03-08 14:53:45 +01:00
ok300
a38d81dee0 cln-grpc: Derive serde Serialize/Deserialize for types 2024-01-31 16:44:02 +01:00
Christian Decker
60e1532dd8 cln-plugin: Switch from env_logger to tracing-subscriber
This switches the logging implementation from using the `log`-facade
to using the `tracing-subscriber` instead. This allows us to also tap
into the tracing instrumentation if desired, which was not possible
with `log`.

Changelog-Changed cln-plugin: The logging adapter now uses tracing-subscriber allowing the `tracing` ecosystem to be used. No format changes.
2024-01-16 18:36:12 +01:00
Erik De Smedt
ce41aa4ccc cln_rpc: Split low- from high-level API calls.
The `cln::ClnRpc` plugin has a `call` and a `call`-typed method
which worked only on structs that are mentioned in
`src::primitives::Request`.

The consequence is that any rpc-method that is not (yet) defined in this
crate could not be used.

I've adapted the `ClnRpc`-method and create a low-level binding named
`call_raw`. All changes in this commit should be backward compatible.
2024-01-09 14:12:46 +01:00
Christian Decker
05105d404c rs: Bump versions of cln-plugin and cln-rpc 2023-12-15 10:01:57 +10:30
Christian Decker
394e926cb7 rs: Fix up grpc conversions 2023-10-24 10:24:52 +10:30
Christian Decker
535d3d953d rs: Bump crates cln-rpc and cln-grpc to 0.1.5 and cln-plugin to 0.1.6 2023-10-24 10:24:52 +10:30
Vincenzo Palazzo
a51894f510 rust: fixes the dependencies build with the rustc 1.73.0
This commit is just bumping the Cargo.lock file to
fix the following build issue with the more
recent rust version.

cargo build --quiet --example cln-plugin-startup
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/vincent/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-09-28 14:00:59 +02:00
Christian Decker
8e2e7b1c51 rs: Bump crate versions before publishing
Changelog-None
2023-08-28 11:19:30 +02:00
Christian Decker
1e457bd48d rs: Bump version of cln-plugin 2023-06-02 14:47:13 +02:00
Christian Decker
5ed6f618b3 rust: Bump the versions of cln-rpc, cln-grpc, cln-plugin and grpc-plugin
We haven't uploaded the new v23.05 version just yet, and this includes
a couple of bugfixes that happened since too.
2023-05-30 10:06:10 +09:30
dependabot[bot]
554cbf08c3 build(deps): bump tokio from 1.23.1 to 1.24.2
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-04 15:09:46 +01:00
dependabot[bot]
85ce78f738 build(deps): bump tokio from 1.23.0 to 1.23.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.23.0...tokio-1.23.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 12:28:00 +01:00
Christian Decker
b6d334de1d rs: Update cargo dependencies 2022-12-24 11:32:22 +01:00
Christian Decker
465d9121bf rs: Bump crate versions for publication 2022-12-22 15:42:12 +01:00
Christian Decker
c5608897ad rs: Remove unused dependency from cln-plugin -> cln-rpc
We will likely re-add that dependency later as a feature (to
automatically provide an RPC instance if compiled with that feature)
but for now that dependency is unused.

Changelog-None Not user visible
2022-12-22 15:42:12 +01:00
Christian Decker
8e75232205 rs: Update outdated dependencies
This commit updates outdated dependencies and hangs all
bitcoin-related dependencies off of the `bitcoin` crate, using its
re-exports. This means that as long as the bitcoin crate matches, all
of its dependents will also match.

Changelog-None
2022-12-22 15:42:12 +01:00
dependabot[bot]
2ed10196d0 build(deps): bump secp256k1 from 0.22.1 to 0.22.2
Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/rust-bitcoin/rust-secp256k1/releases)
- [Changelog](https://github.com/rust-bitcoin/rust-secp256k1/blob/secp256k1-0.22.2/CHANGELOG.md)
- [Commits](https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.22.1...secp256k1-0.22.2)

---
updated-dependencies:
- dependency-name: secp256k1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-09 13:11:06 +01:00
Christian Decker
2e270ea7d3 rs: Bump cln crate versions to 0.1.1 2022-11-18 15:10:32 +01:00
elsirion
b4b0b479ac Use secp256k1 for public key type 2022-09-26 22:05:30 +02:00