Damus
fiatjaf · 3d
nostr:npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr window.nostrdb is a great idea. Can you push https://github.com/hzrd149/nostr-bucket/blob/master/nip.md to the NIPs repository?
nomadshiba⚡ profile picture
why inject it inside the browser?
it can be message and event based, allowing multiple extensions. nip07 had the same issue of extensions fighting.

you emit an event or broadcast a message using the BroadcastChannel, and extensions respond by giving you their names, logo, and api object. so you can show the user options from the extensions they have.
2
nomadshiba⚡ · 1d
so example. extensions add an event listener to the page, listening the event "nip123:requestAPI" for example. then the page loads and the webapp listens the event "nip123:announceAPI", then it dispatches the event "nip123:requestAPI". then the extension listening on that event respond with their...
fiatjaf · 1d
I had never seen that approach suggested. It's a pretty good idea.