LinkAccessGrant link.access-grant@1

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

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/link/access-grant.v1.json

Approved machine access; null expiration is for same-owner agent or send only.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^[a-z]{3}_[A-Za-z0-9_-]{8,80}$
request_idstring
  • pattern ^[a-z]{3}_[A-Za-z0-9_-]{8,80}$
from_principalstringyes
  • pattern ^lnk_[0-9A-HJKMNP-TV-Z]{26}$
to_principalstringyes
  • pattern ^lnk_[0-9A-HJKMNP-TV-Z]{26}$
scopesarray of enumyes
  • minItems 1
  • unique items
  • items: one of "agent", "send", "screen", "desk", "computer", "worker"
approved_bystringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
created_atstringyes
  • format date-time
expires_atone ofyes
revoked_atone ofyes

Examples

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

Valid: example
{
  "id": "grt_12345678",
  "request_id": "req_12345678",
  "from_principal": "lnk_AAAAAAAAAAAAAAAAAAAAAAAAAA",
  "to_principal": "lnk_BBBBBBBBBBBBBBBBBBBBBBBBBB",
  "scopes": [
    "agent"
  ],
  "approved_by": "usr_BBBBBBBBBBBBBBBBBBBBBBBBBB",
  "created_at": "2026-11-11T00:00:00Z",
  "expires_at": "2026-11-11T01:00:00Z",
  "revoked_at": null
}
Rejected: example
{}

Validate

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