A Truestamp Id serialize/deserialize library and command line tool written in Typescript.
T10_01FZ93KY67VYMFTVXTJ5BKWGT7_1640995200000000_63F9FA40EEC63EC865ABAB31A9ED1638
T 1 0 _ 01FZ93KY67VYMFTVXTJ5BKWGT7 _ 1640995200000000 _ 63F9FA40EEC63EC865ABAB31A9ED1638
PREFIX VERSION TEST SEP ULID SEP TIMESTAMP SEP HMAC-SHA256 (truncated to 16B)
Note:
_) to allow for double-click selection of the whole Idhmac(ID_WITHOUT_HMAC || ENVELOPE_HASH) which allows commitment of the ID to its own contents and the Envelope hash. It can only be verified by the signer who holds the HMAC key.npm install @truestamp/id
There is an example for Node.js in the /examples directory.
cd examples/node
npm i
node index.js
There is a very simple CLI that will decode a Truestamp ID and display the data stored within it.
❯ ./bin/truestamp-id.cjs T10_01FZ93KY67VYMFTVXTJ5BKWGT7_1640995200000000_63F9FA40EEC63EC865ABAB31A9ED1638
{
version: 1,
test: false,
ulid: '01FZ93KY67VYMFTVXTJ5BKWGT7',
timestamp: 1640995200000000
}
main branchversion field in package.jsonCopyright © 2021-2022 Truestamp Inc. All Rights Reserved.