nostr-protocol / nips

Nostr Implementation Possibilities
2.4k stars 583 forks source link

Generate OTS for an event #1542

Open alexgleason opened 1 month ago

alexgleason commented 1 month ago

I was reading the key migration proposal and learning about NIP-03 and OTS. I think NIP-03 is underspec'd. Do you generate the OTS from the event ID itself, or the SHA-256 of the event ID? In other words, is the OTS "document" the unhashed serialized event, or is it the event ID itself which OTS sha256 hashes again? Including an example of how to create the proof would be very helpful.

fiatjaf commented 1 month ago

It's the event id directly, since it's already a sha256 of the event.