[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Type](https://evolu.dev/docs/api-reference/common/Type) › uuidVersion

```ts
function uuidVersion<Version extends UuidVersion>(
  version: ValidateBrandFactoryNumber<Version>,
): BrandFactory<
  `UuidV${Version}`,
  string & Brand<"Uuid">,
  UuidVersionError<Version>
>;
```

Defined in: [packages/common/src/Type.ts:10663](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/common/src/Type.ts#L10663)

[Uuid](https://evolu.dev/docs/api-reference/common/Type/variables/Uuid) [Brand](https://evolu.dev/docs/api-reference/common/Brand/interfaces/Brand) requiring one RFC 9562 version.

Accepts a UUID whose version digit is the given version and whose variant is
the one RFC 9562 defines, so the Nil and Max UUIDs fail every version. The
version must be one concrete numeric literal so different versions have
distinct brands.

Use [UuidV4](https://evolu.dev/docs/api-reference/common/Type/variables/UuidV4) for random UUIDs and [UuidV7](https://evolu.dev/docs/api-reference/common/Type/variables/UuidV7) for time-ordered UUIDs.

### Example

```ts
import {
  assertErr,
  assertOk,
  assertType,
  Uuid,
  uuidVersion,
  type Brand,
} from "@evolu/common";

const UuidV1 = uuidVersion(1)(Uuid);

const value = UuidV1.fromUnknown("c232ab00-9414-11ec-b3c8-9f6bdeced846");
assertOk(value, "c232ab00-9414-11ec-b3c8-9f6bdeced846");
assertType<typeof value.value, string & Brand<"Uuid"> & Brand<"UuidV1">>();

assertErr(UuidV1.fromUnknown("0190a6f4-8c3e-7b2a-9d41-5e6f7a8b9c0d"));
```