Models
Trailproof uses three core data structures.TrailEvent
The event envelope — every recorded event has this shape.QueryResult
Returned byquery(). Contains matching events and an optional cursor for pagination.
next_cursor / nextCursor is present, pass it back to query() to get the next page of results.
VerifyResult
Returned byverify(). Reports the integrity status of the hash chain.
intactisTrue/truewhenbrokenis emptybrokencontains 0-based indices of events whose hash doesn’t match the recomputed value- An empty chain returns
{ intact: true, total: 0, broken: [] }
When a single event is tampered, all subsequent events also appear in
broken due to cascading hash chain failure.