1.3.1 • Published 11 months ago
@the-pain-foundation/auid v1.3.1
Atomically Unique Identifier (AUID)
The Atomically Unique Identifier (AUID) system is the ID generation mechanism used within the P.A.I.N. Ecosystem.
Overview
The AUID system generates unique identifiers with 2^256
possible combinations, a number large enough to theoretically account for nearly every atom in the observable universe (approximately 10^80
atoms). This provides a significantly larger identifier space compared to UUID v4, which offers 2^128
combinations.
Format
AUIDs are formatted to be user-friendly and consistent with existing ID systems:
[a-f0-9]{16}-[a-f0-9]{16}-[a-f0-9]{16}-[a-f0-9]{16}
This format consists of four 16-character segments of hexadecimal digits (a-f0-9
), separated by hyphens, making them easy to read and use in various applications.
Advantages
- Large Identifier Space: The
2^256
combinations reduce the likelihood of ID collisions to an extremely low level, even at scale. - Familiar Format: The AUID format is similar to other commonly used ID systems, facilitating straightforward adoption.
- Long-Term Reliability: The vast number of possible IDs makes the system suitable for applications requiring long-term uniqueness and high-volume ID generation.
Usage
AUIDs can be used for any personal or commercial purpose.
Changelog
Version | Changes |
---|---|
1.0.0 | Created |
1.1.0 | Optimized ID generation by 293.85% |
1.2.0 | Added browser support |
1.2.2 | Fixed Typescript imports |
1.2.3 | Fixed Compiled code |
1.2.4 | Fixed Buffer dependance for browsers |
1.3.0 | Added RAW generation and conversion for node and browsers |
1.3.1 | Optimized DOM AUID generation |