diff options
Diffstat (limited to 'C1.md')
| -rw-r--r-- | C1.md | 54 |
1 files changed, 9 insertions, 45 deletions
| @@ -46,7 +46,7 @@ An addressable event kind `39382` serves as a pointer to collaboratively-owned c | |||
| 46 | | `k` | Yes | Target event kind (any kind) | | 46 | | `k` | Yes | Target event kind (any kind) | |
| 47 | | `p` | Yes | Owner pubkeys (one or more) | | 47 | | `p` | Yes | Owner pubkeys (one or more) | |
| 48 | 48 | ||
| 49 | The creator's pubkey is implicitly an owner and SHOULD NOT appear in `p` tags. | 49 | The creator's pubkey is implicitly an owner. |
| 50 | 50 | ||
| 51 | ### Target Events | 51 | ### Target Events |
| 52 | 52 | ||
| @@ -67,21 +67,13 @@ Any event kind MAY be a target of collaborative ownership. All target events: | |||
| 67 | } | 67 | } |
| 68 | ``` | 68 | ``` |
| 69 | 69 | ||
| 70 | The `d` tag is required regardless of whether the target kind is normally addressable. For addressable event kinds (30000-39999), the `d` tag serves its usual role. For all other kinds, the `d` tag enables grouping and correlation with the pointer. | ||
| 71 | |||
| 72 | ### Resolution Algorithm | 70 | ### Resolution Algorithm |
| 73 | 71 | ||
| 74 | To resolve the current state of collaboratively-owned content: | 72 | To resolve the current state of collaboratively-owned content: |
| 75 | 73 | ||
| 76 | 1. Parse the `39382` pointer event to extract owners (`p` tags) and target kind (`k` tag) | 74 | 1. Collect owners from the `39382` pointer's `p` tags (plus the pointer's pubkey) |
| 77 | 2. Extract the identifier from the `d` tag | 75 | 2. Query: `{"kinds": [<target-kind>], "authors": [<all-owners>], "#d": ["<identifier>"], "limit": 1}` |
| 78 | 3. Query: `{"kinds": [<target-kind>], "authors": [<all-owners>], "#d": ["<identifier>"]}` | 76 | 3. Return the most recent event |
| 79 | 4. For addressable target kinds: return the event with the highest `created_at` | ||
| 80 | 5. For non-addressable target kinds: return all matching events that contain a valid `a` tag backlinking to the pointer | ||
| 81 | |||
| 82 | ### Initial Discovery | ||
| 83 | |||
| 84 | Clients that do not yet have any version of the event MUST query by `#d` tag alone or by known owner pubkeys. | ||
| 85 | 77 | ||
| 86 | ## Client Behavior | 78 | ## Client Behavior |
| 87 | 79 | ||
| @@ -94,13 +86,7 @@ Clients SHOULD NOT display co-author attribution for a target event unless: | |||
| 94 | 86 | ||
| 95 | An event without a verifiable `a` tag backlink to a `39382` pointer MUST NOT be presented as collaboratively authored. This prevents spoofed co-authorship claims. | 87 | An event without a verifiable `a` tag backlink to a `39382` pointer MUST NOT be presented as collaboratively authored. This prevents spoofed co-authorship claims. |
| 96 | 88 | ||
| 97 | ### Display Recommendations | 89 | ## Example |
| 98 | |||
| 99 | - Clients SHOULD display which pubkey signed each version | ||
| 100 | - Clients SHOULD indicate when an event is part of a collaborative set | ||
| 101 | - Clients MAY show the full owner set from the pointer event alongside the signing pubkey | ||
| 102 | |||
| 103 | ## Examples | ||
| 104 | 90 | ||
| 105 | ### Pointer Event | 91 | ### Pointer Event |
| 106 | 92 | ||
| @@ -118,7 +104,7 @@ An event without a verifiable `a` tag backlink to a `39382` pointer MUST NOT be | |||
| 118 | } | 104 | } |
| 119 | ``` | 105 | ``` |
| 120 | 106 | ||
| 121 | ### Addressable Target (kind 30023) | 107 | ### Target Event (by any owner) |
| 122 | 108 | ||
| 123 | ```jsonc | 109 | ```jsonc |
| 124 | { | 110 | { |
| @@ -133,30 +119,8 @@ An event without a verifiable `a` tag backlink to a `39382` pointer MUST NOT be | |||
| 133 | } | 119 | } |
| 134 | ``` | 120 | ``` |
| 135 | 121 | ||
| 136 | ### Non-Addressable Target (kind 4199) | ||
| 137 | |||
| 138 | ```jsonc | ||
| 139 | { | ||
| 140 | "kind": 4199, | ||
| 141 | "pubkey": "carol-pubkey", | ||
| 142 | "tags": [ | ||
| 143 | ["d", "collaborative-guide"], | ||
| 144 | ["a", "39382:alice-pubkey:collaborative-guide"] | ||
| 145 | ], | ||
| 146 | "content": "..." | ||
| 147 | } | ||
| 148 | ``` | ||
| 149 | |||
| 150 | ### Client Resolution | 122 | ### Client Resolution |
| 151 | 123 | ||
| 152 | 1. Client receives `naddr` for the `39382` pointer | 124 | 1. Client receives the `39382` pointer |
| 153 | 2. Parses owners: `[alice, bob, carol]`, target kind: `30023` | 125 | 2. Owners: `[alice, bob, carol]`, target kind: `30023` |
| 154 | 3. Queries: `{"kinds": [30023], "authors": ["alice", "bob", "carol"], "#d": ["collaborative-guide"]}` | 126 | 3. Queries: `{"kinds": [30023], "authors": ["alice", "bob", "carol"], "#d": ["collaborative-guide"], "limit": 1}` |
| 155 | 4. Filters results: only events with `["a", "39382:alice-pubkey:collaborative-guide"]` are considered collaborative | ||
| 156 | 5. Returns most recent version (for addressable kinds) or full set (for non-addressable kinds) | ||
| 157 | |||
| 158 | ## Security Considerations | ||
| 159 | |||
| 160 | - Owners can unilaterally modify content | ||
| 161 | - An `a` tag backlink alone is insufficient — clients MUST verify the referenced pointer event includes the author in its `p` tags | ||
| 162 | - Owner changes on the pointer event take effect immediately; old target events from removed owners are no longer authoritative | ||