@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.mjs CHANGED
@@ -1158,6 +1158,32 @@ var AdminApiClient = class {
1158
1158
  )
1159
1159
  );
1160
1160
  }
1161
+ /**
1162
+ * Present a join this caller signed to a node the inviter named as an
1163
+ * admitter.
1164
+ *
1165
+ * For a member with no node. `joinNamespace` publishes the membership op from
1166
+ * the node making the call; this hands an already-signed op to somebody else's
1167
+ * node to publish. The distinction matters because a keyholder has nowhere to
1168
+ * publish from.
1169
+ *
1170
+ * The op must be signed by the **device key** in the credential it carries —
1171
+ * every peer checks that when applying a join. So the admitter cannot author
1172
+ * this, only carry it: a hostile one can refuse, and nothing else. It cannot
1173
+ * admit a different account, change the group, or grant a role.
1174
+ *
1175
+ * @param namespaceId the namespace being joined, 64 hex
1176
+ * @param request the invitation and the hex-encoded signed op
1177
+ */
1178
+ async admitJoin(namespaceId, request) {
1179
+ return unwrap(
1180
+ await this.httpClient.post(
1181
+ `/admin-api/namespaces/${namespaceId}/admit`,
1182
+ request,
1183
+ { timeoutMs: 65e3 }
1184
+ )
1185
+ );
1186
+ }
1161
1187
  async joinNamespace(namespaceId, request) {
1162
1188
  const data = unwrap(
1163
1189
  await this.httpClient.post(