interface · Browser and Node
GroupRoot
A signed group root. One per epoch, hash-chained.
@toip-tools/anon-membershipView sourceimport { type GroupRoot } from "@toip-tools/anon-membership";
Declaration
interface GroupRoot {
id: string;
type: typeof ROOT_TYPE;
v: 1;
issuer: string;
/** "<issuer DID>#<name>". */
group: string;
/** The group as the circuit sees it: groupFieldOf(group), hex. */
groupId: string;
circuit: string;
/** Seconds per epoch: 86400 for daily roots. */
period: number;
/** The epoch: a UTC day ("2026-11-06") for daily roots, else the period's start time. */
epoch: string;
/** 0 for the group's first root. */
seq: number;
/** rootDocHash of the previous root, or null. */
prev: string | null;
root: string;
/** The next leaf index. */
length: number;
/** Non-zero leaves. */
size: number;
/** Hex SHA-256 of the snapshot bytes. */
snapshotHash: string;
issuedAt: string;
/** Application fields the issuer signs with the root, such as attribute counts. */
ext?: Record<string, unknown>;
/** The eddsa-jcs-2022 Data Integrity proof from trust-core's signDocument. */
proof?: Record<string, unknown>;
}
Properties
idrequiredstringtyperequired"anon-membership/root"vrequired1issuerrequiredstringgrouprequiredstring"
# ". groupIdrequiredstringThe group as the circuit sees it: groupFieldOf(group), hex.
circuitrequiredstringperiodrequirednumberSeconds per epoch: 86400 for daily roots.
epochrequiredstringThe epoch: a UTC day ("2026-11-06") for daily roots, else the period's start time.
seqrequirednumber0 for the group's first root.
prevrequiredstring | nullrootDocHash of the previous root, or null.
rootrequiredstringlengthrequirednumberThe next leaf index.
sizerequirednumberNon-zero leaves.
snapshotHashrequiredstringHex SHA-256 of the snapshot bytes.
issuedAtrequiredstringextoptionalRecord<string, unknown> | undefinedApplication fields the issuer signs with the root, such as attribute counts.
proofoptionalRecord<string, unknown> | undefinedThe eddsa-jcs-2022 Data Integrity proof from trust-core's signDocument.