Decrypting DMs is an issue with any remote signer that uses NIP-46, because each decrypt request has to round-trip over a relay for every single message. And modern (NIP-17) DMs are giftwrapped, so each message is roughly two decrypt requests instead of one — the client has to unwrap the giftwrap and then the seal, both round-tripping to Clave. So an npub with a few thousand messages (totally possible) means several thousand round-trips, which can take a few minutes even in the best case.
@Clave connects directly to relays when the app is foregrounded and processes requests in parallel, so if you're logging into a client for the first time, I'd recommend keeping Clave open (obviously a challenge if the client is on the same device). When Clave is backgrounded, it goes through the iOS notification service extension, which is more constrained — iOS gives each wake a hard ~30s budget and only a handful of requests get handled per wake, so a big backlog can stall and take much longer. Foregrounding is by far the faster path.
Ultimately though, it's up to clients that support DMs and NIP-46 to figure out ways to avoid trying to decrypt an entire DM inbox over the wire in one shot.
Login to reply
Replies (3)
Aye. I'm basically adding a sort of guard so it doesn't blast the user with requests / finding a good balance with UX for this.
DMs should only be requested to be unencrypted when viewed and per note but I’m guessing that’s to granular for most users…
It’s also good to note that, if it weren’t for the base64 error, notifications would be delivered silently straight to the Notification Center, so even if there was no denouncing, I wouldn’t have noticed the influx of events.