mirror of
https://github.com/nostr-protocol/nips.git
synced 2026-07-22 07:48:25 +00:00
C1: simplify — remove redundant sections, unify examples, streamline resolution
This commit is contained in:
54
C1.md
54
C1.md
@@ -46,7 +46,7 @@ An addressable event kind `39382` serves as a pointer to collaboratively-owned c
|
||||
| `k` | Yes | Target event kind (any kind) |
|
||||
| `p` | Yes | Owner pubkeys (one or more) |
|
||||
|
||||
The creator's pubkey is implicitly an owner and SHOULD NOT appear in `p` tags.
|
||||
The creator's pubkey is implicitly an owner.
|
||||
|
||||
### Target Events
|
||||
|
||||
@@ -67,21 +67,13 @@ Any event kind MAY be a target of collaborative ownership. All target events:
|
||||
}
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
### Resolution Algorithm
|
||||
|
||||
To resolve the current state of collaboratively-owned content:
|
||||
|
||||
1. Parse the `39382` pointer event to extract owners (`p` tags) and target kind (`k` tag)
|
||||
2. Extract the identifier from the `d` tag
|
||||
3. Query: `{"kinds": [<target-kind>], "authors": [<all-owners>], "#d": ["<identifier>"]}`
|
||||
4. For addressable target kinds: return the event with the highest `created_at`
|
||||
5. For non-addressable target kinds: return all matching events that contain a valid `a` tag backlinking to the pointer
|
||||
|
||||
### Initial Discovery
|
||||
|
||||
Clients that do not yet have any version of the event MUST query by `#d` tag alone or by known owner pubkeys.
|
||||
1. Collect owners from the `39382` pointer's `p` tags (plus the pointer's pubkey)
|
||||
2. Query: `{"kinds": [<target-kind>], "authors": [<all-owners>], "#d": ["<identifier>"], "limit": 1}`
|
||||
3. Return the most recent event
|
||||
|
||||
## Client Behavior
|
||||
|
||||
@@ -94,13 +86,7 @@ Clients SHOULD NOT display co-author attribution for a target event unless:
|
||||
|
||||
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.
|
||||
|
||||
### Display Recommendations
|
||||
|
||||
- Clients SHOULD display which pubkey signed each version
|
||||
- Clients SHOULD indicate when an event is part of a collaborative set
|
||||
- Clients MAY show the full owner set from the pointer event alongside the signing pubkey
|
||||
|
||||
## Examples
|
||||
## Example
|
||||
|
||||
### Pointer Event
|
||||
|
||||
@@ -118,7 +104,7 @@ An event without a verifiable `a` tag backlink to a `39382` pointer MUST NOT be
|
||||
}
|
||||
```
|
||||
|
||||
### Addressable Target (kind 30023)
|
||||
### Target Event (by any owner)
|
||||
|
||||
```jsonc
|
||||
{
|
||||
@@ -133,30 +119,8 @@ An event without a verifiable `a` tag backlink to a `39382` pointer MUST NOT be
|
||||
}
|
||||
```
|
||||
|
||||
### Non-Addressable Target (kind 4199)
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"kind": 4199,
|
||||
"pubkey": "carol-pubkey",
|
||||
"tags": [
|
||||
["d", "collaborative-guide"],
|
||||
["a", "39382:alice-pubkey:collaborative-guide"]
|
||||
],
|
||||
"content": "..."
|
||||
}
|
||||
```
|
||||
|
||||
### Client Resolution
|
||||
|
||||
1. Client receives `naddr` for the `39382` pointer
|
||||
2. Parses owners: `[alice, bob, carol]`, target kind: `30023`
|
||||
3. Queries: `{"kinds": [30023], "authors": ["alice", "bob", "carol"], "#d": ["collaborative-guide"]}`
|
||||
4. Filters results: only events with `["a", "39382:alice-pubkey:collaborative-guide"]` are considered collaborative
|
||||
5. Returns most recent version (for addressable kinds) or full set (for non-addressable kinds)
|
||||
|
||||
## Security Considerations
|
||||
|
||||
- Owners can unilaterally modify content
|
||||
- An `a` tag backlink alone is insufficient — clients MUST verify the referenced pointer event includes the author in its `p` tags
|
||||
- Owner changes on the pointer event take effect immediately; old target events from removed owners are no longer authoritative
|
||||
1. Client receives the `39382` pointer
|
||||
2. Owners: `[alice, bob, carol]`, target kind: `30023`
|
||||
3. Queries: `{"kinds": [30023], "authors": ["alice", "bob", "carol"], "#d": ["collaborative-guide"], "limit": 1}`
|
||||
|
||||
Reference in New Issue
Block a user