2024-01-15 16:12:01 -08:00
|
|
|
import type { PeerId } from "@libp2p/interface";
|
2023-12-05 19:26:52 +05:30
|
|
|
|
|
|
|
|
import type { ShardInfo } from "./enr.js";
|
2024-03-11 18:50:34 +05:30
|
|
|
import type { IBaseProtocolCore, ShardingParams } from "./protocols.js";
|
2023-12-05 19:26:52 +05:30
|
|
|
|
2024-01-19 20:42:52 +05:30
|
|
|
// IMetadata always has shardInfo defined while it is optionally undefined in IBaseProtocol
|
2024-03-11 18:50:34 +05:30
|
|
|
export interface IMetadata extends Omit<IBaseProtocolCore, "shardInfo"> {
|
2024-01-19 20:42:52 +05:30
|
|
|
shardInfo: ShardingParams;
|
|
|
|
|
confirmOrAttemptHandshake(peerId: PeerId): Promise<void>;
|
2023-12-05 19:26:52 +05:30
|
|
|
query(peerId: PeerId): Promise<ShardInfo | undefined>;
|
|
|
|
|
}
|