What changed, and why it matters
This commit adds a new, empty Rust code crate called lsps-types to the Core Lightning project. It contains no executable logic, only build and packaging configuration. There is no security issue in this change.
No security action needed. Treat as normal build/infrastructure change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit introduces a new workspace crate lsps-types (version 0.7.0) with an empty src/lib.rs. It wires the crate into Cargo.toml, Cargo.lock, the top-level Makefile, the GitHub crates.io publish workflow, and the LSPS plugin build prerequisites. The crate is intended to eventually hold LSPS0/LSPS2 protocol types and LSPS2 opening-fee computation, but currently defines no types or functions. No code behavior changes.
Changed components
lsps-types (new crate)Cargo workspace configurationcrates.io publish workflowLSPS plugin build dependenciesInspect captured patch +55 / −2
### .github/workflows/crate-io.yml
@@ -27,3 +27,8 @@ jobs:
path: './cln-grpc'
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
+ - uses: katyo/publish-crates@v2
+ with:
+ path: './lsps-types'
+ registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+ ignore-unpublished-changes: true
### Cargo.lock
@@ -1752,6 +1752,10 @@ dependencies = [
"tracing-subscriber",
]
+[[package]]
+name = "lsps-types"
+version = "0.7.0"
+
[[package]]
name = "matchers"
version = "0.2.0"
### Cargo.toml
@@ -13,6 +13,7 @@ package.rust-version = "1.85.0"
members = [
"cln-rpc",
"cln-grpc",
+ "lsps-types",
"plugins",
"plugins/grpc-plugin",
"plugins/rest-plugin",
@@ -26,3 +27,4 @@ members = [
cln-rpc = { path = "cln-rpc", version = "0.7.0" }
cln-grpc = { path = "cln-grpc", version = "0.7.0" }
cln-plugin = { path = "plugins", version = "0.7.0" }
+lsps-types = { path = "lsps-types", version = "0.7.0" }
### Makefile
@@ -411,6 +411,7 @@ include tools/Makefile
ifneq ($(RUST),0)
include cln-rpc/Makefile
include cln-grpc/Makefile
+include lsps-types/Makefile
endif
include plugins/Makefile
include tests/plugins/Makefile
### lsps-types/Cargo.toml
@@ -0,0 +1,10 @@
+[package]
+name = "lsps-types"
+version = "0.7.0"
+edition = "2024"
+license = "MIT"
+description = "LSPS0 and LSPS2 protocol types and the LSPS2 opening fee computation, shared by LSPS clients and services."
+homepage = "https://github.com/ElementsProject/lightning/tree/master/lsps-types"
+repository = "https://github.com/ElementsProject/lightning"
+documentation = "https://docs.rs/lsps-types"
+rust-version.workspace = true
### lsps-types/Makefile
@@ -0,0 +1,7 @@
+lsps-types-wrongdir:
+ $(MAKE) -C .. lsps-types-all
+
+LSPS_TYPES_SOURCES = $(shell find lsps-types -name "*.rs")
+
+lsps-types-all: ${LSPS_TYPES_SOURCES}
+ $(CARGO) build ${CARGO_OPTS} -p lsps-types
### lsps-types/README.md
@@ -0,0 +1,15 @@
+# `lsps-types`: LSPS protocol types
+
+Protocol types for the Lightning Service Provider specifications
+[LSPS0][bLIP-50] and [LSPS2][bLIP-52], and the LSPS2 opening fee
+computation.
+
+Both sides of an LSPS2 JIT channel, the client and the LSP, use this
+crate, so they share one implementation of the message types and of
+the opening fee computation.
+
+It has no async runtime or Core Lightning dependencies, so it can be
+used by any LSPS implementation.
+
+[bLIP-50]: https://github.com/lightning/blips/blob/master/blip-0050.md
+[bLIP-52]: https://github.com/lightning/blips/blob/master/blip-0052.md
### lsps-types/src/lib.rs
@@ -0,0 +1,9 @@
+//! Protocol types for the Lightning Service Provider specifications
+//! [LSPS0] (bLIP-50) and [LSPS2] (bLIP-52).
+//!
+//! This crate is shared by LSPS clients and services so that both sides
+//! use one implementation of the message types and of the LSPS2 opening
+//! fee computation, and can never disagree on amounts.
+//!
+//! [LSPS0]: https://github.com/lightning/blips/blob/master/blip-0050.md
+//! [LSPS2]: https://github.com/lightning/blips/blob/master/blip-0052.md
### plugins/Makefile
@@ -283,9 +283,9 @@ $(RUST_TARGET_DIR)/cln-grpc: ${CLN_PLUGIN_SRC} ${CLN_GRPC_PLUGIN_SRC} ${CLN_RPC_
$(CARGO) build ${CARGO_OPTS} --bin cln-grpc
$(RUST_TARGET_DIR)/clnrest: ${CLN_REST_PLUGIN_SRC} ${CLN_RPC_SOURCES} ${CLN_PLUGIN_SRC}
$(CARGO) build ${CARGO_OPTS} --bin clnrest
-$(RUST_TARGET_DIR)/cln-lsps-client: ${CLN_LSPS_PLUGIN_SRC} ${CLN_RPC_SOURCES} ${CLN_PLUGIN_SRC}
+$(RUST_TARGET_DIR)/cln-lsps-client: ${CLN_LSPS_PLUGIN_SRC} ${LSPS_TYPES_SOURCES} ${CLN_RPC_SOURCES} ${CLN_PLUGIN_SRC}
$(CARGO) build ${CARGO_OPTS} --bin cln-lsps-client
-$(RUST_TARGET_DIR)/cln-lsps-service: ${CLN_LSPS_PLUGIN_SRC} ${CLN_RPC_SOURCES} ${CLN_PLUGIN_SRC}
+$(RUST_TARGET_DIR)/cln-lsps-service: ${CLN_LSPS_PLUGIN_SRC} ${LSPS_TYPES_SOURCES} ${CLN_RPC_SOURCES} ${CLN_PLUGIN_SRC}
$(CARGO) build ${CARGO_OPTS} --bin cln-lsps-service
$(RUST_TARGET_DIR)/wss-proxy: ${CLN_WSS_PROXY_PLUGIN_SRC} ${CLN_RPC_SOURCES} ${CLN_PLUGIN_SRC}
$(CARGO) build ${CARGO_OPTS} --bin wss-proxyWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.