Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ For more options, see `wisp.toml.example`.

## Features

* NIPs: 1, 2, 9, 11, 13, 16, 33, 40, 42, 45, 50, 65, 70, 77, 86
* NIPs: 1, 2, 9, 11, 13, 16, 33, 40, 42, 45, 50, 51, 65, 70, 77, 86
* LMDB storage (no external database)
* Spider mode for syncing events from external relays
* Import/export to JSONL
* Prometheus metrics at `GET /metrics`

Marmot/MLS compatible: Wisp's generic NIP-16/NIP-33 handling stores and serves
kind 10050 (DM/inbox relays, replaceable), 10051 (KeyPackage relays,
replaceable), 30443 (KeyPackage, addressable) / legacy 443, and 1059 gift
wraps, so Haven, WhiteNoise, and other Marmot clients work without extra setup.
Gift wraps are stored and served like any other event; Wisp does not implement
the NIP-17 recipient-only serving rule, so operators wanting to restrict who can
read kind 1059 should enable AUTH (`auth_required`).

## Monitoring

Operational metrics are exposed in Prometheus format at `GET /metrics` on the
Expand Down
2 changes: 1 addition & 1 deletion src/nip11.zig
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn write(config: *const Config, nip86: *const Nip86Handler, w: anytype) !voi
try writeJsonString(w, contact);
}

try w.writeAll(",\"supported_nips\":[1,2,9,11,13,16,33,40,42,45,50,65,70,77,86]");
try w.writeAll(",\"supported_nips\":[1,2,9,11,13,16,33,40,42,45,50,51,65,70,77,86]");
try w.writeAll(",\"software\":\"https://github.com/privkeyio/wisp\"");
try w.writeAll(",\"version\":\"0.5.12\"");

Expand Down
9 changes: 9 additions & 0 deletions tests/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ chk "NIP-16 replaceable kept single" 1 "$(req -k 0 -a "$PK2")"
chk "NIP-16 replaceable keeps latest" "v2" \
"$(timeout 10 noz req -k 0 -a "$PK2" "$R" 2>/dev/null | grep -o 'v[12]' | head -1)"

# --- NIP-51 DM relays list (kind 10050, NIP-17 inbox) replaceable, latest wins ---
dmbase=$(($(date +%s) - 20))
pub --sec $SEC2 -k 10050 --ts $dmbase -t relay=wss://relay.one -c ""
pub --sec $SEC2 -k 10050 --ts $((dmbase + 1)) -t relay=wss://relay.two -c ""
sleep 0.5
chk "NIP-51 kind 10050 kept single" 1 "$(req -k 10050 -a "$PK2")"
chk "NIP-51 kind 10050 keeps latest" "wss://relay.two" \
"$(timeout 10 noz req -k 10050 -a "$PK2" "$R" 2>/dev/null | grep -oE 'wss://relay\.(one|two)' | head -1)"

# --- NIP-16 ephemeral (kind 20000) not stored ---
pub --sec $SEC1 -k 20000 -c "ephemeral"
sleep 0.5
Expand Down