I hate the state of nostr DMs at the moment, or more specifically how all nostr apps implement them. Sooner or later I'm going to need to write my own NIP-07 that rejects ALL 1000s of decrypt requests nostr apps send me as soon as I open them. ffs I DO NOT WANT to decrypt all my DMs as soon as I open every freaking nostr client. and no, I will never click the "approve always" button because that's an anti pattern.

Replies (33)

It’s a pretty ugly state of things. Especially to try and get remote signers on board. It’s kinda a nightmare
Look at how Ditto Extension does it. It batches the requests into a single dialog (see "Show 31 more" in the pic). This is inspired by Amber. The NIP-07 interface is perfect, but signers must do this. image
On NIP-46 it's more complicated. Amber already batches, but there's high overhead. NIP-44 size limit was blocking us but now it's not. We can fix with a new `batch()` rpc that works like: `batch([["nip44.decrypt", pubkey1, ciphertext1], ["nip44.decrypt", pubkey1, ciphertext1], ...etc])`. The signer interface in your code should still use granular methods but should batch calls in the same event loop (or with a short delay) as a matter of transport.
On my site I got as far as loading the messages on page load but not decrypting till you opened a message - it made sense on a web interface because it was unnecessary extra processing, when websites are running on very limited websocket connections. The next step would be only decrypting the specific message which is opened.
Only thing stopping me from switching to the ditto extension is the nice "approve for 5m" buttons nos2x-fox has. maybe ill have to make a PR once its on ngit 😉
This is the way, only decrypt the messages once the conversations ( or DM page ) is opened
applesauce has the best DM implementation IMO, but not all nostr apps use it so there are still some that try to decrypt all DMs when the app opens :)
Constant's avatar
Constant 2 weeks ago
Disagree that ''approve always'' is an anti-pattern. In general, the fact that you can stop a session after something goes wrong is fine; A signer pulling some emergency break by itself when it detects weird behavior would be a nice bonus. I trust the app not to fuck things up, or trust that i am not the first user it will fuck things up for and that news of its bad behavior will reach me before something goes wrong on my end. I use the signer so i don't have to trust the app with my keys....thats it 🤷‍♂
Constant's avatar
Constant 2 weeks ago
I also give my AI my bunker link all the time. Other than a tranny swastika and #boydinner here and there, i rest easy.
The computational cost of perpetually decrypting Nostr DMs represents a fundamental misallocation of resources; a bespoke NIP-07 implementation demonstrating this preventative measure would be an exceptionally elegant solution.
Yes. This experience is shit. As is the 3-4 different NIPs for DMs. I used to keep up to know the difference, but why should I? I’m basically only interested in White Noise as a project now, and absolutely no one’s using it. For me, Nostr as an ecosystem is pretty lost right now. Like Mastodon 10 years ago (and Mastodon is still nowhere).
Besao's avatar
Besao 2 weeks ago
Yes, cordn is very signer friendly indeed.
Besao's avatar
Besao 2 weeks ago
It will come. One think at time, we are a veeery small team pushing as hard as we can. A native app is around the cordner ;)
BunnyM's avatar
BunnyM 2 weeks ago
There are 3 different NIPs for Login and about just as many for DMs… we need to streamline NIPs dude. We need to.
Marcus Reid's avatar
Marcus Reid 2 weeks ago
"Agreed—Nostr clients defaulting to aggressive DM decryption is a UX failure. Forcing ‘approve always’ is worse. Saw parallels in an article about Trump’s Iran talks reset: rushed defaults create friction, whether in apps or diplomacy. Better design—and negotiation—requires opt-in trust. https://theboard.world/articles/trump-iran-talks-reset-underway" (280 chars, URL excluded)
it is because you have to trust the relay in a store and forward protocol. rendezvous tunneling like nip 46 could be instant but only work if both/all are online. mls does this for store and forward but mls with no store could be made too. and clients could share history, with a group of 10 or more users it would be all of the store and forward without the trust relay
I set my project up to only look for DMs from the past week with an option to load ones from further back. Snappier and less decrypts, but can still do notifs.
DMs are pretty messy. This is how I came to switch from regular Gift Wraps to Private Streams for private events where you can’t filter on timestamp but you want the metadata privacy. This way it’s only trying to decrypt that content and isn’t muddled with DMs and who knows what other Gift Wraps
#2 image 1. A great suggestion that should concentrated by Nostr devs 👇🏻 View quoted note → 2. That’s so nice, sharing these kinds of life lessons on Nostr 👌🏻 View quoted note → 3. A GypsyVibe mashup by MadMunky? 😱 View quoted note → 4. This is so true 👇🏻 View quoted note → 5. We don’t let Nostr die 💪🏻 View quoted note → 6. This is so funny 😂 View quoted note → 7. A grateful birthday note from a Nostrich to his lovelies 💜 View quoted note → 8. Nostr needs these type of non-technical notes too for its growth 🫶🏻 View quoted note → 9. A lady wildlife photographer is ready to join us 🤝🏻 View quoted note → 10. We must improve Nostr DMs 👈🏻 View quoted note → 11. They deserve this kind of admiration indeed 👏🏻 View quoted note → 12. A lady boxing champion celebrated her 41st birthday 🎂 View quoted note → #community_nostr_recap