2024-01-15 16:12:01 -08:00
|
|
|
import type { PeerId } from "@libp2p/interface";
|
2023-12-05 19:26:52 +05:30
|
|
|
|
2025-07-11 12:55:02 +10:00
|
|
|
import { ThisOrThat } from "./misc.js";
|
|
|
|
|
import type { ClusterId, ShardInfo } from "./sharding.js";
|
2024-03-12 16:40:08 +05:30
|
|
|
|
2024-05-09 16:51:08 +05:30
|
|
|
export type MetadataQueryResult = ThisOrThat<"shardInfo", ShardInfo>;
|
2023-12-05 19:26:52 +05:30
|
|
|
|
2025-06-20 12:53:42 +02:00
|
|
|
export interface IMetadata {
|
|
|
|
|
readonly multicodec: string;
|
2025-07-11 12:55:02 +10:00
|
|
|
readonly clusterId: ClusterId;
|
2024-05-09 16:51:08 +05:30
|
|
|
confirmOrAttemptHandshake(peerId: PeerId): Promise<MetadataQueryResult>;
|
|
|
|
|
query(peerId: PeerId): Promise<MetadataQueryResult>;
|
2023-12-05 19:26:52 +05:30
|
|
|
}
|