Author

Topic: Remote RPC queries to C-Lighting Node (Read 125 times)

jr. member
Activity: 46
Merit: 28
March 22, 2023, 11:52:38 AM
#6
Another thought, have you looked at LND and the way they do things?

LND has an API built in.

One of the big differences between C-Lighting and LND is that C-Lighting is more 'modular' you need something you add it in. LND has a lot more things built into it.
I don't think one way is better or worse, just a different way of thinking.

https://lightning.engineering/api-docs/api/lnd/
https://docs.lightning.engineering/


Thanks for that Dave. I'm only using C-Lighting for the moment as I need to use that specific node due a specific reason. But it's nice to know that other implementations have this kind of things already implemented.

Obligatory, use testnet when playing around and testing or don't commit funds you can't afford to loose if you are tinkering and detonate something.....

Yes sure, I'm using a LN simulator called Polar.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
March 22, 2023, 07:10:18 AM
#5
Another thought, have you looked at LND and the way they do things?

LND has an API built in.

One of the big differences between C-Lighting and LND is that C-Lighting is more 'modular' you need something you add it in. LND has a lot more things built into it.
I don't think one way is better or worse, just a different way of thinking.

https://lightning.engineering/api-docs/api/lnd/
https://docs.lightning.engineering/

Obligatory, use testnet when playing around and testing or don't commit funds you can't afford to loose if you are tinkering and detonate something.....

-Dave
jr. member
Activity: 46
Merit: 28
March 21, 2023, 06:10:59 PM
#4
What are you looking to do?

Imagine I have an application than works as a client on one computer, I would like to make petitions to the node which is on a different computer.



There are web interfaces [Ride the lightning] that allow access thought the web.

They have also written a REST API  https://github.com/Ride-The-Lightning/c-lightning-REST

If you search there are more but RTL tends to be the most popular which means if you have an issue there are more places to look.

-Dave

I would like to avoid using external code as this project is just to learn and I want to write all the code myself. But thanks for the example.

As far as I can see they (RTL) build a server on the node computer and play with a plugin configuration option on the node. So I guess this is the answer. I need an additional server on the node side. So the schema should look similar to this:
   
   10.0.0.1(client) -- > 10.0.0.2(server) --> 10.0.0.2(node)

legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
March 21, 2023, 05:40:38 PM
#3
What are you looking to do?

There are web interfaces [Ride the lightning] that allow access thought the web.

They have also written a REST API  https://github.com/Ride-The-Lightning/c-lightning-REST

If you search there are more but RTL tends to be the most popular which means if you have an issue there are more places to look.

-Dave
legendary
Activity: 3430
Merit: 3080
March 21, 2023, 03:47:28 PM
#2
maybe some other application has an API that can send commands to c-lightning nodes, but lightning-cli is the only part of c-lightning that could be used for remote access

guess how those applications achieve this trick? they're accepting commands from the remote user, then sending them to.... lightning-cli Cheesy
jr. member
Activity: 46
Merit: 28
March 21, 2023, 01:42:16 PM
#1
Hi all,

I am starting with the lighting network, specifically with Core Lighting (C-lighting). I was looking for information about how to execute remote commands on the node.
I mean, locally you can execute "lighting-cli $option" commands but I'm looking for a way to do it remotely without SSH connection.
I thought the node had an API where I could do petitions but, I do not find anything on the Internet regarding this without using additional server.

Does this API exist? If it does, please could someone share some documentation about this?
If not, please feel free to share your sugestions about how could I interact with the node remotely without SSH.

Thanks in advance.


Best Regards,
SS
Jump to: