just released the rust lnsocket crate, the easiest way to connect to lightning nodes to send custom messages like commando rpc.

this is more opinionated than LDK, uses tokio+async, does way less. all it does it connect to nodes so you can send custom messages. It's great for building custom protocols on top of the lightning network.

My usecase is fetching invoices from the damus lightning node for dave and other applications. Also going to look into this for fetching bolt12 invoices in damus clients.

check it out!

https://docs.rs/lnsocket

Reply to this note

Please Login to reply.

Discussion

Cool, does it also have apis for accepting incoming connections (server mode) and customizing the size of the message message length field (e.g. 4 byte instead of 2)?

Currently implementing electrum protocol via bolt 8 (in electrum client/electrumx server) for secure connections without SSL, your lnsocket library could may be used by electrs, bdk etc to implement this too without having to write bolt8.

no incoming yet, but wouldn't be too hard to add. my main use case ATM is calling rpcs

test please ignore