Skip to content

Identity · TypeScript

SubsecondId

Open Source

SubsecondId provides time-ordered 64-bit and 128-bit identifiers using timestamps, tickers, and source identity. The formats support primary-key and index design for hot-to-archive storage and distributed systems. Source initialization and generation rules depend on the format; identifiers are not authentication credentials.

github.com/AStarStarship/… →

Specification

LanguagesTypeScript / JavaScript (NPM), C++/Crabs, Python
Widths64-bit (hot) and 128-bit
PropertyTime-ordered; format-specific source and ticker rules

Design & implementation

Time-ordered by construction

Ids include a time component to support chronological index ranges and hot-to-archive movement. Storage performance depends on the database, index layout, workload, and compaction policy.

Client-side generation

Generation is local. The 64-bit Hot minter uses a configured source identity, timestamp, and ticker; the 128-bit generator initializes its source with a crypto-backed RNG. Neither format means every minted value is a fresh random secret.

Shard key + forensic anchor

The source field supports shard routing and provenance. A minter configures its source once, rather than rebuilding identity for each record; source assignment and lifetime must match the chosen format.

Collision handling

Applications detect conflicts at the storage boundary and retry when needed. Source assignment and ticker limits are part of the generation contract. The archive collision ledger is a planned SubsecondDb component, not a shipped guarantee of this library.

Related