Skip to content

Interface: AuditEntry

@roomful/core


@roomful/core / AuditEntry

Defined in: packages/core/src/internal/audit-log.ts:12

Hash-chained audit log for tamper evidence.

Each entry links to the previous via a hash, so altering any entry breaks the chain. Call verify() to detect tampering.

ponytail: djb2 hash — fast, sync, no crypto dep. Not collision-resistant; upgrade to SHA-256 when persistence or cross-process verification is needed. In-memory only — add storage adapter when audit retention is required.

actor: string

Defined in: packages/core/src/internal/audit-log.ts:23

Who triggered it (peerId, ‘system’, etc.).


optional detail: unknown

Defined in: packages/core/src/internal/audit-log.ts:26

Arbitrary structured detail the caller attaches.


event: string

Defined in: packages/core/src/internal/audit-log.ts:20

What happened — free-form, caller decides granularity.


hash: string

Defined in: packages/core/src/internal/audit-log.ts:32

Hash of this entry’s content.


index: number

Defined in: packages/core/src/internal/audit-log.ts:14

Zero-based position in the chain.


prevHash: string | null

Defined in: packages/core/src/internal/audit-log.ts:29

Hash of the previous entry, or null for the genesis entry.


timestamp: string

Defined in: packages/core/src/internal/audit-log.ts:17

ISO-8601 timestamp of when the event was recorded.