InventoryDefinition inventory.definition@1
Generated at from
openvibe-contracts v0.127.0 and
openvibe-sdk v0.37.0.
- Version
- 1.0.0
- Owner
- inventory
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-054
- Schema
https://openvibe.network/contracts/inventory/definition.v1.json
An item definition (ADR-054 §2): one item of a kind, issued by a service, an app or a creator, with an honest rarity, attributes valid against the kind and an optional supply cap. Published definitions can be granted; retired ones cannot, and their instances stay.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
kind | string | yes |
| |
name | string | yes |
| |
description | string |
| ||
art | object | yes |
| |
art.media_id | string | An OpenVibe.Media object (an image, an animation). |
| |
art.token | string | A token the kind's renderers know (a CSS class, a speech preset). |
| |
art.emoji | string |
| ||
rarity | enum | yes | Shown as is; any odds that apply are shown with it, never hidden. |
|
attributes | object | yes | ||
issuer | string | yes |
| |
aliases | array of string | Earlier ids of the same item (Live's fx_rainbow, hat_crown, …). |
| |
supply | object | yes |
| |
supply.cap | integer | null | yes | null: unlimited. |
|
supply.issued | integer | yes |
| |
status | enum | yes |
| |
credit | object | The creator of a community item (ADR-054 §6). |
| |
credit.subject | string |
| ||
credit.name | string |
| ||
created_at | string | yes |
| |
updated_at | string | yes |
| |
published_at | string |
| ||
grantors | array of string | Other services or apps the issuer lets grant this one item (ADR-054 §3): Quest giving Live's hats as quest rewards. They grant only (origin earned or granted, idempotent per key); defining, editing, consuming and revoking stay the issuer's. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: community-capped
{
"id": "itd_01JZ00000000000000000001T2",
"kind": "network.profile_frame",
"name": "Aurora frame",
"description": "Rainbow cycling colors",
"art": {
"media_id": "med_01JZ0000000000000000000MED"
},
"rarity": "rare",
"attributes": {},
"issuer": "user:usr_01JZ0000000000000000000AAA",
"aliases": [],
"supply": {
"cap": 500,
"issued": 12
},
"status": "published",
"created_at": "2026-10-09T03:00:00Z",
"updated_at": "2026-10-09T03:00:00Z",
"published_at": "2026-10-09T03:00:00Z",
"credit": {
"subject": "usr_01JZ0000000000000000000AAA",
"name": "aurora_artist"
}
}Valid: live-name-effect
{
"id": "itd_01JZ00000000000000000001TD",
"kind": "live.name_effect",
"name": "Rainbow Name",
"description": "Rainbow cycling colors",
"art": {
"token": "name-fx-rainbow",
"emoji": "🌈"
},
"rarity": "common",
"attributes": {
"css_class": "name-fx-rainbow"
},
"issuer": "service:live",
"aliases": [
"fx_rainbow"
],
"supply": {
"cap": null,
"issued": 4
},
"status": "published",
"created_at": "2026-10-09T03:00:00Z",
"updated_at": "2026-10-09T03:00:00Z",
"published_at": "2026-10-09T03:00:00Z"
}Rejected: bad-issuer
{
"id": "itd_01JZ00000000000000000001TD",
"kind": "live.name_effect",
"name": "Rainbow Name",
"description": "Rainbow cycling colors",
"art": {
"token": "name-fx-rainbow",
"emoji": "🌈"
},
"rarity": "common",
"attributes": {
"css_class": "name-fx-rainbow"
},
"issuer": "live",
"aliases": [
"fx_rainbow"
],
"supply": {
"cap": null,
"issued": 4
},
"status": "published",
"created_at": "2026-10-09T03:00:00Z",
"updated_at": "2026-10-09T03:00:00Z",
"published_at": "2026-10-09T03:00:00Z"
}Rejected: bad-rarity
{
"id": "itd_01JZ00000000000000000001TD",
"kind": "live.name_effect",
"name": "Rainbow Name",
"description": "Rainbow cycling colors",
"art": {
"token": "name-fx-rainbow",
"emoji": "🌈"
},
"rarity": "mythic",
"attributes": {
"css_class": "name-fx-rainbow"
},
"issuer": "service:live",
"aliases": [
"fx_rainbow"
],
"supply": {
"cap": null,
"issued": 4
},
"status": "published",
"created_at": "2026-10-09T03:00:00Z",
"updated_at": "2026-10-09T03:00:00Z",
"published_at": "2026-10-09T03:00:00Z"
}Rejected: no-art
{
"id": "itd_01JZ00000000000000000001TD",
"kind": "live.name_effect",
"name": "Rainbow Name",
"description": "Rainbow cycling colors",
"art": {},
"rarity": "common",
"attributes": {
"css_class": "name-fx-rainbow"
},
"issuer": "service:live",
"aliases": [
"fx_rainbow"
],
"supply": {
"cap": null,
"issued": 4
},
"status": "published",
"created_at": "2026-10-09T03:00:00Z",
"updated_at": "2026-10-09T03:00:00Z",
"published_at": "2026-10-09T03:00:00Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('inventory.definition@1', value); // { valid, errors: [{ path, message }] }