Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions C1.md
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"]
Copy link
Collaborator

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 owners as a thag name?

That would avoid confusion with the a tag usage in other kinds.

],
"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}`
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-B7: Blossom](B7.md)
- [NIP-BE: Nostr BLE Communications Protocol](BE.md)
- [NIP-C0: Code Snippets](C0.md)
- [NIP-C1: Collaborative Ownership](C1.md)
- [NIP-C7: Chats](C7.md)
- [NIP-EE: E2EE Messaging using MLS Protocol](EE.md) --- **unrecommended**: superseded by the [Marmot Protocol](https://github.com/marmot-protocol/marmot)

Expand Down Expand Up @@ -294,6 +295,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `39000-9` | Group metadata events | [29](29.md) |
| `39089` | Starter packs | [51](51.md) |
| `39092` | Media starter packs | [51](51.md) |
| `39382` | Collaborative Pointer | [C1](C1.md) |
| `39701` | Web bookmarks | [B0](B0.md) |

[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/
Expand Down