just finished adding commando support to my new lnsocket-rust library. you can now use rust to call RPCs on CLN nodes remotely over lightning.

This is the easiest way to run commands on your lightning node from anywhere without needing VPN, proxy, or web server.

cheers 🍻

https://github.com/jb55/lnsocket-rs

Reply to this note

Please Login to reply.

Discussion

Good shit, 🙏

What are the main security tradeoffs/concerns?

there are really only benefits. no dependency on certs, fine grained permissions with runes. pretty much every other rpc solution is just bad

Interesting. My rust is terrible, but I'm curious for sure!

There are a few underappreciated CLN-specific gems:

* commando and runes.

* sql plugin for complex queries

* JSON field filtering to reduce returned data.

On the internal side:

* the deprecation system which gracefully allows scheduled feature disabling.

* the runtime memory leak detection system.

* the generation of docs and complete testing of JSON schemas for our APIs.

There are probably other minor wonders that I've forgotten about. These are the ones that are on the top of my head!

"Filter to peer to apply to any successful result" ?

JSON-RPC tunnelled over the lightning protocol. Only one hop though (so you can know the peerid, thanks to cryptography).

Filter is the filter to apply to the returned result (on the server side, to save bandwidth)

is the filter the sql stuff? its not clear what this value should be from the docs

I'm confused. The filter simply restricts what parts of the JSON are returned. This can save significant bandwidth in some cases (eg listchannels but you just want the features).

got it, i just was confused when i saw it for the first time in the commando docs the other day since it wasn’t there when i first implemented lnsocket 3 years ago…

Yes, I added it because without explicit support as a cmdline option you would get client-side filtering, which saves nothing, really.

🖖👏

Awesome. Is it possible for this stack to be adapted for lnd?

yup, someone just needs to add it to lnd. You could put lnd flavored rpcs and macaroons in the payload