LiveElementStatePayload live.element.state@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- live
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/live.element.state.v1.json
live.element.state v1 (OpenVibe.Live server/elements): an element's own store changed, broadcast to everyone watching through Live's existing events path. Carries the channel's public facts and the same store as ui.element-state@1: the element instance, a revision that grows by one per accepted change, the values themselves and when. It is public state (a counter, a score, a wheel's entries), never the presser's data: a value may not be an object, a markup string or a URL, and the payload carries no account.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
channel | object | yes |
| |
channel.username | string | yes |
| |
channel.display_name | string | yes |
| |
element_id | string | yes |
| |
revision | integer | yes |
| |
values | https://openvibe.network/contracts/ui/element-state.v1.json#/$defs/values | yes | ||
updated_at | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: state
{
"channel": {
"username": "ada",
"display_name": "Ada"
},
"element_id": "el_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"revision": 4,
"values": {
"dances": 3,
"last_presser": "Maticus",
"wheel": [
"a",
"b",
3
],
"lit": true
},
"updated_at": "2026-11-11T20:31:00.000Z"
}Rejected: nested-value
{
"channel": {
"username": "ada",
"display_name": "Ada"
},
"element_id": "el_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"revision": 1,
"values": {
"wheel": {
"entries": [
"a"
]
}
},
"updated_at": "2026-11-11T20:31:00.000Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('live.element.state@1', value); // { valid, errors: [{ path, message }] }