Skip to content

Commit b8ad8b3

Browse files
chore: version packages (beta)
- @hypercerts-org/sdk-core: 0.10.0-beta.7 - @hypercerts-org/sdk-react: 0.10.0-beta.8
1 parent 7578756 commit b8ad8b3

File tree

5 files changed

+245
-3
lines changed

5 files changed

+245
-3
lines changed

.changeset/pre.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@
66
"@hypercerts-org/sdk-react": "0.10.0"
77
},
88
"changesets": [
9+
"add-collection-avatar-banner-docs",
10+
"add-collection-item-weight-docs",
911
"add-project-support",
12+
"add-rich-text-facets",
1013
"align-collection-project-types",
1114
"base-operations",
1215
"configurable-agent-routing",
1316
"custom-lexicon-docs",
17+
"feat-contribution-weight",
1418
"five-seas-do",
1519
"fix-add-evidence",
1620
"fix-collaborator-permissions-format",
21+
"fix-contributor-strongref-types",
1722
"fix-create-org-params",
1823
"fix-errant-changelog-versions",
1924
"fix-hypcertcreation-params",
@@ -36,6 +41,9 @@
3641
"react-lexicon-registry",
3742
"record-validation",
3843
"refactor-location-attachment",
39-
"sdk-lexicon-integration"
44+
"sdk-lexicon-integration",
45+
"support-multiple-locations",
46+
"update-measurement-api",
47+
"wise-papayas-sing"
4048
]
4149
}

packages/sdk-core/CHANGELOG.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,195 @@
11
# @hypercerts-org/sdk-core
22

