GamesScriptStorageResult games.script-storage-result@1

Generated at from openvibe-contracts v0.143.0 and openvibe-sdk v0.44.0.

Version
1.0.0
Owner
games
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/games/script-storage-result.v1.json

games.script-storage-result@1: a stored value (null when absent), the keys under a prefix, or an acknowledgement of a set or delete.

Fields

FieldTypeRequiredDescriptionConstraints
valueany
keysarray of string
okboolean

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: keys
{
  "keys": [
    "score:a",
    "score:b"
  ]
}
Valid: value
{
  "value": 3
}
Rejected: extra
{
  "value": 1,
  "other": true
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('games.script-storage-result@1', value);   // { valid, errors: [{ path, message }] }