I converted lnurl-commando away from lnsocket and I use spawn to call lightning-cli. but directly using the unix socket is of course better. so I wanted to borrow that from you

Reply to this note

Please Login to reply.

Discussion

Yeah, sure. Here it is: https://github.com/joelklabo/blog/blob/main/lib/lightning/rpc.js

I haven’t done JS in a while so I’m not sure if this is any good or not but it’s been working

cool it works, after converting all requires in lnurl-commando to imports while still learning javascript (doing js since two weeks). even made the rpc a global so the unix socket connection stays alive

Oh nice, I need to do that too, can I see ?

Import or require is super confusing to me. I tried to use import but maybe my class is not setup correctly