Skip to main content

Module tid

Module tid 

Source
Expand description

atproto TID (Timestamp Identifier) — lexicographically-sortable record keys.

A TID is a 13-character base32-sortable integer. A timestamp constructor packs 53 microsecond-timestamp bits above a 10-bit per-actor clock id. The sorted alphabet makes string order agree with numeric order.

§Format

The alphabet is 234567abcdefghijklmnopqrstuvwxyz (32 symbols). The raw 64-bit integer is represented by 13 radix-32 digits, with a zero 65th bit at the LEFT. Thus the first digit is restricted to 2..7 or a..j, while the final digit carries all five low bits. This is integer encoding, not byte-oriented base32 with right-side padding bits.

Structs§

Tid
A 64-bit atproto TID.