Skip to content

Commit 4d75887

Browse files
committed
Added crate containing CLN GRPC bindings
1 parent 08dbb8e commit 4d75887

File tree

8 files changed

+15332
-0
lines changed

8 files changed

+15332
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ url = "2.2.1"
1616
drop-root = "0.1.1"
1717
dbif = { path = 'dbif'}
1818
lnd-rs = { path = "lnd-rs" }
19+
cln-rs = { path = "cln-rs" }
1920
configure_me = "0.4.0"
2021
handlebars = "4.2.1"
2122
chrono = "0.4.35"

cln-rs/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "cln-rs"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[lib]
7+
name = "cln_rs"
8+
9+
[dependencies]
10+
prost = "0.13.1"
11+
tonic = { version = "0.12.1", features = ["tls"] }
12+
13+
[build-dependencies]
14+
tonic-build = "0.12.1"

cln-rs/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### Note
2+
3+
CLN provides a `cln-grpc` crate that provides the same definitions as this crate. I was not able to get CLN's crate to work, due to potential version
4+
differences in tonic, prost, axum, or maybe another library we're using.
5+
6+
As a result, I've built this crate using the proto files extracted from the `cln-gprc` crate.

cln-rs/build.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// builds the src/cln.rs from the node.proto and primities.proto definitions
2+
fn main() -> Result<(), std::io::Error> {
3+
tonic_build::configure()
4+
.build_client(true)
5+
.build_server(false)
6+
.out_dir("src")
7+
.compile(&["protos/node.proto", "protos/primitives.proto"], &["protos"])
8+
}

0 commit comments

Comments
 (0)