Oddbean new post about | logout
 Hi folks,

I'm trying to figure out the expected behaviour for NIP-17 enabled clients when posting GiftWrapped DMs.

Assume two users:

Alice: Configured "relay1.example.com" as her preferred DM relay (the only relay listed in Alice's 10050 DM list).
Bob: Configured "relay2.example.com" as his preferred DM relay.

When Alice sends a GiftWrapped DM to Bob, should Alice's Nostr client:

1. Send a Kind 1059 event, tagging Bob's pubkey, to "relay2.example.com"?
2. Also send a copy of the above event to "relay1.example.com" for Alice's own record?

Is that correct? If it is, should the Kind 1059 event sent to "relay1.example.com" still be tagged with Bob's (the receiver's) pubkey? Or should it be tagged with Alice's (the sender's) pubkey?

#asknostr #cryptography #dms #giftwrap #nip17 #nip59 
 nostr:nprofile1qqsyvrp9u6p0mfur9dfdru3d853tx9mdjuhkphxuxgfwmryja7zsvhqpzamhxue69uhhv6t5daezumn0wd68yvfwvdhk6tcppemhxue69uhkummn9ekx7mp0qyghwumn8ghj7mn0wd68ytnhd9hx2tcewvzaw, nostr:nprofile1qqsqr6uzlmujfe0cc7dt76w05kk42z88sjhh9pqrdy4ghdvfpel80dgpzemhxue69uhhyetvv9ujumn9w3ehgu3wd9hj7qg6waehxw309aex2mrp0ykkgetk9ehx2arnw3ezu6t09un5ew33, I'm very sorry to disturb you, but you may be the most qualified people to answer. Could you kindly give me a hand?

nostr:nprofile1qqsw9n8heusyq0el9f99tveg7r0rhcu9tznatuekxt764m78ymqu36cpzdmhxue69uhhwmm59e6hg7r09ehkuef0qy2hwumn8ghj7enjv4h8xtn4w3ux7tn0dejj7qg4waehxw309aex2mrp0yh82arcduhx7mn99ueat4s3 - tagging you here because of the DMs about GiftWrapping on Haven that I sent earlier today. 
 That is correct, but each 1059 event tags only the receiver. So, the version for Alice's relay tags Alice and the version for Bob's relay tags Bob.  
 Many thanks! So, this means that if "relay1.example.com" is Alice's "personal DM relay", allowing 1059 events tagged with Alice's pubkey should be enough, right?

For example, if Alice uses Amethyst to send a message to Bob, Alice will receive an encrypted copy of her own message, wrapped in a 1059 event with a p tag containing her own pubkey.

Similarly, if Bob then uses Amethyst to reply to Alice, 'relay1.example.com" will receive an encrypted copy of Bob's message, gift-wrapped and tagged with Alice's pubkey.

So, in this flow, Alice's personal DM relay will always receive 1059 events tagged with Alice's pubkey. Is my interpretation correct? 
 That is all correct :)