Skip to content

Storage

Melvin Carvalho edited this page Sep 19, 2023 · 1 revision

NIP-XXXX

NosDAV - Distributed Storage for Nostr

draft optional author:yourname

This NIP introduces a method to use NosDAV for distributed storage on the Nostr network. It is designed to enhance data availability and improve interoperability by linking domain-specific data with unique Nostr public keys.

Overview:

NosDAV is envisioned as the de-facto storage mechanism that allows Nostr users to associate domain-specific data with their unique public keys. This proposal focuses on the storage navigation and user interface for NosDAV.

For instance:

  • Public key examplepubkey1234567890.nostr could be linked to a specific data storage on nosdav.com.

This provides a decentralized way for users to store and retrieve data associated with their Nostr public keys, benefiting from the security and decentralization of the Nostr network.

Nostr Event

A kind 3XXXX event is proposed.

The content would be primarily focused on storage details. Initially, the d tag will be empty, but it is reserved for future use.

Mandatory tags for this event:

  • u - This tag represents the root storage URI. It does not contain a path, and clients should exclude paths from the u tag's origin.
  • d - Reserved for future use and should remain an empty string.
  • Additional tags can specify labels for each storage type or other metadata.

Example event:

{
    "id": "exampleid1234567890",
    "pubkey": "examplepubkey1234567890",
    "content": "Storage related details",
    "kind": 3XXXX,
    "created_at": 1682327852,
    "tags": [
        ["u", "http://nosdav.com/storage-root"],
        ["d", ""]
    ],
    "sig": "exampleSignature"
}

Users and services can retrieve the domain-specific data by looking up the Nostr event with kind 3XXXX and accessing the storage details in the content.

Design Considerations

The design for NosDAV storage should facilitate easy navigation (NAV) and an intuitive user interface (UI). The events should be replaceable to allow updates to storage details.

Implementation

To fetch a Nostr domain's data, query the public key with kind 3XXXX and use the content field's specified storage details. Lookup services might opt to fall back to a profile webpage or other origins if needed.

Use Case

NosDAV storage can serve a wide variety of applications, from personal data lockers to decentralized app data storage. Users can verify a domain's authenticity linked to a specific Nostr public key and access its associated storage.

Related Work

  • DNSTR: Domain Name Mapping for Nostr Public Keys
  • Other relevant NIPs and external links.

Note: Please replace yourname with the actual author's name and 3XXXX with the appropriate event kind number once decided. This is a draft proposal, and further details and revisions might be needed based on actual requirements and feedback.

Clone this wiki locally