Martti Malmi on Nostr: IrisDB uses tag-replaceable events of kind 30078. "d" tag is the "file path", for ...
IrisDB uses tag-replaceable events of kind 30078.
"d" tag is the "file path", for example "groups/follows/somePublicKey" or "user/profile/name". You can update the content of the "file" with a new event that has the same tag.
"f" tag is the "directory path". "groups/follows" in this case. You can list all the "files" in the directory by querying relays with the "#f" tag filter. Strfry doesn't index this field, but some relays do.
Content field is the file content, can be any JSON serialized data.
If we did profile fields and follow lists this way, there would be no overwrite problem when you sign in to a new device that doesn't have your previous profile or follow list. If we did likes that way, unliking would be trivial.
When we create new Nostr apps or features, we don't need to come up with new obscure event kinds. D tag "apps/events/some-event-name/participants/some-public-key" is more descriptive than some random number that might still conflict with someone else's application.
I wanted to name it "treelike" instead of IrisDB in order to not sound overly complicated, but the npm package name was already taken.
https://github.com/irislib/irisdb
https://github.com/irislib/iris-docs - react app starter template: npm create iris@latest
"d" tag is the "file path", for example "groups/follows/somePublicKey" or "user/profile/name". You can update the content of the "file" with a new event that has the same tag.
"f" tag is the "directory path". "groups/follows" in this case. You can list all the "files" in the directory by querying relays with the "#f" tag filter. Strfry doesn't index this field, but some relays do.
Content field is the file content, can be any JSON serialized data.
If we did profile fields and follow lists this way, there would be no overwrite problem when you sign in to a new device that doesn't have your previous profile or follow list. If we did likes that way, unliking would be trivial.
When we create new Nostr apps or features, we don't need to come up with new obscure event kinds. D tag "apps/events/some-event-name/participants/some-public-key" is more descriptive than some random number that might still conflict with someone else's application.
I wanted to name it "treelike" instead of IrisDB in order to not sound overly complicated, but the npm package name was already taken.
https://github.com/irislib/irisdb
https://github.com/irislib/iris-docs - react app starter template: npm create iris@latest