Skip to content

TNID: Typed Named IDs. Type-checked IDs with a name, UUID compatible

License

Notifications You must be signed in to change notification settings

mkeedlinger/tnid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TNID

This repository contains the TNID specification.

TNIDs are UUIDv8-compatible identifiers with a human-readable name field and compile-time type safety (where possible).

user.Br2flcNDfF6LYICnT

Overview

Based on UUIDv8, TNIDs maintain full UUID compatibility while adding:

  • 20-bit name field for runtime and compile-time type differentiation
  • Unambiguous, lexicographically sortable string representation (unlike UUID's case-insensitive hex)
  • Two variants: Variant 0 (time-sortable, like UUIDv7) and Variant 1 (high-entropy, like UUIDv4)

TNIDs work anywhere a UUID is expected; all valid TNIDs are valid UUIDs.

Resources

About

TNID: Typed Named IDs. Type-checked IDs with a name, UUID compatible

Topics

Resources

License

Stars

Watchers

Forks