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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
creator | identity.subject-ref | yes | ||
title | string | yes |
| |
description | string | null | yes | ||
target_amount | integer | null | yes |
| |
current_amount | integer | null | yes |
| |
currency | string | yes | ||
supporters_count | integer | yes | Contributions counted. |
|
carried_over_amount | integer | null | yes |
| |
percent | integer | yes |
| |
reached | boolean | yes | ||
reached_at | string | null | yes | ||
image_url | string | null | yes | ||
status | enum | yes |
| |
sort_order | integer | yes |
| |
revision | integer | yes |
| |
created_at | string | yes | ||
updated_at | string | yes | ||
closed_at | string | null | yes | ||
amounts_hidden | const |
| ||
supporters | array of object | |||
supporters[].name | string | yes | ||
supporters[].amount | integer | null | yes | ||
supporters[].at | string | yes | ||
contributions | array of object | |||
contributions[].interaction_id | string | yes |
| |
contributions[].amount | integer | yes |
| |
contributions[].reversed_amount | integer | yes |
| |
contributions[].created_at | string | yes | ||
contributions[].supporter_name | string | yes |
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 }] }