tupelo-wasm-sdk

Home > tupelo-wasm-sdk > CommunityMessenger > subscribe

CommunityMessenger.subscribe() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Signature:

subscribe(topic: string, subscriber: Function): Promise<unknown>;

Parameters

Parameter Type Description
topic string the community topic to subscribe to
subscriber Function a callback function which will be called with a protobuf instance of Envelope ( the js protobuf object, not the bytes )

Returns:

Promise<unknown>