Function subscribeToContentTopic

  • Subscribes to new messages for a content topic via callback function. Will create a light node configured for the content topic with default settings if a node is not provided in opts. Assumes node is using autosharding.

    Parameters

    • contentTopic: string
    • callback: Callback<DecodedMessage>

      Called every time a new message is received on the content topic

    • opts: CreateTopicOptions

    Returns Promise<{
        subscription: IFilterSubscription;
        waku: LightNode;
    }>

Generated using TypeDoc