nostr-protocol / nips

Nostr Implementation Possibilities
2.36k stars 569 forks source link

Generate OTS for an event #1542

Open alexgleason opened 2 hours ago

alexgleason commented 2 hours 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 2 hours ago

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