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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
items | array of object | yes |
| |
items[].id | string | yes |
| |
items[].name | string | yes | ||
items[].description | string | yes | ||
items[].issuer | string | yes | ||
items[].prices | object | yes |
| |
items[].prices.vibes | integer |
| ||
items[].prices.coins | integer |
| ||
items[].preview | object | yes |
| |
items[].preview.emoji | string |
| ||
items[].preview.token | string |
| ||
items[].preview.media_id | string |
| ||
items[].kind | string | yes | ||
items[].slots | array of string | yes | ||
items[].surfaces | array of object | yes |
| |
items[].surfaces[].surface | string | yes | ||
items[].surfaces[].renderer | string | |||
items[].owned | boolean | yes | ||
items[].available | boolean | yes |
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 }] }