Global Feed Post Login
Replying to Avatar CryptoDrew

Nostr Dev Question:

When serializing an event to generate the hash ID, how should tags be ordered?

I cannot find anything under NIP-01 for this.

Currently, I am storing metadata external to the event to keep track of the tag order respective of how it was received, but that doesn't seem optimal.

Is there a recommended standard? Maybe alphabetical based on the UTF8 serialized strings of each tag? Although, that is certainly less optimal since that would require individual serialization of each tag plus a string compare sort.

#nostrdev #nostrdevs #devstr #nip01 #asknostr

Avatar
Jim Smij 2y ago

anyone?

nostr:nevent1qqsvtt99qx4y96f93h9q2rwmfjv5qkkeet0s7j78sfrg66rfd5r84vgpp4mhxue69uhkummn9ekx7mqzyzq7srzxhx7sklzkfavcv3f8lf03ej2w569q0u5xskycfg6pkz3wsqcyqqqqqqgrc9atc

Reply to this note

Please Login to reply.

Discussion

Avatar
CryptoDrew 2y ago

Thanks for sharing! If no one responds back to me, then I'll just have to open a ticket on github tonight 😁 Which I might do anyway as a formality since it really should be documented for us devs.

Thread collapsed