Skip to content

NUB-IDENTITY: read-only user identity queries#12

Open
dskvr wants to merge 3 commits intomasterfrom
nub-identity
Open

NUB-IDENTITY: read-only user identity queries#12
dskvr wants to merge 3 commits intomasterfrom
nub-identity

Conversation

@dskvr
Copy link
Copy Markdown
Contributor

@dskvr dskvr commented Apr 9, 2026

Namespace: window.napplet.identity
Discovery: window.napplet.shell.supports("identity")
Status: draft

Summary

  • Adds NUB-IDENTITY spec defining 9 read-only identity query methods
  • Domain: identity, Namespace: window.napplet.identity
  • Methods: getPublicKey, getRelays, getProfile, getFollows, getList, getZaps, getMutes, getBlocked, getBadges
  • All queries are strictly read-only, no signing, encryption, or decryption
  • Updates README registry table with NUB-IDENTITY entry

Design rationale

Identity queries replace the read-only subset of NIP-07 functionality. Napplets need to know the user's pubkey, profile, and social graph, but must not have access to signing keys or cryptographic operations. This separation is a security boundary: the shell controls all signing and encryption.

Implementations

  • (none yet)

References

  • NIP-5D: Core napplet protocol

dskvr and others added 3 commits April 9, 2026 16:50
Defines the identity NUB with 9 query methods (getPublicKey, getRelays,
getProfile, getFollows, getList, getZaps, getMutes, getBlocked, getBadges).
All queries are strictly read-only. No signing, encryption, or decryption
is exposed through this interface.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a note paragraph after the ProfileData interface clarifying that
napplets fetch picture and banner bytes via window.napplet.resource.bytes(url)
per NUB-RESOURCE. Napplets cannot use direct <img src=https://...> loads
under the NIP-5D iframe sandbox (sandbox='allow-scripts', no
allow-same-origin); the shell is the sole network-fetch broker.

No wire change, no type change — documentation-only addition. Pre-amendment
napplets that already use resource.bytes(url) for these fields continue to
work; the clarification only documents the existing contract more clearly.

The standard NUB-RESOURCE policy (private-IP block list at DNS-resolution
time, MIME byte-sniffing, optional SVG rasterization) applies — there is no
privileged 'identity bytes' path that bypasses Default Resource Policy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant