Oh, that’s right. I forgot about that. Sign the gift wrap from your random key and send it to yourself at the real key (or alias key). Which should be a different random key than the one used to sign the gift wrap that goes to the receiver (or their alias key). Got it. Thanks!
yep, sender and receiver have separate wraps, signed with different keys. Each side can delete their copy of the message anytime they want without affecting the other side.
Anyone implementing or testing nip17 may find this command line tool helpful. It can be used with NAK to send/receive nip17 messages to/from a relay with auth(optional). cc nostr:nprofile1qqsglv2qkn5dmmuhee9cy8fywfu2rfp4xd3xy0myqg2gfvmjl9yqqrqppamhxue69uhk2tnwdaejumr0dsq3qamnwvaz7tmwdaehgu3wd3skueqpz3mhxue69uhhyetvv9ujuerpd46hxtnfduekf372 github.com/jeremyd/nip17pipe
had some code laying around that I pushed up. maybe it can help someone. #nip17 nostr:nevent1qqs247ptx4lgn9tdq2efj9p3syzn6splhwxvmz9uq3avuvqpmkm5pwcpzdmhxue69uhhwmm59e6hg7r09ehkuef0qgs8eseg5zxak2hal8umuaa7laxgxjyll9uhyxp86c522shn9gj8crsrqsqqqqqpghx5ka
I needed to construct one in TS and send it off, so probably wouldn’t help. I’ll donate some code example which I posted here earlier, to the nip repo
ya i think i saw you mention, no way to know if it sent properly. this tool can show the wraps youve sent is all.. maybe it speeds up your testing
Maybe this would be helpful: https://github.com/coracle-social/welshman/blob/master/packages/signer/src/nip59.ts
It would have been yesterday 😂🤣🫂
What about for the seal event? If I'm the sender of a message, the copy of the message that is sent to myself will contain a seal event with my pubkey set as the event pubkey. The seal content is then unencryptable on my side since I have no information on who I previously communicated with and can't calculate the conversation key (at least with nostr-tools). Would I just have to save a local state in that case, or am I thinking about the spec wrong? Currently working on finishing up NIP-17 integration on nostr:nprofile1qqs2xugc5jyguqkj36rk0syv4tmnkjdtmtperttl7x9rqjy3ustdcvcppemhxue69uhkummn9ekx7mp0qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qg6waehxw309aek2mnyd96zumn0wdnxcctjv5hxxmmd9uxa0uz8.
If you’re the sender and you send the copy to yourself, you are both the sender and the receiver. You would unseal with your private key, which would reveal the kind 14 DM rumor (unsigned DM) which has the p-tag(s) of the actual receivers.
Ahh, that finally makes sense; thank you!
This is the best developer support group; single-handedly cleared up all the confusion about these DM and encryption NIPs. I feel like we’re getting some momentum to hopefully move most of the popular clients onto NIP-17 DMs and away from NIP-04 DMs in the medium-term. I’m very curious for scoping out the effort to have Damus onboarded.
The dev support group is the killer app... 😅