InventoryStoreListing inventory.store-listing@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-listing.v1.json

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

Fields

FieldTypeRequiredDescriptionConstraints
definition_idstringyes
  • pattern ^itd_[0-9A-HJKMNP-TV-Z]{26}$
issuerstringyes
pricesobjectyes
  • no other fields
prices.vibesinteger
  • minimum 1
  • maximum 9007199254740991
prices.coinsinteger
  • minimum 1
  • maximum 9007199254740991
statusenumyes
  • one of "in_review", "published", "rejected"

Examples

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

Valid: review
{
  "definition_id": "itd_00000000000000000000000001",
  "issuer": "service:live",
  "prices": {
    "vibes": 50
  },
  "status": "in_review"
}
Rejected: missing
{}

Validate

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