@calimero-network/mero-js 23.9.0 → 24.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/account/account-admin.js +3 -1
- package/dist/admin-api/admin-types.d.ts +6 -1
- package/dist/cloud/cloud-client.d.ts +48 -0
- package/dist/cloud/cloud-client.js +24 -0
- package/dist/cloud/index.d.ts +1 -1
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +19 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +19 -2
- package/dist/index.mjs.map +2 -2
- package/dist/warrant/governance-op.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11023,7 +11023,7 @@ function createAccountAdmin(input, deps = {}) {
|
|
|
11023
11023
|
return { namespaceId, haEnabled, ...haError !== void 0 ? { haError } : {} };
|
|
11024
11024
|
},
|
|
11025
11025
|
async createGroupInNamespace(namespaceId, req = {}) {
|
|
11026
|
-
const { op } = await subgroupCreation({ parentId: namespaceId, restricted: req.visibility
|
|
11026
|
+
const { op } = await subgroupCreation({ parentId: namespaceId, restricted: req.visibility === "restricted", admin: s.account });
|
|
11027
11027
|
const { groupId } = await root(s, namespaceId, op);
|
|
11028
11028
|
rememberGroupNamespace(s.account, groupId, namespaceId);
|
|
11029
11029
|
if (req.groupName) await group(s, groupId, groupMetadataSetOp({ name: req.groupName }));
|
|
@@ -11212,6 +11212,20 @@ function teeRoleOf(row) {
|
|
|
11212
11212
|
function pickExecutingRelay(relays) {
|
|
11213
11213
|
return relays.find((r) => r.canExecute && r.relayUrl !== null && r.executorAccount !== null) ?? null;
|
|
11214
11214
|
}
|
|
11215
|
+
function joinOf(row) {
|
|
11216
|
+
const raw = row.join;
|
|
11217
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
11218
|
+
const join = raw;
|
|
11219
|
+
if (typeof join.state !== "string") return null;
|
|
11220
|
+
const refusals = Array.isArray(join.refusals) ? join.refusals.filter((r) => !!r && typeof r === "object").map((r) => ({ peer: String(r.peer ?? ""), reason: String(r.reason ?? "") })) : [];
|
|
11221
|
+
return {
|
|
11222
|
+
state: join.state,
|
|
11223
|
+
attempts: typeof join.attempts === "number" ? join.attempts : 0,
|
|
11224
|
+
refusals,
|
|
11225
|
+
error: typeof join.error === "string" ? join.error : null,
|
|
11226
|
+
reportedAt: typeof join.reported_at === "string" ? join.reported_at : null
|
|
11227
|
+
};
|
|
11228
|
+
}
|
|
11215
11229
|
var ACCOUNT_HEX = /^[0-9a-f]{64}$/;
|
|
11216
11230
|
function accountHexOrNull(value) {
|
|
11217
11231
|
return typeof value === "string" && ACCOUNT_HEX.test(value) ? value : null;
|
|
@@ -11451,7 +11465,10 @@ var CloudClient = class {
|
|
|
11451
11465
|
authorshipReady && relayUrl !== null && executorAccount !== null
|
|
11452
11466
|
),
|
|
11453
11467
|
lastSeenAt: row.last_seen_at ?? null,
|
|
11454
|
-
confirmedAt: row.confirmed_at ?? null
|
|
11468
|
+
confirmedAt: row.confirmed_at ?? null,
|
|
11469
|
+
admission: typeof row.admission === "string" ? row.admission : null,
|
|
11470
|
+
admissionHint: typeof row.admission_hint === "string" ? row.admission_hint : null,
|
|
11471
|
+
join: joinOf(row)
|
|
11455
11472
|
};
|
|
11456
11473
|
});
|
|
11457
11474
|
}
|