lightning
lightning copied to clipboard
Re-export `tonic` in `cln-grpc`
Using cln-grpc in an outside crate is somewhat tricky. We currently do not have a way to describe the type of T in NodeClient<T>
The export allows the user to write the snippet below.
struct App {
grpc_client: NodeClient<cln_grpc::tonic::transport::Channel>
}
impl App {
fn create(destination: AsRef<str>) -> Self {
NodeClient::connect(destination.as_ref())
.await
.unwrap("Failed to connect")
}
}
async fn main() {
App::create("http://localhost:1234")
}
Hi @ErikDeSmedt I'm doing some spring cleaning and obviously the situation has changed since this PR was proposed... I'm wondering if you're still planning on returning to this work?