mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-02 13:53:12 +00:00
fix: add stop() to IRelayAPI and IStore interfaces, implement in SDK wrappers
This commit is contained in:
parent
a97e7eceb9
commit
dd1977455d
@ -16,6 +16,7 @@ export interface IRelayAPI {
|
||||
readonly pubsubTopics: Set<PubsubTopic>;
|
||||
readonly gossipSub: GossipSub;
|
||||
start: () => Promise<void>;
|
||||
stop: () => Promise<void>;
|
||||
waitForPeers: () => Promise<void>;
|
||||
getMeshPeers: (topic?: TopicStr) => PeerIdStr[];
|
||||
}
|
||||
|
||||
@ -99,6 +99,7 @@ export type QueryRequestParams = {
|
||||
export type IStore = {
|
||||
readonly multicodec: string;
|
||||
|
||||
stop(): void;
|
||||
createCursor(message: IDecodedMessage): StoreCursor;
|
||||
queryGenerator: <T extends IDecodedMessage>(
|
||||
decoders: IDecoder<T>[],
|
||||
|
||||
@ -65,6 +65,7 @@ export class LightPush implements ILightPush {
|
||||
|
||||
public stop(): void {
|
||||
this.retryManager.stop();
|
||||
this.protocol.stop();
|
||||
}
|
||||
|
||||
public async send(
|
||||
|
||||
@ -46,6 +46,10 @@ export class Store implements IStore {
|
||||
return this.protocol.multicodec;
|
||||
}
|
||||
|
||||
public stop(): void {
|
||||
this.protocol.stop();
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries the Waku Store for historical messages using the provided decoders and options.
|
||||
* Returns an asynchronous generator that yields promises of decoded messages.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user