UUID

The UUID class provides methods to make working with UUIDs easier and consistent across all Platform SDK products.

Importing the UUID class

import { UUID } from "@payvo/sdk-crypto";

Generate a UUID based on the current time

UUID.timestamp();

Generate a MD5 UUID based on a name and namespace

UUID.md5('name', 'namespace');

Generate a UUID based on a random value

UUID.random();

Generate a SHA1 UUID based on a name and namespace

UUID.sha1('name', 'namespace');

Generate a UUID based on a parse value

UUID.parse('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d');

Convert a buffer into a UUID

UUID.stringify(UUID.parse('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'));

Validate a UUID

UUID.validate('9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d');
2021 © ARK.io | All rights reserved An ARK.io Product