Optional
dataOptional
jwtOptional
error?: unknownOptional
message?: stringOptional
params?: objectOptional
sdkRetrieves the data object for a Topia ecosystem. Requires canUpdateEcosystemDataObjects permission to be set to true for the public key.
const dataObject = await ecosystem.fetchDataObject("exampleAppPublicKey", "exampleAppPublicKeyJWT");
Optional
appPublicKey: stringOptional
appJWT: stringIncrements a specific value in the data object for a Topia ecosystem by the amount specified. Must have valid interactive credentials from a visitor in the world.
Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
await ecosystem.incrementDataObjectValue("key", 1, {
sharedAppPublicKey: "exampleAppPublicKey",
sharedAppJWT: "exampleAppPublicKeyJWT",}
});
Optional
analytics?: AnalyticType[]Optional
appJWT?: stringOptional
appOptional
lock?: { Optional
releaseOptional
sharedOptional
sharedSets the data object for a Topia ecosystem.
Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
await ecosystem.setDataObject({ "exampleKey": "exampleValue" }, {
sharedAppPublicKey: "exampleAppPublicKey",
sharedAppJWT: "exampleAppPublicKeyJWT",}
});
Optional
analytics?: AnalyticType[]Optional
appJWT?: stringOptional
appOptional
lock?: { Optional
releaseOptional
sharedOptional
sharedUpdates the data object for a Topia ecosystem.
Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
await ecosystem.updateDataObject({ "exampleKey": "exampleValue" }, {
sharedAppPublicKey: "exampleAppPublicKey",
sharedAppJWT: "exampleAppPublicKeyJWT",}
});
Optional
analytics?: AnalyticType[]Optional
appJWT?: stringOptional
appOptional
lock?: { Optional
releaseOptional
sharedOptional
shared
Summary
Create an instance of Ecosystem class with optional session credentials
Usage