Timestamp Identifier (TID)
A Timestamp Identifier (TID) in the AT Protocol is a compact, sortable string identifier based on an integer timestamp. TIDs are used throughout the network to establish time ordering, serving as unique chronological identifiers for record and repository commits while remaining URL-friendly.
Structure[edit | edit source]
Each TID is a 64-bit integer with a specific bit layout:
- 1 bit: Always set to 0 (the high bit)
- 53 bits: Microseconds since the UNIX epoch (chosen to match JavaScript's maximum safe integer precision)
- 10 bits: Random "clock identifier" to avoid collisions
This integer is then encoded as a 13-character string using specialized base32 encoding.
Encoding[edit | edit source]
TIDs use a base32-sortable encoding with the character set:
234567abcdefghijklmnopqrstuvwxyz
The encoding:
- Always produces exactly 13 ASCII characters
- Produces no padding characters
- Maintains lexicographic sorting (alphabetical sorting matches timestamp ordering)
- The first character must be one of
234567abcdefghij
(due to the high bit being 0)
For example, a TID might look like: 3jzfcijpj2z2a
Uniqueness Considerations[edit | edit source]
Unlike centralized systems with coordinated ID generation, the AT Protocol operates in a decentralized environment where global uniqueness cannot be guaranteed. Repository controllers could theoretically create records using their own TIDs, though this is generally considered adversarial behavior.