swarm/lib
randogoth f69fcb661f Authenticate and unwrap received gift-wrapped DMs
Harden unwrapGift for the receive side: verify the seal's BIP-340 signature
and recomputed id, enforce that the rumor's author matches the seal signer
(NIP-59 anti-spoofing), and check the rumor id against its contents. The
rumor is unsigned by design, so sender authentication rests on the seal.

Add UnwrapDirectMessage to NostrDmActor, returning the authenticated sender,
content, timestamp, and tags. Cover both with tests: an unwrap round-trip and
a rejection of a wrap whose inner rumor spoofs a different author.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 18:26:52 +03:00
..
src Authenticate and unwrap received gift-wrapped DMs 2026-06-25 18:26:52 +03:00
swarm.dart Add NIP-17 gift-wrapped direct messages 2026-06-25 17:48:23 +03:00