diff --git a/29.md b/29.md new file mode 100644 index 00000000..558dba0a --- /dev/null +++ b/29.md @@ -0,0 +1,64 @@ +NIP-29 +====== + +Shared Event Ownership Through Trusted DVMs +------------------------------------------- + +`draft` `optional` + +This NIP proposes a standardized way that 2+ pubkeys unilaterally control a single replaceable event. The managing keys choose a trustworthy [DVM](90.md) to own and update the event. Such actions are performed via the usual Job Request and Responses of [DVMs](90.md). + +## Motivation + +Some applications require the ability for several pubkeys to be able to change a single replaceable event. Collaborative document writing tools, for instance, generally allow several users to change the same document. Group metadata events, for instance, must be updated by a set of admins to include and remove people from the group. The current Nostr proposals require sharing a private key between several individuals, which creates potential security issues. + +This NIP creates a simple event changing protocol to be run by DVMs. The private key that controls the event is owned by the DVM. Authorized pubkeys request the DVM to make the changes for them. + +## Access controls + +The DVM will add and update `admin` tags in the replaceable event. Any request coming from a signed admin will be executed. + +```js +{ + ... + "tags": [ + [ "admin", "" ] + ], + ... +} +``` + +Admins can add and remove any other admin. By removing all admins, the sender renders the replaceable event immutable. + +## DVM kinds + +This NIP defines `kind:5003` (Job Request) as a create or update event. The `p` tag points to the DVM that should run the update. The `content` contains a tag `i` with the modified event signed by an admin and `param` as `relays` to tell the DVM where to broadcast this change. + +Before applying the modification, the DVM MUST verify the signature of the stringified event and MUST check if the pubkey is an admin. + +```js +{ + "kind": 5003, + "tags": [ + [ "p", "" ] + ], + "content": nip04_encrypt(JSON.stringify( + [ "i", "", "text" ] + [ "param", "relays", "wss://nos.lol", "wss://nostr.mom" ] + )) +} +``` + +The DVM replies with a `kind:6900` event that MUST `p`-tag all admins and MAY include the modified event in its contents. + +```js +{ + "content": "", + "kind": 6900, + "tags": [ + [ "p", "" ], + [ "p", "" ], + [ "e", "" ] + ] +} +``` \ No newline at end of file