feat: use tree-shakable zod

This commit is contained in:
2025-07-12 14:42:09 +02:00
parent 82433cb3b3
commit 8194e0facf
3 changed files with 8 additions and 8 deletions

View File

@@ -10,6 +10,6 @@
},
"dependencies": {
"base64-js": "^1.5.1",
"zod": "^3.25.67"
"zod": "^4"
}
}

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import * as z from "zod/mini";
import {
fromByteArray as serializeArray,
toByteArray as deserializeArray,
@@ -52,7 +52,7 @@ export async function serializeAndSignData<T>(
export async function verifyAndDeserializeData<T>(
signedData: SignedData,
schema: z.ZodType<T>,
schema: z.ZodMiniType<T>,
secret: string,
): Promise<T> {
const arr = utf16StringToArrayBuffer(`${signedData.data}:${secret}`);