-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commando (CLN) connector #1390
Comments
FYI: jb55/lnsocket#16 |
@kiwiidb I have created a pure JS version of lnsocket that works nicely in the browser that you can check out here. |
@aaronbarnardsound thank you so much, your library is awesome! |
@kiwiidb Sweeeet! Let me know if you run in to any issues, bugs or if you have any feature requests. |
@aaronbarnardsound we have run into some issues. See this Loom video for the current status: https://loom.com/share/8b04e1aa80eb4124b5833cd673f09bae I would need to look more into detail in the library itself and play around with it more. If you are interested in working together on this, we have a bounty for this topic available. Would need to work out the details but it would be in the ballpark of 1M sats. |
Hey @kiwiidb happy to work with you on this! I have been doing a lot of work getting the commando connection rock solid for an app I am currently working on, and I believe it is in a good spot. Happy to jump on a call with you to help debug at some point as well, but here are some steps you can take in the meantime:
const connection = new LnMessage({
remoteNodePublicKey: publicKey,
wsProxy,
ip,
port: port || 9735,
privateKey: sessionSecret,
logger: {
info: console.log,
warn: console.warn,
error: console.error
}
}) Another tricky thing that you may run in to is that when calling long running RPC methods such as The solution I have found is to cache the request method and id in local storage before calling, and then on refresh, check if the app has already made the You can also check out the app to get a feel for the UX of a commando connection. Let me how you go, and hit me up via email to schedule a call if you'd like as well :) |
Hello, i have a question @aaronbarnardsound @kiwiidb do you manage to connect your node created in Polar(CLN-Regtest)? i've been trying multiple stuff with no success, alway getting errors
I have used multiple workarounds, also saw @aaronbarnardsound guide on: clams-tech/Remote#99 and tried to do something similar, with the clams app i have success, but not with Alby. I don't really know if im missing something, i have used clams browser app and https://github.com/ShahanaFarooqui/CLN-Commando-Client to test and the connection is successful. If you have some information on the topic, ill appreciate a lot. Thanks in advance and superb work on what you are building. PS: If no one is working on BOLT12, i can start looking at that support. Update: I managed to use it locally by putting the same port where i have my websocket waiting for commando commands as Websocket Server in the config, i don't know if thats a real solution, but its an advance on understanding the problem. |
Hey @ggwilin I recently fixed direct connection issues in Lnmessage, so I am not sure if Alby is running the latest ( Next for connecting directly to a node the options passed to const connection = new LnMessage({
remoteNodePublicKey: publicKey,
wsProtocol: 'ws:',
ip: 'localhost',
port: port || 9735,
privateKey: sessionSecret,
logger: logger
}) The UI in the Alby extension would need to be modified in the advanced section to allow for a direct connection. This is what the Clams app has in the develop branch at the moment: Hope that helps! Bolt12 support for Alby would be dope! We are hopefully going to implement soon in Clams. |
@ggwilin what you did seems like the right solution. |
Alby doest not yet support Core Lightning. Since the latest release of Core LN, the plugin
commando
is shipped by default with Core Lightning. This plugin is used by the LNSocket package, which allows one to connect from the browser to a Core LN node over an untrusted websocket bridge server. The connection is trustless and e2e-encrypted between the browser and the node. Tor nodes can also easily be supported by this bridge server mechanism. Alby would host the bridge server (we can also use proxy.lnlink.org for development).Authentication is done using so-called
runes
, which are like macaroons and can have fine-grained permissions.We could even expand the webLN methods to support all commando commands, allowing one to execute all possible c-lightning commands from webLN.
The text was updated successfully, but these errors were encountered: