NetworkModPrincipal network.mod-principal@1
Generated at from
openvibe-contracts v0.76.0 and
openvibe-sdk v0.20.1.
- Version
- 1.0.0
- Owner
- network
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-013
- Schema
https://openvibe.network/contracts/network/mod-principal.v1.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 |
| |
mod_id | string | yes |
| |
owner | string | yes | The runtime service that registered it (games). |
|
runtime | string | yes | The manifest's runtime, e.g. games-content@1. |
|
name | string |
| ||
version | string |
| ||
status | enum | yes |
| |
requested | array of string | yes |
| |
approved | array of string | yes |
| |
pending | array of string | yes |
| |
revoked | array of string | yes |
| |
revision | integer | yes |
| |
updated_at | string | yes |
|
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 }] }