TipsGoal tips.goal@1

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

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

tips.goal@1: a creator's goal on OpenVibe.Tips (server/domain/goals.js present, publicGoal). current_amount is derived from settled contributions (plus an amount carried over from Live), never from pending or simulated tips; percent is capped at 100. Anyone but the creator and granted services gets the public shape under the creator's page settings: amounts null with amounts_hidden when goal amounts are off, and supporters (the latest ten, their privacy applying) when goal supporters are on. GET /api/v1/goals/:id adds contributions for the creator and granted services.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^tgoal_[0-9A-HJKMNP-TV-Z]{26}$
creatoridentity.subject-refyes
titlestringyes
  • maxLength 120
descriptionstring | nullyes
target_amountinteger | nullyes
  • minimum 1
current_amountinteger | nullyes
  • minimum 0
currencystringyes
supporters_countintegeryesContributions counted.
  • minimum 0
carried_over_amountinteger | nullyes
  • minimum 0
percentintegeryes
  • minimum 0
  • maximum 100
reachedbooleanyes
reached_atstring | nullyes
image_urlstring | nullyes
statusenumyes
  • one of "active", "closed"
sort_orderintegeryes
  • minimum 0
revisionintegeryes
  • minimum 1
created_atstringyes
updated_atstringyes
closed_atstring | nullyes
amounts_hiddenconst
  • = true
supportersarray of object
supporters[].namestringyes
supporters[].amountinteger | nullyes
supporters[].atstringyes
contributionsarray of object
contributions[].interaction_idstringyes
  • pattern ^tint_[0-9A-HJKMNP-TV-Z]{26}$
contributions[].amountintegeryes
  • minimum 1
contributions[].reversed_amountintegeryes
  • minimum 0
contributions[].created_atstringyes
contributions[].supporter_namestringyes

Examples

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

Valid: owner
{
  "id": "tgoal_01JAB2C3D4E5F6G7H8J9K0MNQ9",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "title": "New microphone",
  "description": "Help me sound less like a tin can.",
  "target_amount": 20000,
  "current_amount": 7350,
  "currency": "vibes-bits",
  "supporters_count": 12,
  "carried_over_amount": 0,
  "percent": 36,
  "reached": false,
  "reached_at": null,
  "image_url": null,
  "status": "active",
  "sort_order": 0,
  "revision": 13,
  "created_at": "2026-09-10T20:00:00.000Z",
  "updated_at": "2026-09-25T09:12:41.530Z",
  "closed_at": null,
  "contributions": [
    {
      "interaction_id": "tint_01JAB2C3D4E5F6G7H8J9K0MNQ5",
      "amount": 500,
      "reversed_amount": 0,
      "created_at": "2026-09-25T09:12:41.530Z",
      "supporter_name": "moosefan"
    }
  ]
}
Valid: public-no-amounts
{
  "id": "tgoal_01JAB2C3D4E5F6G7H8J9K0MNQ9",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "title": "New microphone",
  "description": "Help me sound less like a tin can.",
  "target_amount": null,
  "current_amount": null,
  "currency": "vibes-bits",
  "supporters_count": 12,
  "carried_over_amount": null,
  "percent": 36,
  "reached": false,
  "reached_at": null,
  "image_url": null,
  "status": "active",
  "sort_order": 0,
  "revision": 13,
  "created_at": "2026-09-10T20:00:00.000Z",
  "updated_at": "2026-09-25T09:12:41.530Z",
  "closed_at": null,
  "amounts_hidden": true,
  "supporters": [
    {
      "name": "Anonymous",
      "amount": null,
      "at": "2026-09-25T09:12:41.530Z"
    }
  ]
}
Rejected: over-100
{
  "id": "tgoal_01JAB2C3D4E5F6G7H8J9K0MNQ9",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "title": "New microphone",
  "description": "Help me sound less like a tin can.",
  "target_amount": 20000,
  "current_amount": 7350,
  "currency": "vibes-bits",
  "supporters_count": 12,
  "carried_over_amount": 0,
  "percent": 140,
  "reached": false,
  "reached_at": null,
  "image_url": null,
  "status": "active",
  "sort_order": 0,
  "revision": 13,
  "created_at": "2026-09-10T20:00:00.000Z",
  "updated_at": "2026-09-25T09:12:41.530Z",
  "closed_at": null
}

Validate

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