@hypercerts-org/sdk-core 0.10.0-beta.3 → 0.10.0-beta.4
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 +16 -0
- package/README.md +5 -0
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +29 -13
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +29 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @hypercerts-org/sdk-core
|
|
2
2
|
|
|
3
|
+
## 0.10.0-beta.4
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#80](https://github.com/hypercerts-org/hypercerts-sdk/pull/80)
|
|
8
|
+
[`3419471`](https://github.com/hypercerts-org/hypercerts-sdk/commit/34194710cae3a53b4106d8b8dc4007505a8b5f0a) Thanks
|
|
9
|
+
[@Kzoeps](https://github.com/Kzoeps)! - Update the params for create organization. Created a separate interface for
|
|
10
|
+
it. Changed the params from handle to handlePrefix as expected by the actual `sds.organizations.create` procedure
|
|
11
|
+
call. Added validation to check the required parameters in the call
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#79](https://github.com/hypercerts-org/hypercerts-sdk/pull/79)
|
|
16
|
+
[`48ecd6c`](https://github.com/hypercerts-org/hypercerts-sdk/commit/48ecd6cfddfb13a6c155df7c6618965dd2157253) Thanks
|
|
17
|
+
[@Kzoeps](https://github.com/Kzoeps)! - Remove validation from hypercert.get
|
|
18
|
+
|
|
3
19
|
## 0.10.0-beta.3
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -20,6 +20,11 @@ const sdk = createATProtoSDK({
|
|
|
20
20
|
jwksUri: "https://your-app.com/jwks.json",
|
|
21
21
|
jwkPrivate: process.env.ATPROTO_JWK_PRIVATE!,
|
|
22
22
|
},
|
|
23
|
+
// set up with your pds url.
|
|
24
|
+
// entryway doesn't work for this. Has to be a PDS URL.
|
|
25
|
+
servers: {
|
|
26
|
+
pds: "https://pds-eu-west4.test.certified.app",
|
|
27
|
+
},
|
|
23
28
|
});
|
|
24
29
|
|
|
25
30
|
// 2. Authenticate user
|
package/dist/index.cjs
CHANGED
|
@@ -3500,11 +3500,6 @@ class HypercertOperationsImpl extends eventemitter3.EventEmitter {
|
|
|
3500
3500
|
if (!result.success) {
|
|
3501
3501
|
throw new NetworkError("Failed to get hypercert");
|
|
3502
3502
|
}
|
|
3503
|
-
// Validate with lexicon (more lenient - doesn't require $type)
|
|
3504
|
-
const validation = lexicon.validate(result.data.value, HYPERCERT_COLLECTIONS.CLAIM, "main", false);
|
|
3505
|
-
if (!validation.success) {
|
|
3506
|
-
throw new ValidationError(`Invalid hypercert record format: ${validation.error?.message}`);
|
|
3507
|
-
}
|
|
3508
3503
|
return {
|
|
3509
3504
|
uri: result.data.uri,
|
|
3510
3505
|
cid: result.data.cid ?? "",
|
|
@@ -4600,6 +4595,12 @@ class OrganizationOperationsImpl {
|
|
|
4600
4595
|
if (!userDid) {
|
|
4601
4596
|
throw new NetworkError("No authenticated user found");
|
|
4602
4597
|
}
|
|
4598
|
+
if (!params.handlePrefix) {
|
|
4599
|
+
throw new ValidationError("Missing handlePrefix");
|
|
4600
|
+
}
|
|
4601
|
+
if (!params.name) {
|
|
4602
|
+
throw new ValidationError("Missing name");
|
|
4603
|
+
}
|
|
4603
4604
|
const response = await this.session.fetchHandler(`${this.serverUrl}/xrpc/com.sds.organization.create`, {
|
|
4604
4605
|
method: "POST",
|
|
4605
4606
|
headers: { "Content-Type": "application/json" },
|