TheGrinder on Nostr: coinoswallet seem like there is a small bug in how coinos is handling the "r" and "R" ...
coinoswallet (npub1h2q…w8ch) seem like there is a small bug in how coinos is handling the "r" and "R" tags for zap receipts. If you remember I recently mentioned that zap alerts were broken for me on zapstream after changing my nostr LN address to coinos. Then, some time last week, zap alerts started working again and while they're displaying the zappers display name correct on zapstream, the receipts shows "TheGrinder zapped..." on noStrudel. Here's why.
In the NIP-57 spec there are two kinds of events, zap requests and zap receipts. when a client "zaps" another event it signs the zap request event (9734) and sends it to the LNURL endpoint. then once the lightning invoice is paid the service wraps the event in a zap receipt event (9735)
https://github.com/nostr-protocol/nips/blob/master/57.md#appendix-e-zap-receipt-event
The zap receipt event is the "proof" that the user was zapped and the sats where sent, its also what clients fetch to show zaps on event. the zap receipt event is supposed to contain
- a "p" tag tagging the pubkey getting zapped
- a "e" tag referencing the event getting zapped
- optionally an "a" tag referencing the article getting zapped
- and finally a upper case "P" tag tagging the pubkey who sent the zap
The uppercase "P" tag in coinos appears to be wrong. It appears you're setting it to the same as the zap receiver ("p") tag. Hence noStrudel reckons I'm zapping my own stream and sometime it looked like it was getting a random pubkey so the receipt returns "Anon zapped..."
The uppercase "P" tag is a newer addition to the NIP-57 spec, previously there was only the lowercase "p" tag that marked the receiver and clients would manually parse the stringified (embedded) zap request event and get the "pubkey" from it to figure out the sender pubkey.
Long story sort, that's why zap.stream shows the correct sender for coinos zaps and why noStrudel shows my own pubkey. noStrudel is using the newer "P" tag and zap.stream is still using the old (slower and more reliable) way.
Thanks also to hzrd149 (npub1ye5…knpr) for helping to figure this out.
In the NIP-57 spec there are two kinds of events, zap requests and zap receipts. when a client "zaps" another event it signs the zap request event (9734) and sends it to the LNURL endpoint. then once the lightning invoice is paid the service wraps the event in a zap receipt event (9735)
https://github.com/nostr-protocol/nips/blob/master/57.md#appendix-e-zap-receipt-event
The zap receipt event is the "proof" that the user was zapped and the sats where sent, its also what clients fetch to show zaps on event. the zap receipt event is supposed to contain
- a "p" tag tagging the pubkey getting zapped
- a "e" tag referencing the event getting zapped
- optionally an "a" tag referencing the article getting zapped
- and finally a upper case "P" tag tagging the pubkey who sent the zap
The uppercase "P" tag in coinos appears to be wrong. It appears you're setting it to the same as the zap receiver ("p") tag. Hence noStrudel reckons I'm zapping my own stream and sometime it looked like it was getting a random pubkey so the receipt returns "Anon zapped..."
The uppercase "P" tag is a newer addition to the NIP-57 spec, previously there was only the lowercase "p" tag that marked the receiver and clients would manually parse the stringified (embedded) zap request event and get the "pubkey" from it to figure out the sender pubkey.
Long story sort, that's why zap.stream shows the correct sender for coinos zaps and why noStrudel shows my own pubkey. noStrudel is using the newer "P" tag and zap.stream is still using the old (slower and more reliable) way.
Thanks also to hzrd149 (npub1ye5…knpr) for helping to figure this out.