Flatbuffers and protobuf are meant for generic data formats that evolve over time. Nostr is a fixed data format, protobuf is overkill.

Reply to this note

Please Login to reply.

Discussion

Even lightning uses TLV. Works great and is simple.

40 years.

😏

I agree TLV seems fine if you’re just encoding a stable schema. worst case is you’re incrementing types and clients have to add another case to their switch statement… which we already do with ‘kind’ today.

I'm curious what javascript/typescript library do you recommend to play around nostr apis?

I’m not much of a JS/TS guy but even I have been able to be successful with nostr-tools:

https://github.com/nbd-wtf/nostr-tools

exactly

But new NIPs might introduce new tags. Should we consider this as well?