ReadonlyaclAccess the ACL state container.
ReadonlylegacyExplicit legacy policy adapter, absent unless supplied by the host.
ReadonlymanifestAccess the manifest cache.
Optional ReadonlypermissionsScoped permission management when the host supplies approval adapters.
ReadonlysessionAccess the identity registry (for shell adapter to read napplet session state).
Destroy the runtime, persisting state and clearing all internal state.
Clean up all state associated with a napplet window.
Removes subscriptions, pending state, and notifies service handlers.
Services hear onWindowDestroyed at most once per session registration,
even when sessionRegistry.unregister or a repeated call retires it too.
With the permission runtime the source is retired; without it, a source
that keeps dispatching is live again and its next destroy notifies.
The window to clean up
Return the NAP-INC endpoint identifier of a live registered window.
The identifier is opaque, runtime-assigned on first use, stable until that
registration is replaced or unregistered, and never reused. It is the
sender/peer other napplets see and the only valid inc.channel.open
target. Handing it to another napplet is a host peer selection: do that
only for a peer the host means to make addressable.
Internal window identity of the registered napplet
The endpoint identifier, or undefined without a live endpoint
Handle an incoming NIP-5D NappletMessage envelope from a napplet. The caller is responsible for identifying the source (windowId). Legacy NIP-01 arrays are silently dropped (clean break — no dual-mode).
The identifier of the napplet that sent the message
The raw message (NappletMessage envelopes are processed; other types dropped)
Report whether this runtime currently routes an exact service domain.
The runtime copies RuntimeAdapter.services once at creation, so a handler
added to that object later is not routed until registerService() runs.
Hosts read this before exposing a domain so advertisement cannot outrun
routing.
Exact domain name (e.g., 'webrtc')
true while a handler is registered for the name
Inject a shell-originated event into subscription delivery.
The event topic tag value
The event content
Register a handler for consent requests on destructive signing kinds.
Register a service handler dynamically after runtime creation. If a handler is already registered for this name, it is replaced.
Built-in domains keep their NAP routing. Other domains require the handler's exact messageCapabilities map and an explicit host domain grant. Registration never injects namespace bindings or grants capabilities.
Exact domain name (e.g., 'notify' or a host extension)
The service handler implementation
Unregister a service handler by name. No-op if the name is not registered.
Service name to remove
The napplet protocol engine — handles NIP-5D NAP domain dispatch, ACL enforcement, subscription lifecycle.
Example