Add event, req, count, and relay commands#1
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.reqandcountshare filter parsing viaparseQuery.Verified live against wisp
eventproduces valid signed events (id/pubkey/sig/tags) matching nak byte-for-byte.reqreturns clean event objects; tag filters work.count -k 1andcount -k 1 -t t=...return correct totals.relayreturns a byte-identical NIP-11 document to acurlNIP-11 request.Notes
sync(NIP-77) is still stubbed; it lands after the negentropy sync driver is added to libnostr-z.