3+
## 0.10.0-beta.7
4+
5+
### Minor Changes
6+
7+
- [#112](https://github.com/hypercerts-org/hypercerts-sdk/pull/112)
8+
[`320b428`](https://github.com/hypercerts-org/hypercerts-sdk/commit/320b428a073b8f9371f3a224dd7897897ad7efae) Thanks
9+
[@aspiers](https://github.com/aspiers)! - Add comprehensive documentation and tests for collection avatar and banner
10+
images
11+
12+
Collections and projects now support avatar (thumbnail/icon) and banner (header/cover) images. Images can be provided
13+
as Blobs for upload or as URI strings for external references.
14+
15+
**What's Included:**
16+
- Comprehensive JSDoc documentation for `HypercertCollection` type explaining avatar and banner usage
17+
- Tests for creating collections with avatar/banner using both Blobs and URI strings
18+
- Tests for updating collection images (add, update, remove, preserve)
19+
- Examples showing avatar/banner in collections and projects
20+
21+
- [#112](https://github.com/hypercerts-org/hypercerts-sdk/pull/112)
22+
[`e1ced1e`](https://github.com/hypercerts-org/hypercerts-sdk/commit/e1ced1e53f4f26058f4e4e5c06909563ec3cd49e) Thanks
23+
[@aspiers](https://github.com/aspiers)! - Add rich text facet support for activity descriptions (lexicon
24+
v0.10.0-beta.7)
25+
26+
Activities now support rich text annotations (facets) in their descriptions, enabling mentions (@user), URLs, hashtags
27+
(#tag), and other inline markup.
28+
- Added `shortDescriptionFacets` and `descriptionFacets` fields to `CreateHypercertParams`
29+
- Updated `create()` method to include facet fields in hypercert records
30+
- Enhanced `HypercertClaim` documentation with comprehensive facet examples
31+
- Added examples showing mentions, links, and tag facets with proper byte indexing
32+
33+
- [#115](https://github.com/hypercerts-org/hypercerts-sdk/pull/115)
34+
[`5be70fa`](https://github.com/hypercerts-org/hypercerts-sdk/commit/5be70faf5728a41477508089cfebef9c26d1362e) Thanks
35+
[@s-adamantine](https://github.com/s-adamantine)! - **BREAKING CHANGE**: Update contribution structure to match
36+
lexicon beta.7+ inline contributor format.
37+
38+
**Old API (lexicon beta.5-beta.6):**
39+
40+
```typescript
41+
await repo.hypercerts.create({
42+
contributions: [
43+
{
44+
contributors: ["did:plc:contrib1"],
45+
role: "Developer",
46+
description: "Led backend development",
47+
},
48+
],
49+
});
50+
```
51+
52+
**New API (lexicon beta.7+):**
53+
54+
```typescript
55+
await repo.hypercerts.create({
56+
contributions: [
57+
{
58+
contributors: ["did:plc:contrib1"],
59+
contributionDetails: "Developer", // string | StrongRef | CreateContributionDetailsParams
60+
weight: "0.75", // optional proportional weight
61+
},
62+
],
63+
});
64+
```
65+
66+
**Migration:** Replace `role` and `description` with `contributionDetails`. Optionally add `weight` for proportional
67+
attribution.
68+
69+
- [#108](https://github.com/hypercerts-org/hypercerts-sdk/pull/108)
70+
[`750cd44`](https://github.com/hypercerts-org/hypercerts-sdk/commit/750cd4429ed4ec2c0d21b4ea60296da87c7cc183) Thanks
71+
[@s-adamantine](https://github.com/s-adamantine)! - Support multiple locations for hypercert activity claims
72+
73+
**Breaking Changes:**
74+
- `CreateHypercertParams.location` is now `CreateHypercertParams.locations` (plural, array)
75+
- `CreateHypercertResult.locationUri` is now `CreateHypercertResult.locationUris` (plural, array)
76+
- `CreateHypercertResult.locationCid` is now `CreateHypercertResult.locationCids` (plural, array)
77+
78+
**New Functionality:**
79+
- Hypercerts can now have multiple locations to support activities spanning multiple places
80+
- Each location can be a StrongRef, string URI, or location object
81+
- `attachLocation()` now appends to existing locations array instead of replacing
82+
83+
**Migration:**
84+
85+
```typescript
86+
// Before (v0.10.0-beta.5 and earlier)
87+
await repo.hypercerts.create({
88+
...params,
89+
location: {
90+
lpVersion: "1.0.0",
91+
srs: "EPSG:4326",
92+
locationType: "coordinate-decimal",
93+
location: "https://example.com/location",
94+
},
95+
});
96+
97+
// After (v0.10.0-beta.6+)
98+
await repo.hypercerts.create({
99+
...params,
100+
locations: [
101+
{
102+
lpVersion: "1.0.0",
103+
srs: "EPSG:4326",
104+
locationType: "coordinate-decimal",
105+
location: "https://example.com/location",
106+
},
107+
],
108+
});
109+
110+
// Now supports multiple locations
111+
await repo.hypercerts.create({
112+
...params,
113+
locations: [
114+
{ location: "https://example.com/location1", ... },
115+
{ location: "https://example.com/location2", ... },
116+
],
117+
});
118+
```
119+
120+
- [#120](https://github.com/hypercerts-org/hypercerts-sdk/pull/120)
121+
[`2e03d8d`](https://github.com/hypercerts-org/hypercerts-sdk/commit/2e03d8dc3a1fafad03c4f783951bfb48acfb01ab) Thanks
122+
[@Kzoeps](https://github.com/Kzoeps)! - Update measurement API to align with lexicon beta.12+ schema
123+
124+
**Breaking Changes (sdk-core):**
125+
- `addMeasurement()` now accepts `CreateMeasurementParams` instead of individual parameters
126+
- `subject` field replaces `hypercertUri` and accepts both string AT-URIs and StrongRefs
127+
- `unit` is now a required field (e.g., "tons CO2e", "hectares", "%")
128+
- `measurers` is now optional instead of required
129+
- Field name changes: `methodUri``methodURI`, `evidenceUris``evidenceURI`
130+
131+
**Breaking Changes (sdk-react):**
132+
- Removed `OrgHypercertsDefs` export (WorkScope types removed from lexicon)
133+
- `UpdateHypercertParams.workScope` now accepts `string | StrongRef` (i.e., `string | { uri: string; cid: string }`)
134+
135+
**New Features:**
136+
- Added `updateMeasurement()` method with `UpdateMeasurementParams` type (subject is immutable)
137+
- Support for `locations` array to specify where measurements were taken
138+
- Added `startDate` and `endDate` for measurement timeframes
139+
- Added `methodType` for short methodology identifiers
140+
- Rich text support via `comment` and `commentFacets` fields
141+
142+
**Internal Improvements:**
143+
- Added `resolveToStrongRef` utility for handling string/StrongRef conversions
144+
- Updated evidence handling to use `HypercertAttachment` schema (beta.13 compatibility)
145+
- Improved error messages in URI resolution functions
146+
147+
- [#108](https://github.com/hypercerts-org/hypercerts-sdk/pull/108)
148+
[`60c3950`](https://github.com/hypercerts-org/hypercerts-sdk/commit/60c3950f596b5ae7080404d66575ecb58861d5c0) Thanks
149+
[@s-adamantine](https://github.com/s-adamantine)! - feat: implement pre-generation of rKeys for activity claims using
150+
deterministic content hashing (SHA-256).
151+
152+
fix: normalize hashInput in `createHypercertRecord()` to use resolved StrongRefs (`locationRef`, `contributorsData`)
153+
instead of raw params which may contain non-serializable Blobs or inconsistent formats, ensuring stable rKey
154+
generation.
155+
156+
### Patch Changes
157+
158+
- [#112](https://github.com/hypercerts-org/hypercerts-sdk/pull/112)
159+
[`28a46c8`](https://github.com/hypercerts-org/hypercerts-sdk/commit/28a46c80224633badaddb574971cafc6537edc1c) Thanks
160+
[@aspiers](https://github.com/aspiers)! - Add documentation for collection item weights (lexicon v0.10.0-beta.7)
161+
162+
Collections now support optional weights on items for proportional attribution. Each item in a collection's `items`
163+
array can have an `itemWeight` field (positive number as string) to indicate relative weighting.
164+
- Enhanced documentation for `HypercertCollectionItem` type with usage examples
165+
- Added examples showing weighted items, nested collections, and basic items
166+
- Documented `CollectionItemInput` helper type for SDK operations
167+
168+
- [#119](https://github.com/hypercerts-org/hypercerts-sdk/pull/119)
169+
[`2354987`](https://github.com/hypercerts-org/hypercerts-sdk/commit/23549875fdd02cb30372109784916b3d5d9ee7c3) Thanks
170+
[@Kzoeps](https://github.com/Kzoeps)! - Fix contributor identity and contribution details to include `$type` for
171+
lexicon validation
172+
173+
**Breaking Context:** The lexicon defines `contributorIdentity` and `contributionDetails` as union types wrapped in
174+
`$Typed<>`, which requires `$type: "com.atproto.repo.strongRef"` as a discriminator for validation. Unlike the
175+
`rights` field (which uses plain `ComAtprotoRepoStrongRef.Main`), these fields require `$type` to pass validation.
176+
177+
**Implementation Changes:**
178+
- `resolveContributorIdentity()`: Now converts string DIDs to `contributorInformation` records and returns StrongRefs
179+
with `$type`
180+
- `resolveContributionDetails()`: Added `$type: "com.atproto.repo.strongRef"` to all StrongRef returns
181+
- Updated `ResolvedContributorIdentity` and `ResolvedContributionDetails` types to include `$type` in StrongRef
182+
objects
183+
184+
**Test Updates:**
185+
- Added mocks for `contributorInformation` record creation when string DIDs are provided (e.g., `"did:plc:contrib1"`)
186+
- Updated assertions to expect `$type: "com.atproto.repo.strongRef"` in all contributor and contribution detail
187+
StrongRefs
188+
- Adjusted mock call indices to account for additional `contributorInformation` record creation calls
189+
- Fixed 10 failing tests that were expecting plain `{ uri, cid }` objects instead of properly typed StrongRefs
190+
191+
This ensures hypercert records with contributors pass lexicon validation and can be created successfully.
192+
3193
## 0.10.0-beta.6
4194

5195
### Minor Changes

packages/sdk-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hypercerts-org/sdk-core",
3-
"version": "0.10.0-beta.6",
3+
"version": "0.10.0-beta.7",
44
"description": "Framework-agnostic ATProto SDK core for authentication, repository operations, and lexicon management",
55
"main": "dist/index.cjs",
66
"repository": {

packages/sdk-react/CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# @hypercerts-org/sdk-react
22

3+
## 0.10.0-beta.8
4+
5+
### Minor Changes
6+
7+
- [#120](https://github.com/hypercerts-org/hypercerts-sdk/pull/120)
8+
[`2e03d8d`](https://github.com/hypercerts-org/hypercerts-sdk/commit/2e03d8dc3a1fafad03c4f783951bfb48acfb01ab) Thanks
9+
[@Kzoeps](https://github.com/Kzoeps)! - Update measurement API to align with lexicon beta.12+ schema
10+
11+
**Breaking Changes (sdk-core):**
12+
- `addMeasurement()` now accepts `CreateMeasurementParams` instead of individual parameters
13+
- `subject` field replaces `hypercertUri` and accepts both string AT-URIs and StrongRefs
14+
- `unit` is now a required field (e.g., "tons CO2e", "hectares", "%")
15+
- `measurers` is now optional instead of required
16+
- Field name changes: `methodUri``methodURI`, `evidenceUris``evidenceURI`
17+
18+
**Breaking Changes (sdk-react):**
19+
- Removed `OrgHypercertsDefs` export (WorkScope types removed from lexicon)
20+
- `UpdateHypercertParams.workScope` now accepts `string | StrongRef` (i.e., `string | { uri: string; cid: string }`)
21+
22+
**New Features:**
23+
- Added `updateMeasurement()` method with `UpdateMeasurementParams` type (subject is immutable)
24+
- Support for `locations` array to specify where measurements were taken
25+
- Added `startDate` and `endDate` for measurement timeframes
26+
- Added `methodType` for short methodology identifiers
27+
- Rich text support via `comment` and `commentFacets` fields
28+
29+
**Internal Improvements:**
30+
- Added `resolveToStrongRef` utility for handling string/StrongRef conversions
31+
- Updated evidence handling to use `HypercertAttachment` schema (beta.13 compatibility)
32+
- Improved error messages in URI resolution functions
33+
34+
### Patch Changes
35+
36+
- Updated dependencies
37+
[[`320b428`](https://github.com/hypercerts-org/hypercerts-sdk/commit/320b428a073b8f9371f3a224dd7897897ad7efae),
38+
[`28a46c8`](https://github.com/hypercerts-org/hypercerts-sdk/commit/28a46c80224633badaddb574971cafc6537edc1c),
39+
[`e1ced1e`](https://github.com/hypercerts-org/hypercerts-sdk/commit/e1ced1e53f4f26058f4e4e5c06909563ec3cd49e),
40+
[`5be70fa`](https://github.com/hypercerts-org/hypercerts-sdk/commit/5be70faf5728a41477508089cfebef9c26d1362e),
41+
[`2354987`](https://github.com/hypercerts-org/hypercerts-sdk/commit/23549875fdd02cb30372109784916b3d5d9ee7c3),
42+
[`750cd44`](https://github.com/hypercerts-org/hypercerts-sdk/commit/750cd4429ed4ec2c0d21b4ea60296da87c7cc183),
43+
[`2e03d8d`](https://github.com/hypercerts-org/hypercerts-sdk/commit/2e03d8dc3a1fafad03c4f783951bfb48acfb01ab),
44+
[`60c3950`](https://github.com/hypercerts-org/hypercerts-sdk/commit/60c3950f596b5ae7080404d66575ecb58861d5c0)]:
45+
- @hypercerts-org/sdk-core@0.10.0-beta.7
46+
347
## 0.10.0-beta.7
448

549
### Patch Changes

packages/sdk-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hypercerts-org/sdk-react",
3-
"version": "0.10.0-beta.7",
3+
"version": "0.10.0-beta.8",
44
"description": "React hooks and components for the Hypercerts ATProto SDK",
55
"type": "module",
66
"main": "dist/index.cjs",

0 commit comments

Comments
 (0)