Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish the implementation of NIP-01 #21

Open
ariard opened this issue Jul 6, 2023 · 0 comments
Open

Finish the implementation of NIP-01 #21

ariard opened this issue Jul 6, 2023 · 0 comments
Milestone

Comments

@ariard
Copy link
Contributor

ariard commented Jul 6, 2023

Our implementation of NIP-01 is not very complete, the following list of items is missing (at least).

Filtering is only implemented to match on kind in filter_events (in src/clienthandler.rs), spec says “at least one of the array’s values must match the relevant field in an event for the condition itself to be considered a match” so we should match all filter attributes (ids, authors, kinds, #e, #p, since, until).

The spec says “all conditions of a filter that are specified must match for an event for it to pass the filter, i.e., multiple conditions are interpreted as && conditions”, so when we parse an Event against Filter the event should satisfy the concatenation of all the attributes.

We do not enforce the limit property, this can be done at reception of ClientMessage::Req though here we might need a notion of a store first, see "TODO: replay stored events when there is a store”

There is no implementation of metadata assigned to our NostrClient (in src/clienthandler.rs) as a result of calling setmetadata in the sample.

There is no implementation of recommendation assigned to our NostrClient (in src/clienthandler.rs) as a result of calling recommendserver in the sample.

Our opensubscription command in the sample do not take as argument all the filter attributes (ids, authors, kinds, #e, #p, since, until), neither can accept an array of filters.

Can be splitted in multiple PRs as some of the items might be buffy.

@ariard ariard added this to the v0.0.2 milestone Jul 12, 2023
@ariard ariard modified the milestones: v0.0.2, v0.0.3 Dec 13, 2023
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

No branches or pull requests

1 participant