WatchObservationRecordedPayload watch.observation.recorded@1

Generated at from openvibe-contracts v0.107.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
watch
Visibility
first-party
Status
planned
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/watch.observation.recorded.v1.json

watch.observation.recorded v1 (OpenVibe.Watch, plan T18): a check recorded an observation for a watch. It carries the extracted value as the source stated it and its hash, never the raw body. Envelope: subject { type: watch, id: <watch_id> }, visibility internal, priority low, actor service:watch. Watch's own records are the full observation (watch.observation@1); this event is the notification that one exists.

Fields

FieldTypeRequiredDescriptionConstraints
watch_idstringyes
  • pattern ^wch_[0-9A-HJKMNP-TV-Z]{26}$
ownerstringyesThe watch owner's subject id: who this observation is for.
  • pattern ^(usr|agt)_[0-9A-HJKMNP-TV-Z]{26}$
observed_atstringyes
  • format date-time
valueanyyesThe extracted value as the source stated it; null when it stated none.
value_hashstringyesSHA-256 hex of the canonical value.
  • pattern ^[0-9a-f]{64}$
changedbooleanyes
condition_metbooleanyes

Examples

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

Valid: price-changed
{
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "owner": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "observed_at": "2026-10-05T09:00:00.000Z",
  "value": 189.99,
  "value_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "changed": true,
  "condition_met": true
}
Rejected: missing-owner
{
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "observed_at": "2026-10-05T09:00:00.000Z",
  "value": 189.99,
  "value_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "changed": true,
  "condition_met": true
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('watch.observation.recorded@1', value);   // { valid, errors: [{ path, message }] }