{"id":"282b7c7fb82637e2212ca0b734c7df9d2f5b01a2df598f73e3d7d48ac8d9759f","pubkey":"b22b06b051fd5232966a9344a634d956c3dc33a7f5ecdcad9ed11ddc4120a7f2","created_at":1786870464,"kind":30817,"tags":[["d","replaceable-event-snapshots"],["title","Snapshots of Replaceable Events"],["alt","Nostr Implementation Possibility: Snapshots of Replaceable Events"],["k","1349","Event snapshot"],["client","NostrHub"]],"content":"# Snapshots of Replaceable Events\n\n`draft` `optional`\n\nKind `1349` preserves one version of a replaceable or addressable event by wrapping it in a\nregular event, which relays keep.\n\n## Motivation\n\nRelays keep only the latest replaceable or addressable event, so an author can rewrite a\ndocument and leave no trace of what it said before. Approvals and highlights point at a\ncoordinate rather than at an id, so they silently transfer to whatever replaces the text\nthey were given to.\n\n## The event\n\n`content` is the wrapped event, serialized as JSON exactly as it appeared on the wire.\nAnyone may publish a snapshot: the inner signature proves who wrote the document, the outer\none proves only who archived it.\n\n| Tag | Description                                                                              |\n| --- | ---------------------------------------------------------------------------------------- |\n| `e` | Id of the wrapped event.                                                                  |\n| `k` | Kind of the wrapped event.                                                                |\n| `p` | Pubkey of the wrapped event's author.                                                     |\n| `a` | Coordinate of the wrapped event, with an empty `d` for kinds 10000 to 19999.               |\n\n```jsonc\n{\n  \"kind\": 1349,\n  \"content\": \"{\\\"id\\\":\\\"a1b2...\\\",\\\"pubkey\\\":\\\"9f8e...\\\",\\\"created_at\\\":1771547830,\\\"kind\\\":30817,\\\"tags\\\":[[\\\"d\\\",\\\"my-spec\\\"]],\\\"content\\\":\\\"# My Spec\\\",\\\"sig\\\":\\\"c3d4...\\\"}\",\n  \"tags\": [\n    [\"e\", \"a1b2...\"],\n    [\"k\", \"30817\"],\n    [\"p\", \"9f8e...\"],\n    [\"a\", \"30817:9f8e...:my-spec\"]\n  ]\n}\n```\n\n## Validation\n\nThe tags are written by the publisher, who may be anyone. Without checking them, anyone\ncould attach arbitrary events to another document's history.\n\nClients MUST discard a snapshot unless:\n\n1. `content` parses as an event and its signature verifies;\n2. `e`, `k`, `p` and `a` agree with the wrapped event;\n3. the wrapped kind is replaceable or addressable.\n\nOrder versions by the wrapped event's `created_at`, not the snapshot's, which is only the\ntime of archival. Deduplicate on the wrapped event's id; several archivers wrapping the\nsame version is expected.\n\n## Querying\n\n```json\n{ \"kinds\": [1349], \"#a\": [\"30817:<pubkey>:<d>\"] }\n```\n\nA snapshot proves a version existed. It never proves a set of them is complete, so a\nhistory is what was observed, not what happened.","sig":"182e87d966f6af359568cd63082b66c8c0b932a17ee27e301d5b3362100cce67ff2704ceddbc26ebfed1b1747917e07086d84e02ec0c162680493b49a2ae6800"}