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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
code | string | yes | The one-time pairing code, eight Crockford base32 characters in two groups (XXXX-XXXX). |
|
pairing_id | string | The pairing's id, as the install command carries it. Absent when the authority behind it does not name one. |
| |
expires_at | string | yes | When the code stops working. |
|
installer | string | yes | The command the owner runs on the machine (openvibe.link/install, with the network, the pairing id and the code). |
|
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 }] }