LockerKeyChange locker.key-change@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
network
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/locker/key-change.v1.json

locker.key-change@1: a record that a person's locker keys changed, so the share sheet can warn before sharing with a key that is not the one people saw before.

Fields

FieldTypeRequiredDescriptionConstraints
subjectidentity.subject-refyes
reasonenumyes
  • one of "created", "rotated", "restored"
changed_atstringyes
  • format date-time
fingerprintstringyesThe eight words of the new keys, in two groups of four joined by a middle dot.
  • pattern ^[a-z]+ [a-z]+ [a-z]+ [a-z]+ · [a-z]+ [a-z]+ [a-z]+ [a-z]+$
previous_fingerprintstringThe eight words before the change, when there were any.
  • pattern ^[a-z]+ [a-z]+ [a-z]+ [a-z]+ · [a-z]+ [a-z]+ [a-z]+ [a-z]+$

Examples

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

Valid: example
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "reason": "rotated",
  "changed_at": "2026-11-06T00:00:00Z",
  "fingerprint": "amber quiet harbor cedar · mist dawn ember willow",
  "previous_fingerprint": "amber quiet harbor stone · lake fern moss reed"
}
Rejected: reason
{
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "reason": "stolen",
  "changed_at": "2026-11-06T00:00:00Z",
  "fingerprint": "amber quiet harbor cedar · mist dawn ember willow"
}

Validate

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