NetworkFriendAcceptedPayload network.friend.accepted@1

Generated at from openvibe-contracts v0.443.0 and openvibe-sdk v0.177.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/network.friend.accepted.v1.json

network.friend.accepted v1 (plan §AB.51): `from` added `to` back, so the two are friends now. Written to Network's outbox in the transaction that stores the change. Envelope: subject { type: user, id: <to> }, visibility subject, actor <from>.

Fields

FieldTypeRequiredDescriptionConstraints
fromstringyesWho acted.
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
tostringyesThe other person.
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
revisionintegeryesGrows with every change of this pair; apply the latest.
  • minimum 1
  • maximum 9007199254740991
atstring
  • format date-time

Examples

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

Valid: pair
{
  "from": "usr_01K9R2V6M8Q4T0B7C3D5E9F2GH",
  "to": "usr_01K9R2V6M8Q4T0B7C3D5E9F2GJ",
  "revision": 2,
  "at": "2026-11-14T08:00:00Z"
}
Rejected: no-revision
{
  "from": "usr_01K9R2V6M8Q4T0B7C3D5E9F2GH",
  "to": "usr_01K9R2V6M8Q4T0B7C3D5E9F2GJ"
}

Validate

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