Skip to main content

Models

Trailproof uses three core data structures.

TrailEvent

The event envelope — every recorded event has this shape.

QueryResult

Returned by query(). Contains matching events and an optional cursor for pagination.
When next_cursor / nextCursor is present, pass it back to query() to get the next page of results.

VerifyResult

Returned by verify(). Reports the integrity status of the hash chain.
  • intact is True/true when broken is empty
  • broken contains 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.