1.4.1 • Published 2 years ago

@truestamp/id v1.4.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

Truestamp ID

Description

A Truestamp ID serialize/deserialize library written in Typescript and simple command line ID parse tool.

ID Structure

  • The ID is typically ~64 characters in length. This exact length is not guaranteed.
  • The ID default prefix is always ts_, it is stripped during ID parsing and can be removed.
  • The body of the ID is Base58Check encoded.
  • The Base58Check decoded bytes decoded, validated and checked against a keyed SipHash Message Authentication Code (MAC) to help prevent forgery of IDs or DoS attacks.

Installation

npm install @truestamp/id

Example Code

There is an example for Node.js in the /examples directory.

npm run build
cd examples/node
npm i
node index.js

CLI

There is a very simple CLI that will decode a Truestamp ID and display the data stored within it.

$ ./bin/truestamp-id.cjs ts_11RuhkBx6tQHcsRtbtJcn5TU232Fp9NP7D3DsH65FX6B5nEWXNx7UjMR4nAo
{
  test: false,
  timestamp: '1640995200000000',
  ulid: '01G9ZMQHC1ZAGJNF52AEZ0AGYV'
}

Contributing

  • Commit changes, merge PR's to main branch
  • Bump version field in package.json
  • Cut a new release
  • New release will trigger workflow to build, test, and publish private package to Github Package Registry.

Legal

Copyright © 2021-2022 Truestamp Inc. All Rights Reserved.

1.4.1

2 years ago

1.2.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago