NetworkModGrantChange network.mod-grant-change@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-grant-change.v1.json
network.mod-grant-change@1 (OpenVibe.Network; roadmap WS-M task 3, ADR-013): approve or revoke one requested capability of a mod principal, POST /internal/mods/{mod_id}/grants (the owning runtime, mods.grant.manage) or POST /api/admin/mods/{mod_id}/grants (staff.games.manage, with a reason).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
capability | string | yes |
| |
action | enum | yes |
| |
actor | string |
| ||
reason | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: approve
{
"capability": "games.world.announce",
"action": "approve"
}Rejected: grant-all
{
"capability": "*",
"action": "approve"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('network.mod-grant-change@1', value); // { valid, errors: [{ path, message }] }