Skip to content

Add event, req, count, and relay commands#1

Merged
kwsantiago merged 6 commits into
mainfrom
feat/network-commands
Jun 13, 2026
Merged

Add event, req, count, and relay commands#1
kwsantiago merged 6 commits into
mainfrom
feat/network-commands

Conversation

@kwsantiago

Copy link
Copy Markdown
Contributor

Builds the client commands on top of libnostr-z 0.3.2.

Commands

  • event <url> --sec <k> [-c content] [-k kind] [--ts unix] [-t name=value] [-p pubkey] - sign and publish an event, print it.
  • req <url> [-k kind] [-a author] [-i id] [-l limit] [-t name=value] - subscribe, print matching events, exit at EOSE.
  • count <url> [filters..] - NIP-45 count of matching events.
  • relay <url> - fetch and print the NIP-11 relay information document.

req and count share filter parsing via parseQuery.

Verified live against wisp

  • event produces valid signed events (id/pubkey/sig/tags) matching nak byte-for-byte.
  • req returns clean event objects; tag filters work.
  • count -k 1 and count -k 1 -t t=... return correct totals.
  • relay returns a byte-identical NIP-11 document to a curl NIP-11 request.

Notes

  • Pinned to libnostr-z v0.3.2 (NIP-45 count + NIP-11 fetch land there).
  • sync (NIP-77) is still stubbed; it lands after the negentropy sync driver is added to libnostr-z.

@kwsantiago kwsantiago merged commit fafd567 into main Jun 13, 2026
2 checks passed
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