trail/head
https://toip.tools/spec/trail/head/0.1
A watcher or verifier asks a witness for the head of a log: the latest receipt that witness signed. Watchers compare heads to catch forks and truncated bundles.
- Sent
- watcher or verifier witness
- Kind
- Request and response. The response's type is
https://toip.tools/spec/trail/head/0.1#response. - Envelope
- Signed by the issuer, addressed to one recipient, timestamped, and encrypted in a TSP Direct message. The signature and recipient binding prevent its use as a bearer token.
- Defined in
packages/eventlog/src/tasks.ts:15ashead- Handled in
packages/eventlog/src/tasks.ts- Design
- 10.3 Watchers in
projects/trail/docs/design.md
Payload
{ logId: Qb64 }
Response payload
{ receipt: string | null }
Document envelope
Every Trust Task uses this envelope. Replace payload with the structure shown above.
{
"id": "urn:uuid:…",
"type": "https://toip.tools/spec/trail/head/0.1",
"issuer": "did:key:… (the sender)",
"recipient": "did:key:… (the receiver)",
"issuedAt": "2026-11-06T18:00:00.000Z",
"payload": { … },
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:key:…#…",
"proofPurpose": "assertionMethod",
"proofValue": "z…"
}
}