lnsocket
lnsocket copied to clipboard
Pure JS client
@ShahanaFarooqui wrote a pure-js commando client here: https://github.com/ShahanaFarooqui/CLN-Commando-Client
I should just switch to that instead of using the C wasm build.
@jb55 please let me know if you need any help or information regarding this.
We would love to integrate a pure-js commando client in the Alby extension. Using a JS client and a websocket proxy seems an ideal solution that would "just work". However, I haven't been able to get @ShahanaFarooqui 's client to work yet.
Also, the code feels a bit like dark magic, would be great to have some references about the steps taken during the handshake process.
Hey @jb55, @kiwiidb I was able to reproduce the issue with CLN v0.12.0. However, I am not 100% sure if upgrading to v0.12.x is the only reason or not. I will test it with fresh 0.11.1 node and let you know the status within 1-2 days.
@ShahanaFarooqui what issue are you referring to? commando is enabled by default in v0.12.x so you won't need the commando plugin anymore.
https://github.com/Ride-The-Lightning/RTL/issues/991#issuecomment-1263387016
I have a pure JS version working in the browser with no polyfills necessary available here if it is useful for anyone. One caveat is that it uses Big Integer literals which cannot be polyfilled for older browsers but according to caniuse it has 94% coverage for users.
@kiwiidb Please check here for the solution.