Skip to content

Commit dfa40bf

Browse files
authored
Merge pull request #115 from hypercerts-org/feat/contribution-weight
2 parents 31c9342 + 0c93e39 commit dfa40bf

6 files changed

Lines changed: 5663 additions & 47 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
"@hypercerts-org/sdk-core": minor
3+
---
4+
5+
**BREAKING CHANGE**: Update contribution structure to match lexicon beta.7+ inline contributor format.
6+
7+
**Old API (lexicon beta.5-beta.6):**
8+
9+
```typescript
10+
await repo.hypercerts.create({
11+
contributions: [
12+
{
13+
contributors: ["did:plc:contrib1"],
14+
role: "Developer",
15+
description: "Led backend development",
16+
},
17+
],
18+
});
19+
```
20+
21+
**New API (lexicon beta.7+):**
22+
23+
```typescript
24+
await repo.hypercerts.create({
25+
contributions: [
26+
{
27+
contributors: ["did:plc:contrib1"],
28+
contributionDetails: "Developer", // string | StrongRef | CreateContributionDetailsParams
29+
weight: "0.75", // optional proportional weight
30+
},
31+
],
32+
});
33+
```
34+
35+
**Migration:** Replace `role` and `description` with `contributionDetails`. Optionally add `weight` for proportional
36+
attribution.

0 commit comments

Comments
 (0)