InventoryStore inventory.store@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
inventory
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/inventory/store.v1.json

Universal wallet: inventory.store. Personal bearer reads and purchases; server-side reviewed prices.

Fields

FieldTypeRequiredDescriptionConstraints
itemsarray of objectyes
  • maxItems 200
  • items: no other fields
items[].idstringyes
  • pattern ^itd_[0-9A-HJKMNP-TV-Z]{26}$
items[].namestringyes
items[].descriptionstringyes
items[].issuerstringyes
items[].pricesobjectyes
  • no other fields
items[].prices.vibesinteger
  • minimum 1
  • maximum 9007199254740991
items[].prices.coinsinteger
  • minimum 1
  • maximum 9007199254740991
items[].previewobjectyes
  • no other fields
items[].preview.emojistring
  • maxLength 64
items[].preview.tokenstring
  • maxLength 120
items[].preview.media_idstring
  • pattern ^med_[0-9A-HJKMNP-TV-Z]{26}$
items[].kindstringyes
items[].slotsarray of stringyes
items[].surfacesarray of objectyes
  • items: no other fields
items[].surfaces[].surfacestringyes
items[].surfaces[].rendererstring
items[].ownedbooleanyes
items[].availablebooleanyes

Examples

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

Valid: example
{
  "items": [
    {
      "id": "itd_00000000000000000000000001",
      "name": "Rainbow",
      "description": "Name effect",
      "issuer": "service:live",
      "prices": {
        "vibes": 50,
        "coins": 250
      },
      "preview": {
        "token": "name-fx-rainbow"
      },
      "kind": "live.name_effect",
      "slots": [
        "name_effect"
      ],
      "surfaces": [
        {
          "surface": "chat",
          "renderer": "live.name_effect.css@1"
        }
      ],
      "owned": false,
      "available": true
    }
  ]
}
Rejected: missing
{}

Validate

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