import { Filter as CoreFilter } from "nostr-tools"; import { NostrEvent } from "./event.js"; export declare const INDEXABLE_TAGS: Set; export declare const EventIndexableTagsSymbol: unique symbol; /** Returns a Set of tag names and values that are indexable */ export declare function getIndexableTags(event: NostrEvent): Set; /** * Extended Filter type that supports NIP-91 AND operator and NIP-50 search filter field */ export type Filter = CoreFilter & { /** NIP-91 AND operator support */ [key: `&${string}`]: string[] | undefined; /** NIP-50 search filter field */ search?: string; }; /** * Copied from nostr-tools and modified to use {@link getIndexableTags} * Extended to support NIP-91 AND operator with `&` prefix * @see https://github.com/nbd-wtf/nostr-tools/blob/a61cde77eacc9518001f11d7f67f1a50ae05fd80/filter.ts */ export declare function matchFilter(filter: Filter, event: NostrEvent): boolean; /** Copied from nostr-tools and modified to use {@link matchFilter} */ export declare function matchFilters(filters: Filter[], event: NostrEvent): boolean; /** Copied from nostr-tools and modified to support undefined values and NIP-91 AND operator */ export declare function mergeFilters(...filters: Filter[]): Filter; /** Check if two filters are equal */ export declare function isFilterEqual(a: Filter | Filter[], b: Filter | Filter[]): boolean;