---
title: "network.mod-principal@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/network.mod-principal"
updated: null
---

# network.mod-principal@1 · OpenVibe.Services

HTML: [network.mod-principal@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/network.mod-principal)

# NetworkModPrincipal `network.mod-principal@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: network
- Visibility: first-party
- Status: active
- Compatibility: backward
- Decision: [ADR-013](/docs/adr/ADR-013)
- Schema: [`https://openvibe.network/contracts/network/mod-principal.v1.json`](/docs/contracts/network.mod-principal.json)

network.mod-principal@1 (OpenVibe.Network; roadmap WS-M task 3, ADR-013): a mod install's principal, \`mod:<mod\_id>\`. Its grants are the approved subset of the capabilities its manifest requests; the rest are pending (never approved) or revoked. A revoked principal (the install ended) has no approved grants and never gets any again. The owning runtime keeps a copy of \`approved\` for its hot path and follows network.mod.grants\_changed.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `principal` | string | yes |  | - `pattern ^mod:mod_[0-9A-HJKMNP-TV-Z]{26}$` |
| `mod_id` | string | yes |  | - `pattern ^mod_[0-9A-HJKMNP-TV-Z]{26}$` |
| `owner` | string | yes | The runtime service that registered it (games). | - `pattern ^[a-z][a-z0-9-]{1,31}$` |
| `runtime` | string | yes | The manifest's runtime, e.g. games-content@1. | - `maxLength 60` |
| `name` | string |  |  | - `maxLength 120` |
| `version` | string |  |  | - `maxLength 40` |
| `status` | enum | yes |  | - `one of "active", "revoked"` |
| `requested` | array of string | yes |  | - `maxItems 64`<br>- `unique items`<br>- `items: pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$` |
| `approved` | array of string | yes |  | - `maxItems 64`<br>- `unique items`<br>- `items: pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$` |
| `pending` | array of string | yes |  | - `maxItems 64`<br>- `unique items`<br>- `items: pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$` |
| `revoked` | array of string | yes |  | - `maxItems 64`<br>- `unique items`<br>- `items: pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$` |
| `revision` | integer | yes |  | - `minimum 1` |
| `updated_at` | string | yes |  | - `format date-time` |

## Examples

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

 Valid: active

~~~~
{
  "principal": "mod:mod_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "mod_id": "mod_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "owner": "games",
  "runtime": "games-content@1",
  "name": "Lanterns",
  "version": "1.0.0",
  "status": "active",
  "requested": [
    "games.world.announce",
    "games.prop.place"
  ],
  "approved": [
    "games.world.announce"
  ],
  "pending": [
    "games.prop.place"
  ],
  "revoked": [],
  "revision": 1,
  "updated_at": "2026-09-27T23:40:00.000Z"
}
~~~~

Rejected: bad-principal

~~~~
{
  "principal": "app:mod_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "mod_id": "mod_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "owner": "games",
  "runtime": "games-content@1",
  "status": "active",
  "requested": [],
  "approved": [],
  "pending": [],
  "revoked": [],
  "revision": 1,
  "updated_at": "2026-09-27T23:40:00.000Z"
}
~~~~

## Validate

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