Skip to content

NAP domain reference ​

A NAP (Nostr Applet Protocol) is one capability contract between a napplet and its runtime — what the runtime provides (relay access, storage, intents, …) and exactly how a napplet asks for it. On the web, NIP-5D binds each NAP to a message domain: a NAP named foo owns all foo.* JSON envelope messages, their payload shapes, and the expected shell behavior. NAP contracts are proposed and maintained in the NAPs track.

This reference is non-normative. Every domain page defers to its living proposal in the NAPs track, which governs protocol behavior.

The protocol is modular by design. A NAP must be independently implementable, and shells may support any subset of NAPs. That's why napplets feature-gate with injected domain property presence before using a domain and degrade gracefully when it's absent — see Core concepts.

Domains by purpose ​

Each domain has its own page with its purpose, a minimal example, and its implementation maturity. Examples assume the runtime injected window.napplet before napplet code ran; the same calls are also importable as named helpers from @napplet/sdk, and each domain ships as a subpath of @napplet/nap (barrel / types / shim / sdk).

Runtime and environment ​

DomainPurposeMaturity
shellOptional environment snapshot, readiness, and domain presence checks.supported
themeRead-only shell theme — colors, fonts, background, and live updates.supported
configSchema-driven per-napplet settings rendered and persisted by the shell.exploratory
keysNamed actions and keyboard bindings owned by the shell.experimental
notifyShell-rendered notifications, badges, and action callbacks.experimental
mediaMedia sessions with shell-side playback controls.supported
linkUser-visible external link opening under shell policy.supported

Identity and social ​

DomainPurposeMaturity
identityRead-only user queries — pubkey, profile, follows. Never signs.supported
commonCommon social actions — follows, reactions, reports, NIP-19 helpers.experimental
listsNIP-51 list add/remove with runtime-owned signing and encryption.experimental
dmDirect-message conversations, history, and sending via the runtime.experimental

Nostr events and relays ​

DomainPurposeMaturity
outboxOutbox-aware reads and publishes — the default event boundary.supported
relayLow-level relay proxy for explicit relay-local behavior.supported
countAggregate counts for NIP-01 filters.experimental

Napplet to napplet ​

DomainPurposeMaturity
incTopic-based publish/subscribe between running napplets.supported
intentURI-addressed intents routed to a handler napplet.supported

Data, files, and network ​

DomainPurposeMaturity
storageScoped key-value storage isolated per napplet.supported
fsVirtual filesystem — pickers, reads, writes, and change events.experimental
resourceSandboxed byte fetching over https, blossom, nostr, and data URIs.supported
uploadFile and blob upload over NIP-96 and Blossom rails.supported
cvmContextVM bridge — MCP tools and resources over Nostr.experimental

Devices and realtime ​

DomainPurposeMaturity
gamepadFocus-scoped controller snapshots.supported
bleBluetooth LE / GATT sessions with opaque session ids.experimental
serialUser-approved serial port sessions.experimental
webrtcRuntime-owned WebRTC sessions carrying application payloads.experimental

AI ​

DomainPurposeMaturity
llmUser-selected language model inference through the runtime.exploratory

Implementation maturity ​

These release-time labels describe our shipped implementation, separately from upstream proposal status. Supported does not mean frozen; experimental does not waive conformance requirements. All capabilities remain subject to change. See maturity and opt-in policy.

DomainImplementation maturityProposal statusAssessment
shellsupportedmergedOptional readiness and environment binding has focused shim and reference-runtime coverage.
relaysupportedin-reviewRelay reads, publishing, and subscription lifecycle have maintained shim and integration tests; upstream naming remains under review.
identitysupportedmergedRead-only identity queries and updates have focused binding and reference-runtime coverage.
storagesupportedin-reviewKey-value binding has focused request/result tests and tutorial usage; host storage isolation remains the host responsibility.
incsupportedmergedTopic and channel bindings have compatibility tests and authenticated-endpoint reference-runtime coverage.
themesupportedmergedTheme queries and pushed updates have focused binding and opaque-iframe integration coverage.
keysexperimentalin-reviewKeyboard binding ships, but dedicated domain regression coverage is limited; retain explicit evaluation opt-in.
mediasupportedin-reviewSession creation and playback binding have focused regression coverage; proposed torrent playback amendments are not implied.
notifyexperimentalin-reviewNotification binding ships with limited dedicated domain regression evidence; broader host integration confidence is unverified.
configexploratorydraftConfiguration binding is tested, but the upstream draft is marked MAY DEFER; use for design exploration.
resourcesupportedin-reviewResource fetching has focused shim and type tests; the reverted merge and reopened proposal do not change that implementation assessment.
cvmexperimentalin-reviewSession and registry bindings are tested; upstream explicitly marks the contract NEEDS WORK.
outboxsupportedin-reviewRouting and subscription bindings have focused tests and an integration regression for structured-clone boundaries.
uploadsupportedin-reviewUpload binding has focused tests for request/result behavior; host rail support remains runtime-specific.
intentsupportedmergedConvention normalization and dispatch have focused binding and reference-runtime integration tests.
bleexperimentalin-reviewGATT binding has unit coverage; real-device behavior across host backends is not established by these tests.
webrtcexperimentalin-reviewSignaling and session binding have unit coverage; interoperable live peer sessions remain unverified here.
linksupportedin-reviewThe small link-opening binding has focused regression coverage; navigation authorization stays with the host.
countexperimentalin-reviewCount binding is tested, but accuracy and aggregation across real relay backends remain outside that evidence.
listsexperimentalin-reviewList mutation binding is tested; concurrent real-host mutation behavior is not established by binding tests.
serialexperimentalin-reviewSerial binding has unit coverage; device and native-host integration evidence is limited.
fsexperimentalin-reviewFilesystem binding has MVP coverage; portability and authorization across storage backends remain under evaluation.
commonexperimentalin-reviewSocial action binding is tested; broader host integration and evolving action semantics warrant explicit opt-in.
dmexperimentaldraftDirect-message binding has shim and type coverage; transport interoperability is not established by those tests.
gamepadsupportedin-reviewCross-repository delivery includes binding, security, runtime, and conformance verification; the reopened proposal is still subject to change.
llmexploratorydraftEarly published draft has binding and mock-runtime tests; provider behavior and API design remain exploratory.

Core domain union ​

@napplet/core exports a NapDomain string union for the foundational domains — shell, relay, identity, storage, inc, theme, keys, media, notify, config, resource, cvm, outbox, upload, intent, ble, webrtc, link, count, lists, serial, fs, common, dm, gamepad, llm — used as the discriminant for envelope routing and domain presence.

Where to go next ​

Released under the MIT License.