mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-01-22 01:43:07 +00:00
- remove extend Relay by GossipSub and use it as public property; - detach GossipSub initialisation;
14 lines
422 B
TypeScript
14 lines
422 B
TypeScript
import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
|
|
import type { PeerIdStr, TopicStr } from "@chainsafe/libp2p-gossipsub/types";
|
|
|
|
import { IReceiver } from "./receiver.js";
|
|
import type { ISender } from "./sender.js";
|
|
|
|
interface IRelayAPI {
|
|
readonly gossipSub: GossipSub;
|
|
start: () => Promise<void>;
|
|
getMeshPeers: (topic?: TopicStr) => PeerIdStr[];
|
|
}
|
|
|
|
export type IRelay = IRelayAPI & ISender & IReceiver;
|