Type alias ProtocolCreateOptions

ProtocolCreateOptions: {
    defaultBootstrap?: boolean;
    libp2p?: Partial<CreateLibp2pOptions>;
    shardInfo?: ShardInfo;
    staticNoiseKey?: Uint8Array;
}

Type declaration

  • 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/core!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/core!WakuNode to ensure it implements the Waku protocol.

  • Optional shardInfo?: ShardInfo

    Waku supports usage of multiple pubsub topics. This is achieved through static sharding for now, and auto-sharding in the future. The format to specify a shard is: clusterId: number, shards: number[] To learn more about the sharding specifications implemented, see Relay Sharding. The Pubsub Topic to use. Defaults to @waku/core!DefaultPubsubTopic.

    If no pubsub topic is specified, the default pubsub topic is used. The set of pubsub topics that are used to initialize the Waku node, will need to be used by the protocols as well You cannot currently add or remove pubsub topics after initialization. This is used by:

  • 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