Skip to main content

sdk.openformatsdk.setstarid

Home > @openformat/sdk > OpenFormatSDK > setStarId

OpenFormatSDK.setStarId() method

Updates the appId of the OpenFormatSDK instance and reinstantiates the App, Reward, Factory, and Subgraph objects with the new appId.

Signature:

setStarId(starId: string): void;

Parameters

ParameterTypeDescription
starIdstring

Returns:

void

Remarks

This function does not retain any states from the previous App, Reward, Factory, or Subgraph instances. Use with caution as this may lead to loss of previous states.

Example

const sdk = new OpenFormatSDK(sdkOptions); sdk.setAppId('newAppId');