MaxKotlan / LN-Visualizer

Visualization of the Lightning Network
MIT License
5 stars 1 forks source link

Can this work with Core Lightning? #118

Open TheFockinFury opened 1 year ago

TheFockinFury commented 1 year ago

This is more of a support request but I’m wondering if this has been treated with Core Lightning? Is it possible to provide CLN credentials instead of LND credentials for the REST API? Any pointers on feasibility/how-to would be much appreciated.

MaxKotlan commented 1 year ago

At the moment, I don't believe so. Although LND and CLN both use a somewhat standardized authentication system (macaroons), they both have different commands, endpoints, and response formats.

It may be possible to add support for CLN, but it will take development work to get there.

Doing some preliminary research, It will most likely involve using these rpc calls to pull the data. https://lightning.readthedocs.io/lightning-listnodes.7.html https://lightning.readthedocs.io/lightning-listchannels.7.html

And then mapping the response data to the lnd format of the data as there are slight differences

MaxKotlan commented 1 year ago

Another issue is c-lightning-rest doesn't seem to support listchannels. It has listnodes which seems to work for me, but I cannot find an active endpoint for listing all the channels present on the network.

image

So we will most likely need to communicate with grpc calls, or add support for that in c-lighting-rest.

Also for LND I used an existing lightning nodejs library for interacting with lnd. So far I don't see any similar node libraries for clightning-grpc, so we will most likely have to handle the connections in a standalone way.

TheFockinFury commented 1 year ago

Hmm, thanks for this info. I’m not a developer and I don’t even know enough to play one on TV, but perhaps using the Commando plugin one could make Lightning-cli calls remotely. It looks like this might be a viable way to interface with commando. But that would require the user to install the commando plugin and maybe generate some runes themselves to grant access. Anyway, thanks for this insight !