mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-02 22:03:07 +00:00
* feat: deprecate named sharding & protocols adhere simplify network config type, all protocols use pubsub topic internally * chore: update tests * tests: rm application info * chore: use static sharding and auto sharding terminologies * chore: update docs for network config * chore: update interfaces * tests: update tests error message * chore: remove `ShardingParams` type and fix test
15 lines
609 B
TypeScript
15 lines
609 B
TypeScript
import type { PeerId } from "@libp2p/interface";
|
|
|
|
import { PubsubTopic, ThisOrThat } from "./misc.js";
|
|
import type { IBaseProtocolCore } from "./protocols.js";
|
|
import type { ShardInfo } from "./sharding.js";
|
|
|
|
export type MetadataQueryResult = ThisOrThat<"shardInfo", ShardInfo>;
|
|
|
|
// IMetadata always has shardInfo defined while it is optionally undefined in IBaseProtocol
|
|
export interface IMetadata extends Omit<IBaseProtocolCore, "shardInfo"> {
|
|
pubsubTopics: PubsubTopic[];
|
|
confirmOrAttemptHandshake(peerId: PeerId): Promise<MetadataQueryResult>;
|
|
query(peerId: PeerId): Promise<MetadataQueryResult>;
|
|
}
|