feat: allow arbitrary tag queries

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.
This commit is contained in:
Greg Heartsfield
2022-01-22 21:29:15 -06:00
parent 8c93ef5bc2
commit 2d28a95ff7
5 changed files with 248 additions and 141 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ secp256k1 = {git = "https://github.com/rust-bitcoin/rust-secp256k1.git", rev = "
serde = { version = "^1.0", features = ["derive"] }
serde_json = {version = "^1.0", features = ["preserve_order"]}
hex = "^0.4"
rusqlite = "^0.26"
rusqlite = { version = "^0.26", features = ["limits"]}
lazy_static = "^1.4"
governor = "^0.4"
nonzero_ext = "^0.3"