-
Notifications
You must be signed in to change notification settings - Fork 736
Collaborative event ownership #2235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pablof7z
wants to merge
3
commits into
master
Choose a base branch
from
nip-collaborative-ownership
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| NIP-C1 | ||
| ====== | ||
|
|
||
| Collaborative Ownership | ||
| ----------------------- | ||
|
|
||
| `draft` `optional` | ||
|
|
||
| This NIP defines a mechanism for multiple pubkeys to collaboratively maintain events. | ||
|
|
||
| ## Motivation | ||
|
|
||
| Certain applications require shared ownership where: | ||
|
|
||
| 1. **Attribution matters**: Each collaborator signs with their own key | ||
| 2. **Dynamic membership**: Owners can be added or removed | ||
| 3. **Backwards compatibility**: Non-supporting clients see normal events | ||
|
|
||
| ## Specification | ||
|
|
||
| ### Collaborative Pointer Event | ||
|
|
||
| An addressable event kind `39382` serves as a pointer to collaboratively-owned content: | ||
|
|
||
| ```jsonc | ||
| { | ||
| "kind": 39382, | ||
| "pubkey": "<creator-pubkey>", | ||
| "tags": [ | ||
| ["d", "<identifier>"], | ||
| ["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 | Shared identifier for the collaborative content | | ||
| | `k` | Yes | Target event kind (any kind) | | ||
| | `p` | Yes | Owner pubkeys (one or more) | | ||
|
|
||
| The creator's pubkey is implicitly an owner. | ||
|
|
||
| ### Target Events | ||
|
|
||
| Any event kind MAY be a target of collaborative ownership. All target events: | ||
|
|
||
| - MUST include a `d` tag matching the pointer's `d` tag | ||
| - MUST include an `a` tag referencing the `39382` pointer event | ||
|
|
||
| ```jsonc | ||
| { | ||
| "kind": <target-kind>, | ||
| "pubkey": "<owner-pubkey>", | ||
| "tags": [ | ||
| ["d", "<identifier>"], | ||
| ["a", "39382:<pointer-creator-pubkey>:<identifier>"] | ||
| ], | ||
| "content": "..." | ||
| } | ||
| ``` | ||
|
|
||
| ### Resolution Algorithm | ||
|
|
||
| To resolve the current state of collaboratively-owned content: | ||
|
|
||
| 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 | ||
|
|
||
| ### Co-Author Attribution | ||
|
|
||
| Clients SHOULD NOT display co-author attribution for a target event unless: | ||
|
|
||
| 1. The event contains an `a` tag referencing a `39382` pointer event, **and** | ||
| 2. The event's author pubkey appears in that pointer's `p` tags (or is the pointer's creator) | ||
|
|
||
| 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. | ||
|
|
||
| ## Example | ||
|
|
||
| ### Pointer Event | ||
|
|
||
| ```jsonc | ||
| { | ||
| "kind": 39382, | ||
| "pubkey": "alice-pubkey", | ||
| "tags": [ | ||
| ["d", "collaborative-guide"], | ||
| ["k", "30023"], | ||
| ["p", "bob-pubkey"], | ||
| ["p", "carol-pubkey"] | ||
| ], | ||
| "content": "" | ||
| } | ||
| ``` | ||
|
|
||
| ### Target Event (by any owner) | ||
|
|
||
| ```jsonc | ||
| { | ||
| "kind": 30023, | ||
| "pubkey": "bob-pubkey", | ||
| "tags": [ | ||
| ["d", "collaborative-guide"], | ||
| ["title", "A Collaborative Guide"], | ||
| ["a", "39382:alice-pubkey:collaborative-guide"] | ||
| ], | ||
| "content": "..." | ||
| } | ||
| ``` | ||
|
|
||
| ### Client Resolution | ||
|
|
||
| 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}` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be indexed, right? Couldn't we just use an
ownersas a thag name?That would avoid confusion with the
atag usage in other kinds.