@calimero-network/mero-js 6.0.4 → 6.1.0

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/dist/index.cjs CHANGED
@@ -961,6 +961,21 @@ var AdminApiClient = class {
961
961
  parse: "arrayBuffer"
962
962
  });
963
963
  }
964
+ /**
965
+ * Fetch a blob's metadata without downloading it. `HEAD /admin-api/blobs/:id`
966
+ * returns the info in response headers (size via `content-length`, plus
967
+ * `x-blob-id`/`x-blob-hash`/`x-blob-mime-type`).
968
+ */
969
+ async getBlobInfo(blobId) {
970
+ const { headers } = await this.httpClient.head(`/admin-api/blobs/${blobId}`);
971
+ const size = Number(headers["content-length"]);
972
+ return {
973
+ blobId: headers["x-blob-id"] ?? blobId,
974
+ size: Number.isFinite(size) ? size : 0,
975
+ hash: headers["x-blob-hash"],
976
+ mimeType: headers["x-blob-mime-type"]
977
+ };
978
+ }
964
979
  // ---- Alias Management ----
965
980
  async createContextAlias(request) {
966
981
  return unwrap(
@@ -1168,6 +1183,10 @@ var AdminApiClient = class {
1168
1183
  async setTeeAdmissionPolicy(groupId, request) {
1169
1184
  await this.httpClient.put(`/admin-api/groups/${groupId}/settings/tee-admission-policy`, request);
1170
1185
  }
1186
+ async getTeeAdmissionPolicy(groupId) {
1187
+ const response = await this.httpClient.get(`/admin-api/groups/${groupId}/settings/tee-admission-policy`);
1188
+ return response.data ?? response;
1189
+ }
1171
1190
  async updateGroupSettings(groupId, request) {
1172
1191
  await this.httpClient.patch(`/admin-api/groups/${groupId}`, request);
1173
1192
  }