VipPerk vip.perk@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
vip
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/vip/perk.v1.json

vip.perk@1: a perk on OpenVibe.VIP (server/domain/perks.js present): a benefit a creator (or the network) defines once and includes in plan versions, with its product bindings (how a product recognises it: Live's chat badge, a Chat room, a gated Blog post, …). Editing a perk never rewrites the plan versions that include it.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^vpk_[0-9A-HJKMNP-TV-Z]{26}$
keystringyes
  • pattern ^[a-z0-9][a-z0-9-]{0,47}$
namestringyes
  • maxLength 80
descriptionstring | nullyes
  • maxLength 500
kindenumyes
  • one of "badge", "emote", "gated_content", "room", "role", "other"
statusenumyes
  • one of "active", "retired"
scopeenumyes
  • one of "creator", "network"
creator_idstringyes
  • pattern ^(vcr_[0-9A-HJKMNP-TV-Z]{26}|network)$
bindingsarray of objectyesActive bindings, by product then binding.
bindings[].productstringyes
  • pattern ^[a-z][a-z0-9-]{1,39}$
bindings[].bindingstringyes
  • pattern ^[a-z][a-z0-9_.]{1,63}$
bindings[].configobjectyes
updated_atstringyes
  • format date-time

Examples

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

Valid: badge
{
  "id": "vpk_01JAB2C3D4E5F6G7H8J9K0MNPV",
  "key": "chat-badge",
  "name": "Chat badge",
  "description": "A supporter badge next to your name in chat.",
  "kind": "badge",
  "status": "active",
  "scope": "creator",
  "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "bindings": [
    {
      "product": "chat",
      "binding": "chat_badge",
      "config": {
        "icon": "star"
      }
    },
    {
      "product": "live",
      "binding": "chat_badge",
      "config": {}
    }
  ],
  "updated_at": "2026-09-20T18:04:11.402Z"
}
Rejected: bad-kind
{
  "id": "vpk_01JAB2C3D4E5F6G7H8J9K0MNPV",
  "key": "chat-badge",
  "name": "Chat badge",
  "description": "A supporter badge next to your name in chat.",
  "kind": "discount",
  "status": "active",
  "scope": "creator",
  "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "bindings": [
    {
      "product": "chat",
      "binding": "chat_badge",
      "config": {
        "icon": "star"
      }
    },
    {
      "product": "live",
      "binding": "chat_badge",
      "config": {}
    }
  ],
  "updated_at": "2026-09-20T18:04:11.402Z"
}

Validate

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