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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
provider | string | yes | ||
period_start | string | yes |
| |
period_end | string | yes |
| |
usage | object | yes | used units per rate-card metric | |
forecast | object | projected units at period end | ||
reserve | object | share of each free allowance kept for higher-priority classes | ||
health | enum |
| ||
updated_at | string | yes |
|
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 }] }