NetworkLevelAward network.level-award@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- internal
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/network/level-award.v1.json
NetworkLevelAward: one earned platform level owned by Network; experience is never bought or spent.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
subject | string | yes |
| |
reason | enum | yes |
| |
amount | integer | yes |
| |
idempotency_key | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNP1",
"reason": "quest.completed",
"amount": 25,
"idempotency_key": "completion:1"
}Rejected: example
{}Validate
const contracts = require('openvibe-contracts');
contracts.validate('network.level-award@1', value); // { valid, errors: [{ path, message }] }