mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-14 03:33:11 +00:00
30 lines
616 B
TypeScript
30 lines
616 B
TypeScript
/**
|
|
* Configuration for a Waku network. All nodes in a given network/cluster
|
|
* should have the same configuration.
|
|
*/
|
|
export type NetworkConfig = StaticSharding | AutoSharding;
|
|
|
|
export type ShardInfo = {
|
|
clusterId: ClusterId;
|
|
shards: ShardId[];
|
|
};
|
|
|
|
export type StaticSharding = {
|
|
clusterId: ClusterId;
|
|
};
|
|
export type AutoSharding = {
|
|
clusterId: ClusterId;
|
|
numShardsInCluster: number;
|
|
};
|
|
export type ClusterId = number;
|
|
export type ShardId = number;
|
|
|
|
/**
|
|
* Routing Information for a given message.
|
|
*/
|
|
export interface IRoutingInfo {
|
|
clusterId: ClusterId;
|
|
shardId: ShardId;
|
|
pubsubTopic: string;
|
|
}
|