riccardobl / nostr-kv

Nostr-KV is an eventually-consistent key-value storage on top of nostr using NIP-78.

Home Page:https://nostr.rblb.it:7778

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NOSTR-KV

Nostr-KV is an eventually-consistent key-value storage on top of nostr using NIP-78.

Overview

Applications connecting to a Nostr-KV instance, provide a list of relays to which they desire to publish data and a key-value pair.

The instance will store the data locally and make it available immediately to other application while propagating the data to the chosen relays.

When a key-value pair is requested, the instance will first see if a compatible event subscription is already opened and if the data is available locally, if not it will sync with the provided relay list and return the most recent value.

Event subscriptions stay open for a while and keep the data in sync with relays. Pairs, relays and subscriptions that are not used for a while will be evicted from the cache.

Key-Value API

TODO

Event Flow API

TODO

Running an instance

docker run  \
-d \
--restart=always \
--name=nostr-kv \
-p 7778:8080 \
-v/srv/nostr-kv/data:/data \
-v/srv/certs:/certs \
ghcr.io/riccardobl/nostr-kv:master

About

Nostr-KV is an eventually-consistent key-value storage on top of nostr using NIP-78.

https://nostr.rblb.it:7778

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 99.4%Language:Dockerfile 0.6%