Closed rolznz closed 8 months ago
For example with LNbits there stacker news could show "Connected with LNbits".
Yeah, something like this (or exactly this) would be great!
I'm not sure if showing the hostname is good, because that is specific to LNbits and not other connectors.
You're right, I am also not sure.
I think it makes more sense to add a function in Bitcoin Connect rather than expose extra info in WebLN (because it is more about the connector than WebLN?)
I agree
isn't that already possible because I can access the underlaying provider of the webln object? So I can ask the provider?
@bumi we only have access to the alias from WebLN.
In the Bitcoin Connect modal we show the connector name (which comes from the connector config)
I think we could add an api call getConnectorName()
.
Add getConnectorConfig
to the api, and also push a WebLN spec. (maybe the provider name could be returned in getInfo or something else)
Adding more functions makes the API more complicated and less clear.
Ideally the Bitcoin Connect API should expose a Bitcoin Connect provider class (which could hold a config and webln provider etc.), rather than global functions - something to think about for the next major version.
In the modal we show what connector you're connected to. But you can't access it from outside.
For example with LNbits there stacker news could show "Connected with LNbits". I'm not sure if showing the hostname is good, because that is specific to LNbits and not other connectors. But we could expose some extra info about the current connector in a generic way?
I think it makes more sense to add a function in Bitcoin Connect rather than expose extra info in WebLN (because it is more about the connector than WebLN?)