mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 16:48:50 +00:00
Filter type with optional atributtes
This commit is contained in:
committed by
fiatjaf
parent
c5d2e3b037
commit
b2015c8fe5
14
index.d.ts
vendored
14
index.d.ts
vendored
@@ -32,13 +32,13 @@ declare function signEvent(event: Event, key: PrivKey): Promise<[Uint8Array, num
|
|||||||
|
|
||||||
// filter.js
|
// filter.js
|
||||||
declare type Filter = {
|
declare type Filter = {
|
||||||
ids: string[],
|
ids?: string[],
|
||||||
kinds: EventKind[],
|
kinds?: EventKind[],
|
||||||
authors: string[],
|
authors?: string[],
|
||||||
since: number,
|
since?: number,
|
||||||
until: number,
|
until?: number,
|
||||||
"#e": string[],
|
"#e"?: string[],
|
||||||
"#p": string[],
|
"#p"?: string[],
|
||||||
};
|
};
|
||||||
|
|
||||||
declare function matchFilter(filter: Filter, event: Event): boolean;
|
declare function matchFilter(filter: Filter, event: Event): boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user