@calimero-network/mero-js 21.4.1 → 22.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/admin-api/admin-types.d.ts +32 -2
- package/dist/events/group.d.ts +2 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +2 -2
- package/dist/namespace-op/namespace-op.d.ts +8 -2
- package/dist/namespace-op/namespace-op.js +8 -2
- package/dist/relay/relay-client.d.ts +7 -4
- package/dist/relay/relay-client.js +7 -4
- package/package.json +1 -1
|
@@ -1141,7 +1141,6 @@ export interface RevokeAccountDeviceResponseData {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
export interface CreateGroupRequest {
|
|
1143
1143
|
applicationId: string;
|
|
1144
|
-
groupId?: string;
|
|
1145
1144
|
appKey?: string;
|
|
1146
1145
|
name?: string;
|
|
1147
1146
|
parentGroupId?: string;
|
|
@@ -1253,6 +1252,18 @@ export interface GroupInfo {
|
|
|
1253
1252
|
metadata?: MetadataRecord | null;
|
|
1254
1253
|
}
|
|
1255
1254
|
export type GroupInfoResponseData = GroupInfo;
|
|
1255
|
+
/**
|
|
1256
|
+
* A group member's role, as the node serializes it (PascalCase).
|
|
1257
|
+
*
|
|
1258
|
+
* The two TEE roles are minted by hardware-attestation admission only, never by
|
|
1259
|
+
* an invitation or a role change:
|
|
1260
|
+
* - `ReadOnlyTee` — a TEE **replica**: replicates and anchors sync, never
|
|
1261
|
+
* relays a member's write (a relay intent to one is refused with a 403).
|
|
1262
|
+
* - `RelayTee` — a TEE **relay**: a replica that may also author members'
|
|
1263
|
+
* writes under their signed warrants, with no `CAN_AUTHOR_ON_BEHALF` grant.
|
|
1264
|
+
* Admitted when the namespace's {@link TeeAdmissionMode} is `relay`.
|
|
1265
|
+
*/
|
|
1266
|
+
export type GroupMemberRole = 'Admin' | 'Member' | 'ReadOnly' | 'ReadOnlyTee' | 'RelayTee';
|
|
1256
1267
|
export interface GroupMember {
|
|
1257
1268
|
/**
|
|
1258
1269
|
* The member's ACCOUNT: 64 hex characters.
|
|
@@ -1265,7 +1276,7 @@ export interface GroupMember {
|
|
|
1265
1276
|
* to {@link GroupMemberInput}.
|
|
1266
1277
|
*/
|
|
1267
1278
|
identity: string;
|
|
1268
|
-
role:
|
|
1279
|
+
role: GroupMemberRole;
|
|
1269
1280
|
name?: string;
|
|
1270
1281
|
}
|
|
1271
1282
|
export interface ListGroupMembersResponseData {
|
|
@@ -1400,6 +1411,14 @@ export interface SignedReleaseTeePolicy {
|
|
|
1400
1411
|
/** The oldest release admitted (`2.3.72`); any signed release when absent. */
|
|
1401
1412
|
minReleaseVersion?: string;
|
|
1402
1413
|
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Which role a namespace admits attested TEE nodes with: `replica`
|
|
1416
|
+
* (`ReadOnlyTee`, the default) or `relay` (`RelayTee`, which may also author
|
|
1417
|
+
* members' writes under their warrants). Part of the admin-signed policy, so
|
|
1418
|
+
* every node admits with the same role; changing it converts the TEEs already
|
|
1419
|
+
* admitted.
|
|
1420
|
+
*/
|
|
1421
|
+
export type TeeAdmissionMode = 'replica' | 'relay';
|
|
1403
1422
|
/** A policy that lists the measurements it admits. */
|
|
1404
1423
|
export interface MeasurementTeeAdmissionPolicyRequest {
|
|
1405
1424
|
allowedMrtd: string[];
|
|
@@ -1409,16 +1428,22 @@ export interface MeasurementTeeAdmissionPolicyRequest {
|
|
|
1409
1428
|
allowedRtmr3: string[];
|
|
1410
1429
|
allowedTcbStatuses: string[];
|
|
1411
1430
|
acceptMock: boolean;
|
|
1431
|
+
/** Absent means `replica`. */
|
|
1432
|
+
mode?: TeeAdmissionMode;
|
|
1412
1433
|
}
|
|
1413
1434
|
/** A policy that admits by signed release. The node refuses measurement lists beside it. */
|
|
1414
1435
|
export interface SignedReleaseTeeAdmissionPolicyRequest {
|
|
1415
1436
|
signedRelease: SignedReleaseTeePolicy;
|
|
1416
1437
|
allowedTcbStatuses: string[];
|
|
1417
1438
|
acceptMock: boolean;
|
|
1439
|
+
/** Absent means `replica`. */
|
|
1440
|
+
mode?: TeeAdmissionMode;
|
|
1418
1441
|
}
|
|
1419
1442
|
export type SetTeeAdmissionPolicyRequest = MeasurementTeeAdmissionPolicyRequest | SignedReleaseTeeAdmissionPolicyRequest;
|
|
1420
1443
|
export type SetTeeAdmissionPolicyResponseData = Record<string, never>;
|
|
1421
1444
|
export interface GetTeeAdmissionPolicyResponseData {
|
|
1445
|
+
/** `false` when no policy is set; the rest are then empty. */
|
|
1446
|
+
enabled?: boolean;
|
|
1422
1447
|
allowedMrtd: string[];
|
|
1423
1448
|
allowedRtmr0: string[];
|
|
1424
1449
|
allowedRtmr1: string[];
|
|
@@ -1428,6 +1453,11 @@ export interface GetTeeAdmissionPolicyResponseData {
|
|
|
1428
1453
|
acceptMock: boolean;
|
|
1429
1454
|
/** Set when the policy admits by signed release; the lists are then empty. */
|
|
1430
1455
|
signedRelease?: SignedReleaseTeePolicy;
|
|
1456
|
+
/**
|
|
1457
|
+
* The role admitted TEEs receive. `replica` for a policy set before the mode
|
|
1458
|
+
* existed; absent only from a node that predates it.
|
|
1459
|
+
*/
|
|
1460
|
+
mode?: TeeAdmissionMode;
|
|
1431
1461
|
}
|
|
1432
1462
|
/**
|
|
1433
1463
|
* Which admitted TEEs may author as the group's TEE authority (the writer behind
|
package/dist/events/group.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { GroupMemberRole } from '../admin-api/admin-types.js';
|
|
1
2
|
/** Parsed group-membership event (core's untagged `NodeEvent` group variant). */
|
|
2
3
|
export interface GroupMembershipEventData {
|
|
3
4
|
groupId: string;
|
|
@@ -10,7 +11,7 @@ export interface GroupMembershipEventData {
|
|
|
10
11
|
memberAccount: string;
|
|
11
12
|
/** Absent on `MemberRemoved`, and on a `MemberJoined` inherited from an Open
|
|
12
13
|
* subgroup. Core's set is closed. */
|
|
13
|
-
role?:
|
|
14
|
+
role?: GroupMemberRole;
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
/**
|