@calimero-network/mero-js 15.1.0 → 15.2.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
@@ -1232,6 +1232,32 @@ var AdminApiClient = class {
1232
1232
  )
1233
1233
  );
1234
1234
  }
1235
+ /**
1236
+ * Present a join this caller signed to a node the inviter named as an
1237
+ * admitter.
1238
+ *
1239
+ * For a member with no node. `joinNamespace` publishes the membership op from
1240
+ * the node making the call; this hands an already-signed op to somebody else's
1241
+ * node to publish. The distinction matters because a keyholder has nowhere to
1242
+ * publish from.
1243
+ *
1244
+ * The op must be signed by the **device key** in the credential it carries —
1245
+ * every peer checks that when applying a join. So the admitter cannot author
1246
+ * this, only carry it: a hostile one can refuse, and nothing else. It cannot
1247
+ * admit a different account, change the group, or grant a role.
1248
+ *
1249
+ * @param namespaceId the namespace being joined, 64 hex
1250
+ * @param request the invitation and the hex-encoded signed op
1251
+ */
1252
+ async admitJoin(namespaceId, request) {
1253
+ return unwrap(
1254
+ await this.httpClient.post(
1255
+ `/admin-api/namespaces/${namespaceId}/admit`,
1256
+ request,
1257
+ { timeoutMs: 65e3 }
1258
+ )
1259
+ );
1260
+ }
1235
1261
  async joinNamespace(namespaceId, request) {
1236
1262
  const data = unwrap(
1237
1263
  await this.httpClient.post(