buttercat1791 on Nostr: I like the idea of using an ISBN for the d tag, if we have it. The thing with the d ...
I like the idea of using an ISBN for the d tag, if we have it.
The thing with the d tag is that it carries a particular meaning for 30000-series parameterized replaceable events.
Since the ID field in the event JSON is a unique hash of the contents of that event, it will change every time the contents of the event change. So, to allow editing (i.e., replacing) events, a second identifier that does not change with the event contents is needed. That is the d tag.
It can be relatively human readable, but I would tend towards a guaranteed unique identifier, such as a GUID or UUID.
I had forgotten that about parameterized replaceable events until talking with Pablo. We have to be careful to avoid ID clashes in the d tag, which is more likely to occur if we use just the user-friendly title. Since we're early, though, the d tags we've used for the books of the Bible ought to stand just fine. No one else has published an event with a d tag of "1-john" yet, I don't think.
Additionally, parameterized replaceable events are identified by kind. The identifiers for queries and share links consist of kind number + d tag ID. So that gives us an extra layer of safety for avoiding name clashes.
Published at
2024-07-08 12:13:26Event JSON
{
"id": "b825f88f8cfa4c356867c4a73024e94435e677f29b23b75d0e31d1a54dc39ba8",
"pubkey": "70122128273bdc07af9be7725fa5c4bc0fc146866bec38d44360dc4bc6cc18b9",
"created_at": 1720440806,
"kind": 1,
"tags": [
[
"p",
"fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52",
"",
"mention"
],
[
"p",
"70122128273bdc07af9be7725fa5c4bc0fc146866bec38d44360dc4bc6cc18b9",
"",
"mention"
],
[
"p",
"dd664d5e4016433a8cd69f005ae1480804351789b59de5af06276de65633d319"
],
[
"e",
"265f615b4bdf3eef9c4a550430dc08d30510ba049870e6646bab3df0fbfb36c1",
"wss://relay.wellorder.net",
"root"
],
[
"e",
"293bb97e8a25c873d050561da8fe57b71da8eb5d947092d7d77c96f4738dfbd3",
"wss://nostr.thesamecat.io",
"reply"
]
],
"content": "I like the idea of using an ISBN for the d tag, if we have it.\n\nThe thing with the d tag is that it carries a particular meaning for 30000-series parameterized replaceable events.\n\nSince the ID field in the event JSON is a unique hash of the contents of that event, it will change every time the contents of the event change. So, to allow editing (i.e., replacing) events, a second identifier that does not change with the event contents is needed. That is the d tag.\n\nIt can be relatively human readable, but I would tend towards a guaranteed unique identifier, such as a GUID or UUID.\n\nI had forgotten that about parameterized replaceable events until talking with Pablo. We have to be careful to avoid ID clashes in the d tag, which is more likely to occur if we use just the user-friendly title. Since we're early, though, the d tags we've used for the books of the Bible ought to stand just fine. No one else has published an event with a d tag of \"1-john\" yet, I don't think.\n\nAdditionally, parameterized replaceable events are identified by kind. The identifiers for queries and share links consist of kind number + d tag ID. So that gives us an extra layer of safety for avoiding name clashes.",
"sig": "61d769610cc0750dc92626a8af8e801a9407920ae43ba8d992fc33f8e077c33d35cc66ecf5744208d96058e40fe9e98105cfc04a2d848070d71b80b776277de5"
}