NIP-XX ====== Access Control Upgrade ---------------------- `draft` `optional` This NIP defines how to upgrade a public event with the property of limiting access to itself. ## Upgrading a Public Event A public event (with no access control), such as of `kind:1`, must be published or updated with a `full_event` tag pointing to a `kind:30042` event address. It may include one of the following tags holding a preview of the full event content: `summary`, `image`, `audio`, `video`. The first holds a text excerpt while the others an URL. Example: ```json { "kind": 1063, "tags": [ ["full_event", "30042:<32-bytes lowercase hex of a pubkey>:abc", ""], ["image", ""], ["dim", "800x600"] ], "content": "", ... } ``` ## Full Event A "Full Event" is of `kind:30042`. It has [NIP-42](42.md) `A` tags the author can update at will with the pubkeys allowed to access it. It uses the custom NIP-42 event serialization for events that require `AUTH`. The `.content` and other tags aren't fixed. The structure depends on the kind of the public event it is protecting. For example, if it is protecting a `kind:30023`, it should have the structure defined on [NIP-23](23.md). Example: ```json { "kind": 30042, "pubkey": "", "tags": [ ["d", ""], ["A", ""], // important to keep author access right ["A", ""], ["A", ""], ["url", "https://some.place/file.webp"], ["dim", "800x600"] ], "content": "Happy New Year, my dear supporters!!", ... } ```