Skip to content

NUB-STORAGE: Scoped key-value storage#3

Open
dskvr wants to merge 6 commits intomasterfrom
nub-storage
Open

NUB-STORAGE: Scoped key-value storage#3
dskvr wants to merge 6 commits intomasterfrom
nub-storage

Conversation

@dskvr
Copy link
Copy Markdown
Contributor

@dskvr dskvr commented Apr 5, 2026

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

Summary

Async localStorage-like API for sandboxed napplets. Storage is scoped by napplet identity (dTag, aggregateHash) — each napplet type and version has isolated storage.

Wire Protocol

Type Direction Description
storage.get napplet → shell Retrieve value by key
storage.set napplet → shell Store key-value pair
storage.remove napplet → shell Delete a key
storage.keys napplet → shell List all keys
storage.*.result shell → napplet Correlated response for each operation

References

  • NIP-5D: Core napplet protocol

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dskvr dskvr marked this pull request as draft April 5, 2026 21:18
dskvr added 5 commits April 6, 2026 01:35
… format

- Replace kind 29003/IFC_PEER event transport with storage.* typed messages
- Add Wire Protocol section with message type table and JSON examples
- Preserve API surface (getItem/setItem/removeItem/keys) with method->type annotations
- Remove Event Kinds, Response Tags, and Implementations sections
- Shell Behavior uses composite key scoping without exposing internal key format
- Section order: Description, API Surface, Wire Protocol, Shell Behavior, Security Considerations
@dskvr dskvr changed the title NUB-STORAGE: Scoped key-value storage interface NUB-STORAGE: Scoped key-value storage Apr 7, 2026
@dskvr dskvr marked this pull request as ready for review April 9, 2026 09:59
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