joule-extension icon indicating copy to clipboard operation
joule-extension copied to clipboard

C-Lightning node compatibility

Open wbobeirne opened this issue 6 years ago • 10 comments

C-Lightning has an HTTP RPC interface as well, but it's different from LND, so we'll need to support that. Documentation is here: https://github.com/ElementsProject/lightning#further-information

wbobeirne avatar Oct 29 '18 17:10 wbobeirne

Great to see that you continue your work on it. I might be able to help out with c Lightning. I guess there would have to be quite some code changes as there are no macaroons and ssl certificates.

renepickhardt avatar Nov 28 '18 07:11 renepickhardt

I'd say a standard interface for different node types would make sense. Then you can have 2 or more different impls.

stevenroose avatar Nov 28 '18 12:11 stevenroose

This would be great!

johneakin avatar Dec 09 '18 10:12 johneakin

Very interested in seeing this added to Joule. C-lightning doesn't seem to have any way to do remote authentication, although there is lightning-charge (https://github.com/ElementsProject/lightning-charge) which seems to provide a REST API with authentication

j-asefa avatar Jan 30 '19 02:01 j-asefa

Yep, that's the blocker for me right now. I'm going to wait for a little more consensus around the most common c-lightning client / auth plugin before I build out an integration.

Lightning-charge looks interesting, but it also looks like it's much more geared towards developers accepting payments via applications. Joule's really more focused on the user / consumer side, so I'm not inclined to build an integration on top of it at this point.

wbobeirne avatar Jan 30 '19 02:01 wbobeirne

Probably all c-lightning users that use it for personal ends have the Spark wallet installed. It provides its own authentication mechanism and exposes the lightningd RPC over HTTP. It goes like curl 'https://<domain>/rpc' -H 'content-type: application/json' -H 'x-requested-with: spark-rpc' -H 'x-access: <token>' -d '{"method":"getinfo","params":[]}'.

We just have to find a way to grab that token in a reliable manner (besides inspecting the browser network logs).

fiatjaf avatar Jan 30 '19 11:01 fiatjaf

I wanted to circle back to this as Joule seems really cool. As @fiatjaf mentioned, Spark seems to be the most commonly used client with c-lightning. I haven't dived too much into it but it seems what fiatjaf is referring to (Spark server + Joule) is doable. Some info here: https://github.com/shesek/spark-wallet#server-installation

grubles avatar Feb 16 '19 18:02 grubles

While this is not resolved, I'll point you to my https://github.com/fiatjaf/kwh/, a webln-enabled extension that talks to a Spark server.

fiatjaf avatar Apr 17 '19 14:04 fiatjaf

Nice work @fiatjaf! Hopefully I'll be hot on your heels.

wbobeirne avatar Apr 17 '19 18:04 wbobeirne

There is also http://github.com/saubyk/c-lightning-rest out now which is a REST api for clightning that uses macaroons for auth. It's used for both RTL and Zeus which both both support LND and C-lightning now.

Kukks avatar Mar 13 '20 12:03 Kukks