Awesome
<p align="center"> <img src="https://github.com/theborakompanioni/cln-grpc-client/blob/master/docs/assets/images/logo-dark.svg#gh-light-mode-only" alt="Logo" width="256" /> <img src="https://github.com/theborakompanioni/cln-grpc-client/blob/master/docs/assets/images/logo-light.svg#gh-dark-mode-only" alt="Logo" width="256" /> </p>cln-grpc-client
A gRPC client for Core Lightning (CLN).
cln-grpc-client-starter
A module containing a Spring Boot Starter is also available.
Table of Contents
Install
Download from Maven Central.
Gradle
repositories {
mavenCentral()
}
implementation "io.github.theborakompanioni:cln-grpc-client-core:${clnGrpcClientVersion}"
Maven
<dependency>
<groupId>io.github.theborakompanioni</groupId>
<artifactId>cln-grpc-client-core</artifactId>
<version>${clnGrpcClient.version}</version>
</dependency>
Development
Requirements
- java >=17
- docker
Build
./gradlew build -x test
Test
./gradlew test integrationTest --rerun-tasks
Dependency Verification
Gradle is used for checksum and signature verification of dependencies.
# write metadata for dependency verification
./gradlew --write-verification-metadata pgp,sha256 --export-keys
# update buildscript dependency locks
./gradlew dependencies --write-locks
See Gradle Userguide: Verifying dependencies for more information.
Checkstyle
Checkstyle with adapted google_checks is used for checking Java source code for adherence to a Code Standard.
# check for code standard violations with checkstyle
./gradlew checkstyleMain --rerun-tasks
SpotBugs
SpotBugs is used for static code analysis.
# invoke static code analysis with spotbugs
./gradlew spotbugsMain --rerun-tasks
Troubleshooting
ManagedChannelProvider$ProviderNotFoundException
Caused by: io.grpc.ManagedChannelProvider$ProviderNotFoundException: No functional channel service provider found. Try adding a dependency on the grpc-okhttp, grpc-netty, or grpc-netty-shaded artifact
add a channel service provider implementation, e.g.
implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"
Hint: The above section should currently not apply, as grpc-netty-shaded
is included as dependency.
However, this dependency might be removed in future releases.
Error loading shared library libio_grpc_netty_shaded_netty_tcnative-*.so
See: https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty
Contributing
All contributions and ideas are always welcome. For any question, bug or feature request, please create an issue. Before you start, please read the contributing guidelines.
Resources
- Bitcoin: https://bitcoin.org/en/getting-started
- Lightning Network: https://lightning.network
- cln (GitHub): https://github.com/ElementsProject/lightning (Docker)
- cln protobuf: https://github.com/ElementsProject/lightning/tree/master/cln-grpc/proto
- Protocol Buffers: https://protobuf.dev/
- gRPC: https://grpc.io/
- grpc-java (GitHub): https://github.com/grpc/grpc-java
- grpc-java Security: https://github.com/grpc/grpc-java/blob/master/SECURITY.md
License
The project is licensed under the Apache License. See LICENSE for details.