InventoryEquipRequest inventory.equip-request@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/equip-request.v1.json
Equip an instance the person owns in one slot of its kind, or clear the slot (instance_id null). One item per slot; equipping replaces what was there.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
kind | string | yes |
| |
slot | string | yes |
| |
instance_id | string | null | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: clear
{
"kind": "live.hat",
"slot": "hat",
"instance_id": null
}Valid: equip
{
"kind": "live.name_effect",
"slot": "name_effect",
"instance_id": "inv_01JZ00000000000000000001NV"
}Rejected: no-slot
{
"kind": "live.hat",
"instance_id": "inv_01JZ00000000000000000001NV"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('inventory.equip-request@1', value); // { valid, errors: [{ path, message }] }