diff --git a/packages/demo/public/docs.html b/packages/demo/public/docs.html index 2d0c46a..981294a 100644 --- a/packages/demo/public/docs.html +++ b/packages/demo/public/docs.html @@ -63,11 +63,25 @@ bl.addEventListener('bitlogin-login', (e) => { console.log('signed in as', e.detail.publicKey); + console.log('via', e.detail.method); // 'bitlogin' | 'nip07' + console.log('supports', e.detail.capabilities); // { nip44, nip04, getRelays } }); bl.addEventListener('bitlogin-logout', () => { console.log('signed out'); }); +
detail.method tells you which way the user came in, and
+ detail.capabilities what the active signer supports (some extensions lack
+ nip44). Extension sessions are signer-only: signing and encryption work through the
+ element exactly the same, but BitLogin account features — wallet connections, password rotation,
+ identity export, cross-device persistence — belong to BitLogin accounts, and
+ requestNwcConnection() resolves null. A page reload ends an extension
+ session; the extension is simply asked again next visit.
+ One exception first: when a user signs in through a NIP-07 extension from the widget's own
+ welcome screen, BitLogin deliberately leaves window.nostr alone — the extension already owns
+ the slot and is the session's actual backend, so there is nothing to claim or release. Everything below
+ concerns BitLogin-account sessions, where the widget's own provider competes for the slot.
By default, once <bitlogin-auth> mounts it claims window.nostr and keeps it —
even after the user logs out of BitLogin, since they might just be about to log back in with the same widget.
If your site offers a signer picker and the user switches to a different method, call
diff --git a/packages/demo/public/llms.txt b/packages/demo/public/llms.txt
index 58db2bf..958a1c2 100644
--- a/packages/demo/public/llms.txt
+++ b/packages/demo/public/llms.txt
@@ -28,6 +28,16 @@ deployment above.
- A `