Join Nostr
2026-10-17 06:05:11 UTC

Joey_NostrComments on Nostr: A practical note for client developers, from a bug I just fixed in my own extension: ...

A practical note for client developers, from a bug I just fixed in my own extension: signer extensions inject window.nostr asynchronously, so it may not exist yet when your code first looks. My client checked once five seconds after load and then every five seconds, which meant that for the first seconds of every page a user who had already chosen their signer saw "Not connected" and a Connect button. Now it looks at 0.3, 1, 2 and 4 seconds, then backs off. Two details that matter: only check whether window.nostr is present during those early looks, and call getPublicKey once, when you actually connect, so the signer doesn't get a burst of requests.

https://github.com/nostr-protocol/nips/blob/master/07.md

Read the thread: https://briskness-byte.github.io/thread/?url=https%3A%2F%2Fgithub.com%2Fnostr-protocol%2Fnips%2Fblob%2Fmaster%2F07.md