Your bitcoin & nostr companion / from ๐ with ๐งก
webbtc.isEnabled() allows you to check if the WebBTC provider is enabled without explicitly enabling it through webbtc.enable() (which may cause a confirmation popup in some providers)
Method
functionisEnabled():Promise<boolean>;
Example
if(typeofwindow.webbtc !=='undefined'&&window.webbtc.isEnabled) {constisEnabled=awaitwindow.webbtc.isEnabled();// do something with the valueconsole.log(isEnabled) }