mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 16:33:27 +00:00
nSites now open in "website mode": a normal web app with normal network access plus a NIP-07 window.nostr provider, so standard Nostr web apps can "log in with Amethyst" and sign as the active user. Napplets are unchanged (locked, declared-only sandbox). - window.nostr (shim.js) installs only when the host sets __nappletNip07 (website mode). getPublicKey/getRelays reuse the existing consent-gated identity reads; signEvent is a new sign-only op honoring the app-supplied created_at (no publish — the web app sends to relays itself). - NappletRequest.SignEvent + nostr.signEvent decode; broker signs as the user and returns the signed event without publishing. pubkey is still fixed by the signer, so the app can never sign as another identity. - Website mode: content server defers off-origin requests to the WebView and drops the app CSP (normal network); locked napplets keep connect-src 'none' and 404 off-origin. - Launcher grants IDENTITY + RELAY (consent-gated) for website mode, independent of the nSite's empty manifest requires. - Consent dialog shows the kind + content preview for a sign request. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ncMHuBBVHEf7spAoSssde