ProviderState platform.provider-state@1

Generated at from openvibe-contracts v0.79.0 and openvibe-sdk v0.25.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-034
Schema
https://openvibe.network/contracts/platform/provider-state.v1.json

A provider's usage against its allowances this billing period and its forecast, used to compute marginal cost (roadmap WS-Z3 task 5).

Fields

FieldTypeRequiredDescriptionConstraints
providerstringyes
period_startstringyes
  • format date-time
period_endstringyes
  • format date-time
usageobjectyesused units per rate-card metric
forecastobjectprojected units at period end
reserveobjectshare of each free allowance kept for higher-priority classes
healthenum
  • one of "up", "degraded", "down"
updated_atstringyes
  • format date-time

Examples

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

Valid: mid-month
{
  "provider": "example-queues",
  "period_start": "2026-09-01T00:00:00Z",
  "period_end": "2026-10-01T00:00:00Z",
  "usage": {
    "queue-operation-64kb": 430000
  },
  "forecast": {
    "queue-operation-64kb": 1930000
  },
  "reserve": {
    "queue-operation-64kb": 0.2
  },
  "health": "up",
  "updated_at": "2026-09-28T23:00:00Z"
}
Rejected: no-usage
{
  "provider": "p",
  "period_start": "2026-09-28T23:00:00Z",
  "period_end": "2026-09-28T23:00:00Z",
  "updated_at": "2026-09-28T23:00:00Z"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('platform.provider-state@1', value);   // { valid, errors: [{ path, message }] }