WebBTC / webln-types

Type definitions for WebLN
MIT License
9 stars 4 forks source link

Should webln.enabled boolean be exposed / part of the spec? #5

Open rolznz opened 1 year ago

rolznz commented 1 year ago

If not, we should have guidance for users and third party packages on how to track enabled status. E.G. https://github.com/getAlby/lightning-wallet-connect which will fire its own lwc:connected event.

bumi commented 1 year ago

imo, yes. this would be a helpful addition. even though I would make it a function. this is more felxible for implementations maybe?

webln.isEnabled(): boolean;

this returns true if the user has prior enabled webln and the website is able to call other methods.

rolznz commented 1 year ago

Conclusion: