NetworkMachinePairing network.machine-pairing@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/network/machine-pairing.v1.json

network.machine-pairing@1: a one-time code that pairs a machine with the person's account (POST /api/v1/machines/pairings, capability machines.manage). The code is shown once, expires, and works once: the machine redeems it and becomes the person's. The command is what the owner runs on the machine (openvibe.link/install). The code is never stored in the clear and never returned again.

Fields

FieldTypeRequiredDescriptionConstraints
codestringyesThe one-time pairing code, eight Crockford base32 characters in two groups (XXXX-XXXX).
  • pattern ^[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}$
pairing_idstringThe pairing's id, as the install command carries it. Absent when the authority behind it does not name one.
  • pattern ^pair_[0-9A-HJKMNP-TV-Z]{26}$
expires_atstringyesWhen the code stops working.
  • format date-time
installerstringyesThe command the owner runs on the machine (openvibe.link/install, with the network, the pairing id and the code).
  • maxLength 500

Examples

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

Valid: code
{
  "code": "ABCD-1234",
  "pairing_id": "pair_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "expires_at": "2026-10-31T09:00:00.000Z",
  "installer": "curl -fsSL https://openvibe.link/install | sh -s -- --network https://openvibe.network --pairing pair_01JAB2C3D4E5F6G7H8J9K0MNPS --code ABCD-1234"
}
Rejected: bad-code
{
  "code": "abcd1234",
  "expires_at": "2026-10-31T09:00:00.000Z",
  "installer": "x"
}
Rejected: missing-installer
{
  "code": "ABCD-1234",
  "expires_at": "2026-10-31T09:00:00.000Z"
}

Validate

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