Block a napp identity entirely (all capabilities denied).
The napp's pubkey
The napp's dTag
The napp's build hash
Check if a napp identity has a specific capability. Returns true for unknown identities (permissive default).
The napp's pubkey
The napp's dTag
The napp's build hash
The capability to check
True if the capability is granted and the napp is not blocked
Clear all ACL entries and remove from localStorage.
Get the external ACL entry for a napp identity.
The napp's pubkey
The napp's dTag
The napp's build hash
The ACL entry, or undefined if no explicit entry exists
Get the state quota for a napp identity.
The napp's pubkey
The napp's dTag
The napp's build hash
The quota in bytes (defaults to DEFAULT_STATE_QUOTA)
Grant a capability to a napp identity.
The napp's pubkey
The napp's dTag
The napp's build hash
The capability to grant
Check if a napp identity is blocked.
The napp's pubkey
The napp's dTag
The napp's build hash
True if the identity is blocked
Load the ACL store from localStorage. Migrates old 3-segment keys to 2-segment format.
Persist the ACL store to localStorage.
Revoke a capability from a napp identity.
The napp's pubkey
The napp's dTag
The napp's build hash
The capability to revoke
Unblock a napp identity.
The napp's pubkey
The napp's dTag
The napp's build hash
Number of active audio sources.
Current version counter (incremented on every change).
Clear all audio sources and reset version counter.
Get the audio source for a window.
The window identifier
The AudioSource, or undefined if not found
Get a snapshot of all audio sources.
A new Map of all active audio sources
Check if a window has a registered audio source.
The window identifier
True if the window has an active audio source
Register a new audio source for a window.
The window identifier
The napplet class/type (e.g., 'music-player')
Human-readable title for the audio source
Unregister an audio source for a window.
The window identifier to remove
Update the state of an audio source (e.g., change title).
The window identifier
Partial update with optional title
Clear all cached entries and remove from localStorage.
Get a cached manifest entry by pubkey and dTag.
The napp's pubkey
The napp's dTag
The cached entry, or undefined if not found
Check if a specific hash is cached for a pubkey/dTag combination.
The napp's pubkey
The napp's dTag
The aggregateHash to check
True if the exact hash matches the cached entry
Load the cache from localStorage.
Persist the cache to localStorage.
Remove a cached entry for a pubkey/dTag and persist.
The napp's pubkey
The napp's dTag
Set (upsert) a manifest cache entry and persist to localStorage.
The manifest entry to cache
Clear all registrations and pending updates.
Clear a pending update for a window.
The window identifier
Get the full entry for a napplet pubkey.
The napplet's pubkey
The full SessionEntry, or undefined if not found
Get a pending update for a window.
The window identifier
The pending update, or undefined if none
Get the pubkey associated with a windowId.
The window identifier
The napplet's pubkey, or undefined if not registered
Get the windowId for a napplet pubkey.
The napplet's pubkey
The windowId, or undefined if not found
Check if a windowId has a registered napplet.
The window identifier
True if the windowId has a registered napplet
Register a napplet entry, mapping windowId to pubkey and vice versa.
The window identifier
The verified napplet session entry from AUTH handshake
Set a pending update for a window (napplet reconnected with different hash).
The window identifier
The pending update details with resolve callback
Unregister a napplet by windowId, removing both mappings.
The window identifier to remove
Clear all registrations.
Get all registered windowId strings.
Array of all registered window identifiers
Get identity metadata for a registered Window.
The Window reference to look up
Identity metadata, or undefined if not registered or no identity set
Look up the Window reference for a given windowId.
The window identifier to look up
The Window reference, or null if not found
Look up the windowId for a given Window reference.
The Window reference (typically from event.source)
The windowId string, or undefined if not registered
Register a window reference with a windowId and optional identity metadata.
The iframe's contentWindow reference
The unique identifier for this napplet window
Optionalidentity: { aggregateHash: string; dTag: string }Optional NIP-5D identity metadata (dTag and aggregateHash)
Unregister a window by its windowId, removing the mapping.
The window identifier to remove
Browser-specific singletons that the adapter bridges to the runtime. These use browser APIs (Window, localStorage, postMessage, CustomEvent) that the runtime cannot access directly.