mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-07 00:03:07 +00:00
* upgrade libp2p version, partially update protocols, rename to IBaseProtocol * complete transition for protocols * complete transition of connection maanger * finish sdk * complete core * complete relay * complete peer-exchange * complete dns-discovery * add components field to Libp2p interface and use it in core * add type hack for Libp2p creation: * finish waku node test * complete relay test * complete peer exchange * complete dns peer discovery test * add missing dependency to relay * fix new peer store integration * improve initialization of pubsub * add catch for missing peer * update test and remove extra dependency * prevent error throw * fix edge case with peerStore * fix peer exchange * fix protocols used * fix test with another evnet * bump libp2p and interfaces * add missing package * fix peer-exchange problem * prefer libp2p peerDiscovery for integration tests * fix import * increate timeout * return test against Test fleet * remove await for peer:update * increase timeout * add await for peerStore * comment event for testing * fix lint * remove bind * fix stub * decouple to separate test case * move back to explicit build * remove only * do not test event
22 lines
733 B
TypeScript
22 lines
733 B
TypeScript
import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
|
|
import type { Libp2p as BaseLibp2p } from "@libp2p/interface-libp2p";
|
|
import type { Libp2pInit } from "libp2p";
|
|
import type { identifyService } from "libp2p/identify";
|
|
import type { PingService } from "libp2p/ping";
|
|
|
|
export type Libp2pServices = {
|
|
ping: PingService;
|
|
pubsub?: GossipSub;
|
|
identify: ReturnType<ReturnType<typeof identifyService>>;
|
|
};
|
|
|
|
// TODO: Get libp2p to export this.
|
|
export type Libp2pComponents = Parameters<
|
|
Exclude<Libp2pInit["metrics"], undefined>
|
|
>[0];
|
|
|
|
// thought components are not defined on the Libp2p interface they are present on Libp2pNode class
|
|
export type Libp2p = BaseLibp2p<Libp2pServices> & {
|
|
components: Libp2pComponents;
|
|
};
|