Hi nostr:nprofile1qqsf03c2gsmx5ef4c9zmxvlew04gdh7u94afnknp33qvv3c94kvwxgspr3mhxue69uhksmmyd33x7epwvdhhyctrd3jjuar0dak8xtcpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhszxnhwden5te0wpuhyctdd9jzuenfv96x5ctx9e3k7mf0ss9zgs , would you mind to take a look at this? I need some suggestions related to NIP-32 🙏
#asknostr
Hi nostr:nprofile1qqsf03c2gsmx5ef4c9zmxvlew04gdh7u94afnknp33qvv3c94kvwxgspr3mhxue69uhksmmyd33x7epwvdhhyctrd3jjuar0dak8xtcpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhszxnhwden5te0wpuhyctdd9jzuenfv96x5ctx9e3k7mf0ss9zgs nostr:nprofile1qqspwwwexlwgcrrnwz4zwkze8rq3ncjug8mvgsd96dxx6wzs8ccndmcpzemhxue69uhk2er9dchxummnw3ezumrpdejz7qtxwaehxw309anxjmr5v4ezumn0wd68ytnhd9hx2tmwwp6kyvt6w46kz6nyxa6nxumc8pu82wfj09shvwt2wau8qu3cxvukxuesdd3nxufkws6nvanyx46njufsxvehsmtgwd4nvcejw43n7cnjdaskgcmpwd6r6arjw4jszxrhwden5te0dehhxarj9enx6apwwa5h5tnzd9az77vr4lw and other nostriches who might be familiar with NIP-32.
Currently, i'm preparing to migrate custom label event (kind 9978) into NIP-32 event.
What is the best way to preserve the old event data structure while maintaining compatibility with NIP-32 structure?
The structure of the old event and the new proposed event (NIP-32 compatible) has been documented here:
https://github.com/atrifat/nostr-filter-relay/issues/18
Any feedback and suggestions are really appreciated. Thank you.
Discussion
From a quick glance, I think it all looks fine, did you have any specific questions?
Thank you. I think i want to make sure about label namespace.
Is it ok to state "L" namespace multiple times as long as it was clear which reference of the namespace? In language labelling i made two namespace using "ISO-639-1" for public use (different apps/clients can freely query it) and "app.nfrelay.language" for internal use.
Yep, the second argument to l disambiguates. You can get some false positives when querying on occasion, but it's very easy to filter out client side.
I see. Glad to hear then.
What do you think about multiple label "l" structure that i have shown in language or topic labelling? Do i need to change something in those cases?
Example:
Note/post which has multiple languages
["l","en","ISO-639-1"], ["l","ja","ISO-639-1"]
Note/post which has multiple topics
["l","science_and_technology","app.nfrelay.topic"], ["l","arts_and_culture","app.nfrelay.topic"]
Yep, I think that's totally kosher. I also like what you did with the `label_score` type things. People often misuse nip 32 to be a key/value store, but meta makes plenty of sense to include.
Ah, thank you. It clears probably all my doubts with event structure migration. I think i can start slowly implement the new structure and deprecate the old structure in the following weeks.
Oh, I thought NIP-78 has been used for that. I think there was library to make key-value storage using NIP-78.