[c-lightning] Lightning RPC

William Casarin jb55 at jb55.com
Wed Jan 19 02:46:45 AEDT 2022


Hey Christian,

I noticed you are doing RPC stuff... I'm looking to do RPC over
lightning itself. I started a C library called lnsocket[1], scrounged
from clightning parts, so that I can send messages from iOS to control
my lightning node.

I've got to the point with lnsocket where I can send TLVs to my node,
and now I'm starting to think about what format the RPC commands should
be.

I noticed the commando c-lightning plugin just uses the JSON-RPC
payload, but perhaps something more compact and rpc-friendly like grpc
would be better... which is why this cln-grpc PR peaked my curiosity.

I think the end goal of an RPC bolt would be super powerful, so that
lnsocket could talk to any lightning node, but that could be further
down the line. Choosing the right data format seemed like an important
step in that direction. Would love to hear your thoughts on this!

I've cc'd clightning/lightning-dev as well to see if anyone else is
working on this or thinking about this stuff right now.

Cheers,
Will

[1] http://git.jb55.com/lnsocket

On Tue, Jan 18, 2022 at 06:01:46AM -0800, Christian Decker wrote:
>This is the final PR in the cln-* series. It uses all the primitives we
>built in the previous 3 PRs and uses them to expose the JSON-RPC over
>grpc, with mTLS authentication builtin. You can view, comment on, or
>merge this pull request online at:
>
>  https://github.com/ElementsProject/lightning/pull/5013
>
>-- Commit Summary --
>
>  * cln-grpc-plugin: Add scaffolding for the cln-grpc-plugin
>  * make: Add a hook for us to depend on generated files for tests
>  * make: Generate grpc bindings if we want to test with rust enabled


More information about the c-lightning mailing list