@hypercerts-org/lexicon 0.10.0-beta.4 → 0.10.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +66 -311
- package/SCHEMAS.md +276 -0
- package/dist/exports.d.ts +29 -128
- package/dist/exports.d.ts.map +1 -1
- package/dist/generated/exports.d.ts +29 -128
- package/dist/generated/exports.d.ts.map +1 -1
- package/dist/generated/lexicons.d.ts +82 -270
- package/dist/generated/lexicons.d.ts.map +1 -1
- package/dist/generated/types/org/hypercerts/claim/activity.d.ts +4 -18
- package/dist/generated/types/org/hypercerts/claim/activity.d.ts.map +1 -1
- package/dist/generated/types/org/hypercerts/claim/collection.d.ts +9 -9
- package/dist/generated/types/org/hypercerts/claim/collection.d.ts.map +1 -1
- package/dist/generated/types/org/hypercerts/claim/contributor.d.ts +31 -0
- package/dist/generated/types/org/hypercerts/claim/contributor.d.ts.map +1 -0
- package/dist/index.cjs +247 -495
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +239 -483
- package/dist/index.mjs.map +1 -1
- package/dist/lexicons.cjs +45 -143
- package/dist/lexicons.cjs.map +1 -1
- package/dist/lexicons.d.ts +82 -270
- package/dist/lexicons.d.ts.map +1 -1
- package/dist/lexicons.mjs +45 -143
- package/dist/lexicons.mjs.map +1 -1
- package/dist/types/org/hypercerts/claim/activity.d.ts +4 -18
- package/dist/types/org/hypercerts/claim/activity.d.ts.map +1 -1
- package/dist/types/org/hypercerts/claim/collection.d.ts +9 -9
- package/dist/types/org/hypercerts/claim/collection.d.ts.map +1 -1
- package/dist/types/org/hypercerts/claim/contributor.d.ts +31 -0
- package/dist/types/org/hypercerts/claim/contributor.d.ts.map +1 -0
- package/lexicons/org/hypercerts/claim/activity.json +4 -44
- package/lexicons/org/hypercerts/claim/collection.json +14 -17
- package/lexicons/org/hypercerts/claim/{contribution.json → contributor.json} +24 -14
- package/lexicons/org/hypercerts/claim/evaluation.json +1 -1
- package/package.json +7 -3
- package/dist/generated/types/org/hypercerts/claim/contribution.d.ts +0 -24
- package/dist/generated/types/org/hypercerts/claim/contribution.d.ts.map +0 -1
- package/dist/generated/types/org/hypercerts/claim/project.d.ts +0 -29
- package/dist/generated/types/org/hypercerts/claim/project.d.ts.map +0 -1
- package/dist/types/org/hypercerts/claim/contribution.d.ts +0 -24
- package/dist/types/org/hypercerts/claim/contribution.d.ts.map +0 -1
- package/dist/types/org/hypercerts/claim/project.d.ts +0 -29
- package/dist/types/org/hypercerts/claim/project.d.ts.map +0 -1
- package/lexicons/org/hypercerts/claim/project.json +0 -64
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @hypercerts-org/lexicon
|
|
2
2
|
|
|
3
|
+
## 0.10.0-beta.5
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#78](https://github.com/hypercerts-org/hypercerts-lexicon/pull/78) [`c55d8a7`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/c55d8a77ff2949136bab0c6680b7e458712404f1) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Remove org.hypercerts.claim.project lexicon and replace with org.hypercerts.claim.collection.project sidecar. Projects are now represented as collections with an optional project sidecar (same TID) that provides rich-text descriptions, avatars, and cover photos. Avatar and coverPhoto fields moved from base collection to project sidecar. Collections without the project sidecar are simple groupings; collections with it are "projects" with rich documentation.
|
|
8
|
+
|
|
9
|
+
- [#93](https://github.com/hypercerts-org/hypercerts-lexicon/pull/93) [`3276d6e`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/3276d6e59975ac8cfdd9a8eed09ddfd57fdddf41) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Change workScope from inline object definition to strongRef in activity lexicon. This breaking change removes the workScope definition (withinAllOf, withinAnyOf, withinNoneOf properties) and changes the workScope property to reference an external record via strongRef, allowing for more flexible work scope definitions.
|
|
10
|
+
|
|
11
|
+
- [#97](https://github.com/hypercerts-org/hypercerts-lexicon/pull/97) [`ceddab9`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/ceddab9e829d8ade3868eac4d10dd906e12a153c) Thanks [@aspiers](https://github.com/aspiers)! - Move schema documentation tables from README.md to auto-generated SCHEMAS.md to reduce git merge conflicts. The SCHEMAS.md file is now auto-generated from lexicon definitions and included in the distributed package.
|
|
12
|
+
|
|
13
|
+
- [#78](https://github.com/hypercerts-org/hypercerts-lexicon/pull/78) [`cc9d7bf`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/cc9d7bff3dc63f155ce8e11204fc1506ca687711) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Refactor collection lexicon to use items array instead of activities. The items array contains plain strongRefs (com.atproto.repo.strongRef) that can reference activities (org.hypercerts.claim.activity) and/or other collections (org.hypercerts.claim.collection), enabling recursive collection nesting. This change removes the activityWeight object structure from the base collection lexicon.
|
|
14
|
+
|
|
15
|
+
- [#67](https://github.com/hypercerts-org/hypercerts-lexicon/pull/67) [`b51dd76`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/b51dd7652b73c5ae6bba103f07eca9f5195809f0) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Remove bidirectional project-activity link. Activities no longer include a `project` field reference. Projects continue to reference activities via the `activities` array, making the relationship unidirectional (project → activities only).
|
|
16
|
+
|
|
17
|
+
- [#98](https://github.com/hypercerts-org/hypercerts-lexicon/pull/98) [`43b0431`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/43b04316d8cb11066d61d79e70f262f0d2426cde) Thanks [@aspiers](https://github.com/aspiers)! - Remove org.hypercerts.claim.collection.project lexicon
|
|
18
|
+
|
|
19
|
+
- [#75](https://github.com/hypercerts-org/hypercerts-lexicon/pull/75) [`95e2ba1`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/95e2ba174ea348746ce64507bf94b73c3d3d3954) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Unify project and collection schemas into a single
|
|
20
|
+
`org.hypercerts.claim.collection` lexicon with `type` discriminator
|
|
21
|
+
field to allow collections to be designated as projects. Custom
|
|
22
|
+
strings are also allowed in `type`.
|
|
23
|
+
|
|
24
|
+
Also make `shortDescription` field optional in
|
|
25
|
+
`org.hypercerts.claim.collection` to match
|
|
26
|
+
`org.hypercerts.claim.project`.
|
|
27
|
+
|
|
28
|
+
This unification removes `org.hypercerts.claim.project`, so existing
|
|
29
|
+
projects should be migrated to collections with `type` set to
|
|
30
|
+
`project`.
|
|
31
|
+
|
|
32
|
+
- [#80](https://github.com/hypercerts-org/hypercerts-lexicon/pull/80) [`e8d5a7c`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/e8d5a7cd080e4f8d4e6b96ce5762678deaeb2902) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Updated `org.hypercerts.claim.collection` lexicon:
|
|
33
|
+
- Added optional `type` field to specify collection type (e.g., 'favorites', 'project')
|
|
34
|
+
- Renamed fields for consistency:
|
|
35
|
+
- `collectionTitle` → `title`
|
|
36
|
+
- `shortCollectionDescription` → `shortDescription`
|
|
37
|
+
- `collectionDescription` → `description`
|
|
38
|
+
- Changed `description` from string to Leaflet linear document reference (`pub.leaflet.pages.linearDocument#main`) to support rich-text descriptions
|
|
39
|
+
|
|
40
|
+
**Breaking changes**:
|
|
41
|
+
- Field names have been renamed (e.g., `collectionTitle` → `title`)
|
|
42
|
+
- The `description` field now expects a reference object instead of a plain string
|
|
43
|
+
|
|
44
|
+
- [#92](https://github.com/hypercerts-org/hypercerts-lexicon/pull/92) [`bec8e63`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/bec8e63195fb73734b68f3d5201864b9bede0904) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Update `org.hypercerts.claim.contributor` lexicon to support individual contributor profiles and roles.
|
|
45
|
+
|
|
46
|
+
Breaking Changes:
|
|
47
|
+
- Removed `contributors` array.
|
|
48
|
+
- Added `identifier`, `displayName`, and `image` fields for individual profiles.
|
|
49
|
+
- Renamed `description` to `contributionDescription`.
|
|
50
|
+
- Updated `required` fields to only include `createdAt`.
|
|
51
|
+
|
|
52
|
+
Also corrected incorrect references to `org.hypercerts.claim.contribution` across the codebase to use the correct ID `org.hypercerts.claim.contributor`.
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- [#77](https://github.com/hypercerts-org/hypercerts-lexicon/pull/77) [`0d61ff7`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/0d61ff7e030a25682cd71877ae603b8782b09c3b) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Document ATProto sidecar pattern for collections using app.certified.location. Collections can now have location metadata by creating a location record with the same TID, allowing location updates without changing the collection CID. Updated README with usage example and ERD with sidecar relationship.
|
|
57
|
+
|
|
58
|
+
- [#74](https://github.com/hypercerts-org/hypercerts-lexicon/pull/74) [`f845f92`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/f845f924907f62c8b96afa6a18ac203c4bd4cad5) Thanks [@aspiers](https://github.com/aspiers)! - Make startDate and endDate optional in activity lexicon
|
|
59
|
+
|
|
3
60
|
## 0.10.0-beta.4
|
|
4
61
|
|
|
5
62
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -65,7 +65,10 @@ const activityRecord = {
|
|
|
65
65
|
$type: ACTIVITY_NSID,
|
|
66
66
|
title: "My Impact Work",
|
|
67
67
|
shortDescription: "Description here",
|
|
68
|
-
workScope:
|
|
68
|
+
workScope: {
|
|
69
|
+
uri: "at://did:plc:alice/org.hypercerts.claim.workscope/abc123",
|
|
70
|
+
cid: "...",
|
|
71
|
+
},
|
|
69
72
|
startDate: "2023-01-01T00:00:00Z",
|
|
70
73
|
endDate: "2023-12-31T23:59:59Z",
|
|
71
74
|
createdAt: new Date().toISOString(),
|
|
@@ -181,321 +184,73 @@ const rightsJSON = HYPERCERTS_LEXICON_JSON.RIGHTS;
|
|
|
181
184
|
const rightsDoc = HYPERCERTS_LEXICON_DOC.RIGHTS;
|
|
182
185
|
```
|
|
183
186
|
|
|
184
|
-
##
|
|
187
|
+
## Schema Documentation
|
|
185
188
|
|
|
186
|
-
|
|
189
|
+
For complete schema documentation with all lexicon definitions and
|
|
190
|
+
property tables, see [SCHEMAS.md](SCHEMAS.md).
|
|
187
191
|
|
|
188
|
-
|
|
192
|
+
## Examples
|
|
189
193
|
|
|
190
|
-
|
|
194
|
+
### Creating a Collection with Nested Items
|
|
191
195
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
| `locationType` | `string` | ✅ | An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point) |
|
|
221
|
-
| `location` | `union` | ✅ | The location of where the work was performed as a URI or blob. |
|
|
222
|
-
| `name` | `string` | ❌ | Optional name for this location |
|
|
223
|
-
| `description` | `string` | ❌ | Optional description for this location |
|
|
224
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created |
|
|
225
|
-
|
|
226
|
-
### Badges Lexicon
|
|
227
|
-
|
|
228
|
-
**Lexicon IDs:** `app.certified.badge.definition`, `app.certified.badge.award`, `app.certified.badge.response`
|
|
229
|
-
|
|
230
|
-
**Description:** Defines badge metadata, award records, and recipient responses for certified badges that can be used across protocols.
|
|
231
|
-
|
|
232
|
-
#### Badge Definition
|
|
233
|
-
|
|
234
|
-
**Lexicon ID:** `app.certified.badge.definition`
|
|
235
|
-
|
|
236
|
-
**Key:** `tid`
|
|
237
|
-
|
|
238
|
-
| Property | Type | Required | Description |
|
|
239
|
-
| ---------------- | -------- | -------- | ---------------------------------------------------------------------- |
|
|
240
|
-
| `badgeType` | `string` | ✅ | Category of the badge (e.g., endorsement, participation, affiliation). |
|
|
241
|
-
| `title` | `string` | ✅ | Human-readable title of the badge. |
|
|
242
|
-
| `icon` | `blob` | ✅ | Icon representing the badge (accepted `image/*` types, maxSize 1MB). |
|
|
243
|
-
| `description` | `string` | ❌ | Optional short statement describing the badge. |
|
|
244
|
-
| `allowedIssuers` | `array` | ❌ | Optional allowlist of DIDs allowed to issue this badge. |
|
|
245
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. |
|
|
246
|
-
|
|
247
|
-
#### Badge Award
|
|
248
|
-
|
|
249
|
-
**Lexicon ID:** `app.certified.badge.award`
|
|
250
|
-
|
|
251
|
-
**Key:** `tid`
|
|
252
|
-
|
|
253
|
-
| Property | Type | Required | Description |
|
|
254
|
-
| ----------- | -------- | -------- | ------------------------------------------------------------------------------------ |
|
|
255
|
-
| `badge` | `ref` | ✅ | Reference to the badge definition for this award (`app.certified.badge.definition`). |
|
|
256
|
-
| `subject` | `union` | ✅ | Entity the badge award is for (either a DID or a specific AT Protocol record). |
|
|
257
|
-
| `note` | `string` | ❌ | Optional explanation for the award. |
|
|
258
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. |
|
|
259
|
-
|
|
260
|
-
#### Badge Response
|
|
261
|
-
|
|
262
|
-
**Lexicon ID:** `app.certified.badge.response`
|
|
263
|
-
|
|
264
|
-
**Key:** `tid`
|
|
265
|
-
|
|
266
|
-
| Property | Type | Required | Description |
|
|
267
|
-
| ------------ | -------- | -------- | ---------------------------------------------------------------------- |
|
|
268
|
-
| `badgeAward` | `ref` | ✅ | Reference to the badge award (`app.certified.badge.award`). |
|
|
269
|
-
| `response` | `string` | ✅ | Enum: `accepted` or `rejected`. |
|
|
270
|
-
| `weight` | `string` | ❌ | Optional relative weight assigned by the recipient (stored as string). |
|
|
271
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. |
|
|
272
|
-
|
|
273
|
-
---
|
|
274
|
-
|
|
275
|
-
## Hypercerts Lexicons
|
|
276
|
-
|
|
277
|
-
Hypercerts-specific lexicons for tracking impact work and claims.
|
|
278
|
-
|
|
279
|
-
### Hypercerts Activity Claim
|
|
280
|
-
|
|
281
|
-
**Lexicon ID:** `org.hypercerts.claim.activity`
|
|
282
|
-
|
|
283
|
-
**Description:** The main lexicon where everything is connected to. This is the hypercert record that tracks impact work.
|
|
284
|
-
|
|
285
|
-
**Key:** `any`
|
|
286
|
-
|
|
287
|
-
#### Properties
|
|
288
|
-
|
|
289
|
-
| Property | Type | Required | Description | Comments |
|
|
290
|
-
| ------------------ | -------- | -------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
291
|
-
| `title` | `string` | ✅ | Title of the hypercert | |
|
|
292
|
-
| `shortDescription` | `string` | ✅ | Short blurb of the impact work done. | |
|
|
293
|
-
| `description` | `string` | ❌ | Optional longer description of the impact work done. | |
|
|
294
|
-
| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob | |
|
|
295
|
-
| `workScope` | `object` | ❌ | Logical scope of the work using label-based conditions | Object with `withinAllOf`, `withinAnyOf`, `withinNoneOf` arrays of labels |
|
|
296
|
-
| `startDate` | `string` | ✅ | When the work began | |
|
|
297
|
-
| `endDate` | `string` | ✅ | When the work ended | |
|
|
298
|
-
| `contributions` | `array` | ❌ | A strong reference to the contributions done to create the impact in the hypercerts | References must conform to `org.hypercerts.claim.contribution` |
|
|
299
|
-
| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has | References must conform to `org.hypercerts.claim.rights` |
|
|
300
|
-
| `locations` | `ref` | ❌ | An array of strong references to the locations where the work for done hypercert was located | References must conform to `app.certified.location` |
|
|
301
|
-
| `project` | `string` | ❌ | A reference (AT-URI) to the project record that this activity is part of | References must conform to `org.hypercerts.claim.project` |
|
|
302
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
303
|
-
|
|
304
|
-
#### Defs
|
|
305
|
-
|
|
306
|
-
##### activityWeight
|
|
307
|
-
|
|
308
|
-
| Property | Type | Required | Description |
|
|
309
|
-
| ---------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
310
|
-
| `activity` | `ref` | ✅ | A strong reference to a hypercert activity record. This activity must conform to the lexicon org.hypercerts.claim.activity |
|
|
311
|
-
| `weight` | `string` | ✅ | The relative weight/importance of this hypercert activity (stored as a string to avoid float precision issues). Weights can be any positive numeric values and do not need to sum to a specific total; normalization can be performed by the consuming application as needed. |
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
### Hypercerts Contribution
|
|
316
|
-
|
|
317
|
-
**Lexicon ID:** `org.hypercerts.claim.contribution`
|
|
318
|
-
|
|
319
|
-
**Description:** A contribution made toward a hypercert's impact.
|
|
320
|
-
|
|
321
|
-
**Key:** `tid`
|
|
322
|
-
|
|
323
|
-
#### Properties
|
|
324
|
-
|
|
325
|
-
| Property | Type | Required | Description |
|
|
326
|
-
| -------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
327
|
-
| `role` | `string` | ❌ | Role or title of the contributor(s). |
|
|
328
|
-
| `contributors` | `array` | ✅ | List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role. |
|
|
329
|
-
| `description` | `string` | ❌ | What the contribution concretely achieved |
|
|
330
|
-
| `startDate` | `string` | ❌ | When this contribution started. This should be a subset of the hypercert timeframe. |
|
|
331
|
-
| `endDate` | `string` | ❌ | When this contribution finished. This should be a subset of the hypercert timeframe. |
|
|
332
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created |
|
|
333
|
-
|
|
334
|
-
---
|
|
335
|
-
|
|
336
|
-
### Hypercerts Evaluation
|
|
337
|
-
|
|
338
|
-
**Lexicon ID:** `org.hypercerts.claim.evaluation`
|
|
339
|
-
|
|
340
|
-
**Description:** An evaluation of a hypercert record (e.g. an activity and its impact).
|
|
341
|
-
|
|
342
|
-
**Key:** `tid`
|
|
343
|
-
|
|
344
|
-
#### Properties
|
|
345
|
-
|
|
346
|
-
| Property | Type | Required | Description | Comments |
|
|
347
|
-
| -------------- | -------- | -------- | --------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
348
|
-
| `subject` | `ref` | ❌ | A strong reference to what is being evaluated | (e.g activity, measurement, contribution, etc.) |
|
|
349
|
-
| `evaluators` | `array` | ✅ | DIDs of the evaluators | |
|
|
350
|
-
| `content` | `array` | ❌ | Evaluation data (URIs or blobs) containing detailed reports or methodology | |
|
|
351
|
-
| `measurements` | `array` | ❌ | Optional references to the measurements that contributed to this evaluation | References must conform to `org.hypercerts.claim.measurement` |
|
|
352
|
-
| `summary` | `string` | ✅ | Brief evaluation summary | |
|
|
353
|
-
| `score` | `object` | ❌ | Optional overall score for this evaluation on a numeric scale | Object with `min`, `max`, and `value` (integers) |
|
|
354
|
-
| `location` | `ref` | ❌ | An optional reference for georeferenced evaluations | References must conform to `app.certified.location` |
|
|
355
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
356
|
-
|
|
357
|
-
---
|
|
358
|
-
|
|
359
|
-
### Hypercerts Evidence
|
|
360
|
-
|
|
361
|
-
**Lexicon ID:** `org.hypercerts.claim.evidence`
|
|
362
|
-
|
|
363
|
-
**Description:** A piece of evidence related to a hypercert record (e.g. an activity, project, claim, or evaluation). Evidence may support, clarify, or challenge the referenced subject.
|
|
364
|
-
|
|
365
|
-
**Key:** `tid`
|
|
366
|
-
|
|
367
|
-
#### Properties
|
|
368
|
-
|
|
369
|
-
| Property | Type | Required | Description | Comments |
|
|
370
|
-
| ------------------ | -------- | -------- | ----------------------------------------------------------------- | ---------------------------------------------------- |
|
|
371
|
-
| `subject` | `ref` | ❌ | A strong reference to the record this evidence relates to | (e.g. an activity, project, claim, or evaluation) |
|
|
372
|
-
| `content` | `union` | ✅ | A piece of evidence (URI or blob) related to the subject record | May support, clarify, or challenge a hypercert claim |
|
|
373
|
-
| `title` | `string` | ✅ | Title to describe the nature of the evidence | |
|
|
374
|
-
| `shortDescription` | `string` | ❌ | Short description explaining what this evidence shows | |
|
|
375
|
-
| `description` | `string` | ❌ | Longer description describing the evidence in more detail | |
|
|
376
|
-
| `relationType` | `string` | ❌ | How this evidence relates to the subject | Known values: `supports`, `challenges`, `clarifies` |
|
|
377
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
### org.hypercerts.claim.measurement
|
|
382
|
-
|
|
383
|
-
**Lexicon ID:** `org.hypercerts.claim.measurement`
|
|
384
|
-
|
|
385
|
-
**Description:** Measurement data related to a hypercert record (e.g. an activity and its impact).
|
|
386
|
-
|
|
387
|
-
**Key:** `tid`
|
|
388
|
-
|
|
389
|
-
#### Properties
|
|
390
|
-
|
|
391
|
-
| Property | Type | Required | Description | Comments |
|
|
392
|
-
| ------------- | -------- | -------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
393
|
-
| `subject` | `ref` | ❌ | A strong reference to the record this measurement refers to | (e.g. an activity, project, or claim) |
|
|
394
|
-
| `measurers` | `array` | ✅ | DIDs of the entity (or entities) that measured this data | |
|
|
395
|
-
| `metric` | `string` | ✅ | The metric being measured | |
|
|
396
|
-
| `value` | `string` | ✅ | The measured value | |
|
|
397
|
-
| `methodType` | `string` | ❌ | Short identifier for the measurement methodology | |
|
|
398
|
-
| `methodURI` | `string` | ❌ | URI to methodology documentation, standard protocol, or measurement procedure | |
|
|
399
|
-
| `evidenceURI` | `array` | ❌ | URIs to related evidence or underlying data | (e.g. org.hypercerts.claim.evidence records or raw datasets) |
|
|
400
|
-
| `location` | `ref` | ❌ | A strong reference to the location where the measurement was taken | References must conform to `app.certified.location` |
|
|
401
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
402
|
-
|
|
403
|
-
---
|
|
404
|
-
|
|
405
|
-
### org.hypercerts.claim.collection
|
|
406
|
-
|
|
407
|
-
**Lexicon ID:** `org.hypercerts.claim.collection`
|
|
408
|
-
|
|
409
|
-
**Description:** A collection/group of hypercerts that have a specific property.
|
|
410
|
-
|
|
411
|
-
**Key:** `tid`
|
|
412
|
-
|
|
413
|
-
#### Properties
|
|
414
|
-
|
|
415
|
-
| Property | Type | Required | Description | Comments |
|
|
416
|
-
| ------------------ | -------- | -------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
417
|
-
| `title` | `string` | ✅ | The title of this collection | |
|
|
418
|
-
| `shortDescription` | `string` | ❌ | A short description of this collection | |
|
|
419
|
-
| `avatar` | `blob` | ❌ | Primary avatar image representing this collection across apps and views | Typically a square image |
|
|
420
|
-
| `coverPhoto` | `blob` | ❌ | The cover photo of this collection | |
|
|
421
|
-
| `activities` | `array` | ✅ | Array of activities with their associated weights in this collection | Each item references `org.hypercerts.claim.activity#activityWeight` |
|
|
422
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
423
|
-
|
|
424
|
-
---
|
|
425
|
-
|
|
426
|
-
### org.hypercerts.claim.project
|
|
427
|
-
|
|
428
|
-
**Lexicon ID:** `org.hypercerts.claim.project`
|
|
429
|
-
|
|
430
|
-
**Description:** A project that can include multiple activities, each of which may be linked to at most one project.
|
|
431
|
-
|
|
432
|
-
**Key:** `tid`
|
|
433
|
-
|
|
434
|
-
#### Properties
|
|
435
|
-
|
|
436
|
-
| Property | Type | Required | Description | Comments |
|
|
437
|
-
| ------------------ | -------- | -------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
438
|
-
| `title` | `string` | ✅ | Title of this project | |
|
|
439
|
-
| `shortDescription` | `string` | ✅ | Short summary of this project, suitable for previews and list views | |
|
|
440
|
-
| `description` | `ref` | ❌ | Rich-text description of this project, represented as a Leaflet linear document | References must conform to `pub.leaflet.pages.linearDocument#main` |
|
|
441
|
-
| `avatar` | `blob` | ❌ | Primary avatar image representing this project across apps and views | Typically a square logo or project identity image |
|
|
442
|
-
| `coverPhoto` | `blob` | ❌ | The cover photo of this project | |
|
|
443
|
-
| `activities` | `array` | ❌ | Array of activities with their associated weights in this project | Each item references `org.hypercerts.claim.activity#activityWeight` |
|
|
444
|
-
| `location` | `ref` | ❌ | A strong reference to a location record describing where the work took place | References must conform to `app.certified.location` |
|
|
445
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
446
|
-
|
|
447
|
-
---
|
|
448
|
-
|
|
449
|
-
### org.hypercerts.claim.rights
|
|
450
|
-
|
|
451
|
-
**Lexicon ID:** `org.hypercerts.claim.rights`
|
|
452
|
-
|
|
453
|
-
**Description:** Describes the rights that a contributor and/or an owner has, such as whether the hypercert can be sold, transferred, and under what conditions.
|
|
454
|
-
|
|
455
|
-
**Key:** `tid`
|
|
456
|
-
|
|
457
|
-
#### Properties
|
|
458
|
-
|
|
459
|
-
| Property | Type | Required | Description | Comments |
|
|
460
|
-
| ------------------- | -------- | -------- | ----------------------------------------------------------------- | ----------- |
|
|
461
|
-
| `rightsName` | `string` | ✅ | Full name of the rights | |
|
|
462
|
-
| `rightsType` | `string` | ✅ | Short rights identifier for easier search | |
|
|
463
|
-
| `rightsDescription` | `string` | ✅ | Description of the rights of this hypercert | |
|
|
464
|
-
| `attachment` | `union` | ❌ | An attachment to define the rights further, e.g. a legal document | URI or blob |
|
|
465
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
|
|
466
|
-
|
|
467
|
-
---
|
|
468
|
-
|
|
469
|
-
### org.hypercerts.funding.receipt
|
|
470
|
-
|
|
471
|
-
**Lexicon ID:** `org.hypercerts.funding.receipt`
|
|
472
|
-
|
|
473
|
-
**Description:** Records a funding receipt for a payment from one user to another user. It may be recorded by the recipient, by the sender, or by a third party. The sender may remain anonymous.
|
|
474
|
-
|
|
475
|
-
**Key:** `tid`
|
|
476
|
-
|
|
477
|
-
#### Properties
|
|
196
|
+
```typescript
|
|
197
|
+
import { TID } from "@atproto/common";
|
|
198
|
+
|
|
199
|
+
const collectionRecord = {
|
|
200
|
+
$type: "org.hypercerts.claim.collection",
|
|
201
|
+
title: "Climate Action Projects",
|
|
202
|
+
shortDescription:
|
|
203
|
+
"A collection of climate-related activities and sub-collections",
|
|
204
|
+
items: [
|
|
205
|
+
// Reference to an activity
|
|
206
|
+
{
|
|
207
|
+
uri: "at://did:plc:alice/org.hypercerts.claim.activity/3k2abc",
|
|
208
|
+
cid: "...",
|
|
209
|
+
},
|
|
210
|
+
// Reference to another activity
|
|
211
|
+
{
|
|
212
|
+
uri: "at://did:plc:bob/org.hypercerts.claim.activity/7x9def",
|
|
213
|
+
cid: "...",
|
|
214
|
+
},
|
|
215
|
+
// Reference to another collection (recursive!)
|
|
216
|
+
{
|
|
217
|
+
uri: "at://did:plc:carol/org.hypercerts.claim.collection/4m5ghi",
|
|
218
|
+
cid: "...",
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
createdAt: new Date().toISOString(),
|
|
222
|
+
};
|
|
223
|
+
```
|
|
478
224
|
|
|
479
|
-
|
|
480
|
-
| ---------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
481
|
-
| `from` | `string` | ✅ | DID of the sender who transferred the funds. If sender wants to stay anonymous, mark this explicitly. | Format: did |
|
|
482
|
-
| `to` | `string` | ✅ | The recipient of the funds, who can be identified by DID or a clear-text name. | |
|
|
483
|
-
| `amount` | `string` | ✅ | Amount of funding received. | |
|
|
484
|
-
| `currency` | `string` | ✅ | Currency of the payment (e.g. EUR, USD, ETH). | |
|
|
485
|
-
| `paymentRail` | `string` | ❌ | How the funds were transferred (e.g. bank_transfer, credit_card, onchain, cash, check, payment_processor). | |
|
|
486
|
-
| `paymentNetwork` | `string` | ❌ | Optional network within the payment rail (e.g. arbitrum, ethereum, sepa, visa, paypal). | |
|
|
487
|
-
| `transactionId` | `string` | ❌ | Identifier of the underlying payment transaction (e.g. bank reference, onchain transaction hash, or processor-specific ID). | Use paymentNetwork to specify the network where applicable. |
|
|
488
|
-
| `for` | `string` | ❌ | Optional reference to the activity, project, or organization this funding relates to. | Format: at-uri |
|
|
489
|
-
| `notes` | `string` | ❌ | Optional notes or additional context for this funding receipt. | maxLength: 500 |
|
|
490
|
-
| `occurredAt` | `string` | ❌ | Timestamp when the payment occurred. | Format: datetime |
|
|
491
|
-
| `createdAt` | `string` | ✅ | Client-declared timestamp when this receipt record was created. | Format: datetime |
|
|
225
|
+
### Creating a Project
|
|
492
226
|
|
|
493
|
-
|
|
227
|
+
Projects are collections with a `type` field set to "project" and can
|
|
228
|
+
include rich-text descriptions:
|
|
494
229
|
|
|
495
|
-
|
|
230
|
+
```typescript
|
|
231
|
+
const projectRecord = {
|
|
232
|
+
$type: "org.hypercerts.claim.collection",
|
|
233
|
+
type: "project",
|
|
234
|
+
title: "Carbon Offset Initiative",
|
|
235
|
+
shortDescription: "A project focused on carbon reduction and reforestation",
|
|
236
|
+
description: {
|
|
237
|
+
uri: "at://did:plc:alice/pub.leaflet.pages.linearDocument/abc123",
|
|
238
|
+
cid: "...",
|
|
239
|
+
},
|
|
240
|
+
items: [
|
|
241
|
+
{
|
|
242
|
+
uri: "at://did:plc:alice/org.hypercerts.claim.activity/3k2abc",
|
|
243
|
+
cid: "...",
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
uri: "at://did:plc:bob/org.hypercerts.claim.activity/7x9def",
|
|
247
|
+
cid: "...",
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
createdAt: new Date().toISOString(),
|
|
251
|
+
};
|
|
252
|
+
```
|
|
496
253
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
-
|
|
500
|
-
- Array items may have constraints like `maxLength` to limit the number of elements
|
|
501
|
-
- String fields may have both `maxLength` (bytes) and `maxGraphemes` (Unicode grapheme clusters) constraints
|
|
254
|
+
**Note**: The `type` field is optional and can be set to "project",
|
|
255
|
+
"favorites", or any other collection type. The `description` field
|
|
256
|
+
supports rich-text via Leaflet linear documents.
|