diff --git a/Cargo.lock b/Cargo.lock index 7d6c272a9..414e2ee90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -267,6 +267,7 @@ dependencies = [ "hex", "log", "prost", + "serde", "serde_json", "tonic", "tonic-build", diff --git a/cln-grpc/Cargo.toml b/cln-grpc/Cargo.toml index 1a84626cb..db0da3d7c 100644 --- a/cln-grpc/Cargo.toml +++ b/cln-grpc/Cargo.toml @@ -18,6 +18,7 @@ log = "0.4" cln-rpc = { path="../cln-rpc/", version = "^0.1", optional = true } tonic = { version = "0.8", features = ["tls", "transport"] } prost = "0.11" +serde = { version = "1.0", features = ["derive"] } hex = "0.4.3" bitcoin = { version = "0.30", features = [ "serde" ] } diff --git a/cln-grpc/build.rs b/cln-grpc/build.rs index cd13d0529..ee1a50917 100644 --- a/cln-grpc/build.rs +++ b/cln-grpc/build.rs @@ -1,6 +1,7 @@ fn main() { let builder = tonic_build::configure(); builder + .type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]") .protoc_arg("--experimental_allow_proto3_optional") .compile(&["proto/node.proto"], &["proto"]) .unwrap();