NetworkSetupGrantSaved network.setup-grant-saved@1

Generated at from openvibe-contracts v0.443.0 and openvibe-sdk v0.177.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/network/setup-grant-saved.v1.json

network.setup-grant-saved@1: what a one-time setup grant saved (plan §AB.44): the row and each key's last four characters only, never a value. The grant is spent.

Fields

FieldTypeRequiredDescriptionConstraints
savedconstyes
  • = true
servicestringyes
  • pattern ^[a-z][a-z0-9-]{0,39}$
namespacestringyes
  • pattern ^[a-z][a-z0-9_.-]{0,79}$
keysarray of objectyes
  • minItems 1
  • maxItems 4
  • items: no other fields
keys[].keystringyes
  • pattern ^[a-z][a-z0-9_.-]{0,79}$
keys[].hintstringyes
  • maxLength 8

Examples

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

Valid: saved
{
  "saved": true,
  "service": "ai",
  "namespace": "ai.providers",
  "keys": [
    {
      "key": "deepseek.api_key",
      "hint": "…page"
    }
  ]
}
Rejected: carries-a-value
{
  "saved": true,
  "service": "ai",
  "namespace": "ai.providers",
  "keys": [
    {
      "key": "deepseek.api_key",
      "hint": "…page",
      "value": "pasted-from-the-provider-page"
    }
  ]
}

Validate

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