mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-11 10:13:13 +00:00
This will enable the remove of `Waku` prefix on all protocol implementations, which is redundant due to the context.
19 lines
480 B
TypeScript
19 lines
480 B
TypeScript
import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
|
|
|
|
import type {
|
|
IDecodedMessage,
|
|
IDecoder,
|
|
IEncoder,
|
|
IMessage,
|
|
} from "./message.js";
|
|
import type { Callback, SendResult } from "./protocols.js";
|
|
|
|
export interface IRelay extends GossipSub {
|
|
send: (encoder: IEncoder, message: IMessage) => Promise<SendResult>;
|
|
addObserver: <T extends IDecodedMessage>(
|
|
decoder: IDecoder<T>,
|
|
callback: Callback<T>
|
|
) => () => void;
|
|
getMeshPeers: () => string[];
|
|
}
|