NSCOPE

NIP-DA · Scoped Data Grants

Revocation isn't a policy. It's a key rotation.

Permissioned private data sharing on nostr. Publish one encrypted record under your own key, hand its key to whoever needs it, and take them out by rotating the key — their copy simply stops opening. No account to close. No company in the middle.

The inversion

Nobody maintains data about anyone else.

Today, your details live in a hundred other people's address books, CRMs, and spreadsheets — N² rotting copies, each stale the moment you move, each a breach waiting to happen, none of them yours to correct. Scoped Data Grants flips it: you keep one authoritative, encrypted record of your own data and grant scoped, revocable access to specific keyholders. Everyone else holds a capability — a pointer plus a decryption right — that always dereferences to your current truth. N self-maintained records instead of N² decaying ones.

The authorization is a signature

You grant access by delivering a key to a grantee's nostr pubkey — gift-wrapped, so relays never learn who granted what to whom. No permission table on anyone's server.

The revocation is a rotation

To cut someone off, you rotate the scope key and re-grant the rest. Their old key opens nothing. Revocation isn't a request you hope a platform honors — it's math.

The mechanism

Four event kinds. Nothing new from relays.

Built entirely on NIP-44 (encrypted payloads) and NIP-59 (gift wrap), over plain NIP-01 addressable events. Relays store only ciphertext and require zero changes.

30440Scoped Data Set

Your encrypted record, addressable and replaceable. Symmetric-encrypted under a scope key. Republish to update — every grantee instantly reads the new version. This is what makes grants live.

440Data Grant

An unsigned rumor that delivers a scope key to one grantee, sealed and gift-wrapped (kind 1059) per NIP-59. Relays see only an ephemeral key handing an opaque payload to a recipient — the grant graph stays private.

441Revocation notice

An optional, gift-wrapped courtesy: tells a revoked party their access ended so their client can mark the data stale. Silent revocation works too — the rotation already did the work.

10440Grant Index

Your private, self-encrypted ledger of grants issued and received. For the publisher it's the record needed to rotate; for the grantee it's the real address book — recoverable from your key alone.

# the whole lifecycle, in the primitive's own terms publish 30440 encrypt your record under a fresh scope key grant 440 gift-wrap that key to each keyholder update 30440 re-encrypt + republish — everyone sees it live revoke 30440 rotate the key, re-grant the rest — the ex-grantee is out recover 10440 rebuild the entire graph from one key on paper
Not a whitepaper

It runs today, on relays you already use.

This isn't a proposal waiting on infrastructure. It's a complete draft with two independent implementations that interoperate live on public relays — sharing nothing but the spec.

✓ Zero relay changes ✓ Two implementations — JS + Go ✓ Interop verified on public relays ✓ relay.damus.io · nos.lol · relay.primal.net ✓ Key-rotation revocation ✓ Recoverable from one key

Two engines, one spec

A JavaScript reference library (isomorphic Node/browser) and a Go CLI on go-nostr. Each decrypts the other's scopes, detects the other's rotations, and rebuilds the address book from the other's Grant Index — 5 cross-implementation assertions, live.

Try it in a minute

npm run demo narrates the protocol on an in-memory relay; npm run smoke runs 11 assertions against real public relays; npm run seed plants a throwaway graph and prints a login key. All in the repo.

The proof

A family of apps already stands on it.

The best argument for a primitive is what it carries. Each of these is a pure client — no server, no build step — vendoring the same ~300-line library.

Read it, run it, build on it

Permissioned private data, without the permission-granter.

The spec is complete, the code is public, the interop is proven. What it needs now is your reading, your critique, and your apps.