ProtocolCreateOptions: {
    bootstrapPeers?: string[];
    contentTopics?: string[];
    defaultBootstrap?: boolean;
    libp2p?: Partial<CreateLibp2pOptions>;
    numPeersToUse?: number;
    pubsubTopics?: PubsubTopic[];
    shardInfo?: Partial<ShardingParams>;
    staticNoiseKey?: Uint8Array;
}

Type declaration

  • Optional bootstrapPeers?: string[]

    List of peers to use to bootstrap the node. Ignored if defaultBootstrap is set to true.

  • Optional contentTopics?: string[]

    Content topics are used to determine network in use. See Waku v2 Topic Usage Recommendations for details.

    You cannot add or remove content topics after initialization of the node.

  • Optional defaultBootstrap?: boolean

    Use recommended bootstrap method to discovery and connect to new nodes.

  • Optional libp2p?: Partial<CreateLibp2pOptions>

    You can pass options to the Libp2p instance used by @waku/sdk!WakuNode using the libp2p property. This property is the same type as the one passed to Libp2p.create apart that we made the modules property optional and partial, allowing its omission and letting Waku set good defaults. Notes that some values are overridden by @waku/sdk!WakuNode to ensure it implements the Waku protocol.

  • Optional numPeersToUse?: number

    Number of peers to connect to, for the usage of the protocol. This is used by:

    • Light Push to send messages,
    • Filter to retrieve messages. Defaults to 3.
  • Optional pubsubTopics?: PubsubTopic[]

    Deprecated

    Should be used ONLY if some other than The Waku Network is in use.

    See Waku v2 Topic Usage Recommendations for details.

    This is used by:

    • WakuRelay to receive, route and send messages,
    • WakuLightPush to send messages,
    • WakuStore to retrieve messages.

    If no pubsub topic is specified, the default pubsub topic will be determined from DefaultShardInfo.

    You cannot add or remove pubsub topics after initialization of the node.

  • Optional shardInfo?: Partial<ShardingParams>

    ShardInfo is used to determine which network is in use. Defaults to @waku/interfaces!DefaultShardInfo. Default value is configured for The Waku Network

    The format to specify a shard is: clusterId: number, shards: number[] To learn more about the sharding specification, see Relay Sharding.

  • Optional staticNoiseKey?: Uint8Array

    Byte array used as key for the noise protocol used for connection encryption by Libp2p.create This is only used for test purposes to not run out of entropy during CI runs.

Generated using TypeDoc