Skip to content

Commit

Permalink
Added crate containing CLN GRPC bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpp committed Jul 20, 2024
1 parent 08dbb8e commit 4d75887
Show file tree
Hide file tree
Showing 8 changed files with 15,332 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ url = "2.2.1"
drop-root = "0.1.1"
dbif = { path = 'dbif'}
lnd-rs = { path = "lnd-rs" }
cln-rs = { path = "cln-rs" }
configure_me = "0.4.0"
handlebars = "4.2.1"
chrono = "0.4.35"
Expand Down
14 changes: 14 additions & 0 deletions cln-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "cln-rs"
version = "0.1.0"
edition = "2021"

[lib]
name = "cln_rs"

[dependencies]
prost = "0.13.1"
tonic = { version = "0.12.1", features = ["tls"] }

[build-dependencies]
tonic-build = "0.12.1"
6 changes: 6 additions & 0 deletions cln-rs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Note

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
differences in tonic, prost, axum, or maybe another library we're using.

As a result, I've built this crate using the proto files extracted from the `cln-gprc` crate.
8 changes: 8 additions & 0 deletions cln-rs/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// builds the src/cln.rs from the node.proto and primities.proto definitions
fn main() -> Result<(), std::io::Error> {
tonic_build::configure()
.build_client(true)
.build_server(false)
.out_dir("src")
.compile(&["protos/node.proto", "protos/primitives.proto"], &["protos"])
}
Loading

0 comments on commit 4d75887

Please sign in to comment.