This adds a new configurable feature to restrict event publishing to
only users with NIP-05 verified metadata. Domains can be whitelisted
or blacklisted. Verification expiration and schedules are
configurable.
This upgrades the database to add a table for tracking verification
records.
When a large number of subscriptions is created with identical names,
we do not send a signal over the abandon-read channel. This
eventually leads to resource exhaustion.
This is an experimental feature, outside of any NIP, that demonstrates
generic tag queries.
Instead of limiting subscription filters to just querying only "e" or
"p" tags (via `#e` or `#p` attributes), any tag can be queried.
As an example, consider an event which uses a tag "url". With this
modification, a subscription filter could add a top-level field
"#url", with an array of strings as the key. Exact matches would be
returned.
A NIP is forthcoming to formalize this.
* Add custom error variant
This can be useful to propagate errors not conforming to available
variants. Also to convert other errors in `crate::Error` without having
explicit conversion defined, with `error.to_string()`
* Implement `Tag` and define protocol serialization
A Tag structure have been implemented with dedicated field types. Then
custom serde serialization is derived to map the structure to current
protocol json array as per NIP01.
This adds compile and run time type checking to always ensure wrong
string data are never stored or processed. With strict typed fields and
custom serde derivation this checks can be done at time of serialization,
saving work for internal handling of the actual data.
tests for possible data violations are added, and gives good example of
kind of errors it will through for different cases.
* Use String for URL
Change descr to description. Add `id` for websocket URL. Use
integers for supported NIPs instead of strings. Top-level is object,
instead of the array before.
Switched to latest (git) release of secp256k1, which has more
efficient verification-only context for Schnorr. Switched to single
pre-instantiated instance of the verifier.