Open pavlenex opened 1 year ago
Hey @pavlenex! Thanks for reporting this issue, I just looked into it:
Currently it just assume it's a LND connection but since BTCPay Server supports different Lightning Node implementations we need to add support for exchanging other node backend credentials via the config URL.
I currently don't have access to a BTCPay Server running on CLN, could you maybe provide the response of this config requests on your CLN setup? (just open the URL it in your browser and post the redacted JSON here)
@pavlenex I want to prepare design for this, but what should be the form in that connector? Standard CLN form or a config data analogous to LND? I'd need a copy for updated instruction and link for CLN config then
@stackingsaunter we expose it same way we do the LND. I think it would make sense to have it same way you do for LND.
@pavlenex great, can you just give me specific copy in exchange of "LND Rest - See information" and an example link (the current one has lnd within). A screenshot will sufice!
@stackingsaunter Sure, here you go. Bear in mind, for c-lightning we call it lnd.config for some reason cc @kukks
Okay, so it should look like this with updated layout from https://github.com/getAlby/lightning-browser-extension/issues/2250 or the same as BTCPay LND with updated copy in the current layout
You could assign it to me as I am working on #2254 where it will be used.
After trying to debug this issue I found out that BTCPay Server doesn't ship core-lightning plugins (or connection credentials related to them). That means we would have to re-implement a core-lightning connector using the REST APIs provided through BTCPay Server instead of using the current implementation that is using commando
to communicate with the node.
For future reference, the config URL returns this JSON for core-lightning nodes:
{
"configurations": [
{
"uri": "https://btcpayserver.example.com/clightning-rest/btc",
"chainType": "Mainnet",
"type": "clightning-rest",
"cryptoCode": "BTC",
"certificationThumbprint": null,
"macaroon": "0201010b...",
"adminMacaroon": null,
"readonlyMacaroon": null,
"invoiceMacaroon": null
}
]
}
Let's discuss that in tomorrows community call maybe @lujakob.
@reneaaron yes I could need a little bit more information here. Let's discuss these days.
@reneaaron could you please comment our conclusion please.
I found out that BTCPay Server doesn't ship core-lightning plugins (or connection credentials related to them). That means we would have to re-implement a core-lightning connector using the REST APIs provided through BTCPay Server instead of using the current implementation that is using commando
to communicate with the node.
The config API from BTCPay Server returns the following object for a core-lightning node:
{
"configurations": [
{
"uri": "https://btcpayserver.example.com/clightning-rest/btc",
"chainType": "Mainnet",
"type": "clightning-rest",
"cryptoCode": "BTC",
"certificationThumbprint": null,
"macaroon": "0201010b...",
"adminMacaroon": null,
"readonlyMacaroon": null,
"invoiceMacaroon": null
}
]
}
TODO
type
property of the config API and return a CoreLightningREST connector for clightning-rest
I don't think it would be very complicated to do that (the LND
connector very much works the same way) but currently not the highest priority.
If anyone is interested in implementing this please reach out (you will need a running instance of BTCPay Server & Core-Lightning to tackle this issue). I think it would be great to support multiple node backends for BTCPay Server.
As agreed on Telegram, opening this issue as a reminder to add ability for BTCPay Server's using CLN as their LN implementation to connect to Alby.