InventoryList inventory.inventory@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/inventory.v1.json

A person's inventory page: their instances, newest first, with the definitions they refer to. The public read shows only owned instances of published definitions; the person's own read (inventory.item.list) also shows consumed and revoked ones.

Fields

FieldTypeRequiredDescriptionConstraints
subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
instancesinventory.instanceyes
  • maxItems 500
definitionsobjectyes
next_cursorstring | nullyes
  • maxLength 200

Examples

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

Valid: empty
{
  "subject": "usr_01JZ0000000000000000000BBB",
  "instances": [],
  "definitions": {},
  "next_cursor": null
}
Valid: one
{
  "subject": "usr_01JZ0000000000000000000AAA",
  "instances": [
    {
      "id": "inv_01JZ00000000000000000001NV",
      "definition_id": "itd_01JZ00000000000000000001TD",
      "owner": "usr_01JZ0000000000000000000AAA",
      "origin": "migrated",
      "state": "owned",
      "acquired_at": "2026-10-09T03:00:00Z"
    }
  ],
  "definitions": {
    "itd_01JZ00000000000000000001TD": {
      "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"
    }
  },
  "next_cursor": null
}
Rejected: bad-definition-key
{
  "subject": "usr_01JZ0000000000000000000AAA",
  "instances": [],
  "definitions": {
    "fx_rainbow": {
      "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"
    }
  },
  "next_cursor": null
}
Rejected: no-cursor
{
  "subject": "usr_01JZ0000000000000000000AAA",
  "instances": [],
  "definitions": {}
}

Validate

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