Execute a one-shot query with multiple filters via the HTTP bridge. Each filter is ORed by the relay (standard Nostr REQ behavior).
(&self, filters: &[serde_json::Value])
| 211 | /// Execute a one-shot query with multiple filters via the HTTP bridge. |
| 212 | /// Each filter is ORed by the relay (standard Nostr REQ behavior). |
| 213 | pub async fn query_multi(&self, filters: &[serde_json::Value]) -> Result<String, CliError> { |
| 214 | let url = format!("{}/query", self.relay_url); |
| 215 | let body_bytes = serde_json::to_vec(filters) |
| 216 | .map_err(|e| CliError::Other(format!("filter serialization failed: {e}")))?; |
| 217 | let auth = sign_nip98(&self.keys, "POST", &url, Some(&body_bytes))?; |
| 218 | let req = self |
| 219 | .http |
| 220 | .post(&url) |
| 221 | .header("Authorization", &auth) |
| 222 | .header("Content-Type", "application/json") |
| 223 | .body(body_bytes); |
| 224 | let resp = self.with_auth_tag(req).send().await?; |
| 225 | self.handle_response(resp).await |
| 226 | } |
| 227 | |
| 228 | /// Execute a one-shot count via the HTTP bridge. |
| 229 | /// Returns the count as a JSON string. |
no test coverage detected