mirror of
https://github.com/nostr-protocol/nips.git
synced 2026-08-09 23:57:08 +00:00
2.6 KiB
2.6 KiB
NIP-C1
Collaborative Ownership
draft optional
This NIP defines a mechanism for multiple pubkeys to collaboratively maintain addressable events while preserving backwards compatibility.
Motivation
Certain applications require shared ownership where:
- Attribution matters: Each collaborator signs with their own key
- Dynamic membership: Owners can be added or removed
- Backwards compatibility: Non-supporting clients see normal events
Specification
Collaborative Pointer Event
A new addressable event kind 39382 serves as a pointer to collaboratively-owned content:
{
"kind": 39382,
"pubkey": "<creator-pubkey>",
"tags": [
["d", "<slug>"],
["k", "<target-kind>"],
["p", "<owner-1-pubkey>"],
["p", "<owner-2-pubkey>"],
["p", "<owner-3-pubkey>"]
],
"content": "",
"created_at": 1234567890
}
Tag Definitions
| Tag | Required | Description |
|---|---|---|
d |
Yes | ` |
k |
Yes | Target event kind |
p |
Yes | Owner pubkeys (one or more) |
Resolution Algorithm
To resolve the current state of collaboratively-owned content:
- Parse the
39382pointer event to extract owners (ptags) and target kind (ktag) - Extract the slug from the
dtag (everything after the first-) - Query:
{"kinds": [<target-kind>], "authors": [<all-owners>], "#d": ["<slug>"], "limit": 1}
Back-Reference
Target events MUST include an a tag pointing to the 39382 pointer:
{
"kind": 30023,
"tags": [
["d", "my-article"],
["a", "39382:<pointer-creator-pubkey>:30023-my-article"]
]
}
This allows clients to discover collaborative ownership from either direction: pointer → content or content → pointer.
Example
Pointer Event
{
"kind": 39382,
"pubkey": "alice-pubkey",
"tags": [
["d", "collaborative-guide"],
["k", "30023"],
["p", "alice-pubkey"],
["p", "bob-pubkey"],
["p", "carol-pubkey"]
],
"content": ""
}
Target Article (by any owner)
{
"kind": 30023,
"pubkey": "bob-pubkey",
"tags": [
["d", "collaborative-guide"],
["title", "A Collaborative Guide"],
["a", "39382:alice-pubkey:30023-collaborative-guide"]
],
"content": "..."
}
Client Resolution
- Client receives
naddrfor the39382pointer - Parses owners:
[alice, bob, carol] - Queries:
{"kinds": [30023], "authors": ["alice", "bob", "carol"], "#d": ["collaborative-guide"], "limit": 1} - Returns most recent version regardless of which owner published it