@waku/sdk
Version:
A unified SDK for easy creation and management of js-waku nodes.
16 lines (15 loc) • 705 B
TypeScript
import type { Callback, IDecodedMessage, IDecoder, IFilter } from "@waku/interfaces";
import { FilterConstructorParams } from "./types.js";
export declare class Filter implements IFilter {
private readonly protocol;
private readonly peerManager;
private readonly config;
private subscriptions;
constructor(params: FilterConstructorParams);
get multicodec(): string;
unsubscribeAll(): void;
subscribe<T extends IDecodedMessage>(decoder: IDecoder<T> | IDecoder<T>[], callback: Callback<T>): Promise<boolean>;
unsubscribe<T extends IDecodedMessage>(decoder: IDecoder<T> | IDecoder<T>[]): Promise<boolean>;
private onIncomingMessage;
private throwIfTopicNotSame;
}