@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.mjs
CHANGED
|
@@ -10741,7 +10741,7 @@ function createAccountAdmin(input, deps = {}) {
|
|
|
10741
10741
|
return { namespaceId, haEnabled, ...haError !== void 0 ? { haError } : {} };
|
|
10742
10742
|
},
|
|
10743
10743
|
async createGroupInNamespace(namespaceId, req = {}) {
|
|
10744
|
-
const { op } = await subgroupCreation({ parentId: namespaceId, restricted: req.visibility
|
|
10744
|
+
const { op } = await subgroupCreation({ parentId: namespaceId, restricted: req.visibility === "restricted", admin: s.account });
|
|
10745
10745
|
const { groupId } = await root(s, namespaceId, op);
|
|
10746
10746
|
rememberGroupNamespace(s.account, groupId, namespaceId);
|
|
10747
10747
|
if (req.groupName) await group(s, groupId, groupMetadataSetOp({ name: req.groupName }));
|
|
@@ -10930,6 +10930,20 @@ function teeRoleOf(row) {
|
|
|
10930
10930
|
function pickExecutingRelay(relays) {
|
|
10931
10931
|
return relays.find((r) => r.canExecute && r.relayUrl !== null && r.executorAccount !== null) ?? null;
|
|
10932
10932
|
}
|
|
10933
|
+
function joinOf(row) {
|
|
10934
|
+
const raw = row.join;
|
|
10935
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
10936
|
+
const join = raw;
|
|
10937
|
+
if (typeof join.state !== "string") return null;
|
|
10938
|
+
const refusals = Array.isArray(join.refusals) ? join.refusals.filter((r) => !!r && typeof r === "object").map((r) => ({ peer: String(r.peer ?? ""), reason: String(r.reason ?? "") })) : [];
|
|
10939
|
+
return {
|
|
10940
|
+
state: join.state,
|
|
10941
|
+
attempts: typeof join.attempts === "number" ? join.attempts : 0,
|
|
10942
|
+
refusals,
|
|
10943
|
+
error: typeof join.error === "string" ? join.error : null,
|
|
10944
|
+
reportedAt: typeof join.reported_at === "string" ? join.reported_at : null
|
|
10945
|
+
};
|
|
10946
|
+
}
|
|
10933
10947
|
var ACCOUNT_HEX = /^[0-9a-f]{64}$/;
|
|
10934
10948
|
function accountHexOrNull(value) {
|
|
10935
10949
|
return typeof value === "string" && ACCOUNT_HEX.test(value) ? value : null;
|
|
@@ -11169,7 +11183,10 @@ var CloudClient = class {
|
|
|
11169
11183
|
authorshipReady && relayUrl !== null && executorAccount !== null
|
|
11170
11184
|
),
|
|
11171
11185
|
lastSeenAt: row.last_seen_at ?? null,
|
|
11172
|
-
confirmedAt: row.confirmed_at ?? null
|
|
11186
|
+
confirmedAt: row.confirmed_at ?? null,
|
|
11187
|
+
admission: typeof row.admission === "string" ? row.admission : null,
|
|
11188
|
+
admissionHint: typeof row.admission_hint === "string" ? row.admission_hint : null,
|
|
11189
|
+
join: joinOf(row)
|
|
11173
11190
|
};
|
|
11174
11191
|
});
|
|
11175
11192
|
}
|