feat: use tree-shakable zod
This commit is contained in:
@@ -10,6 +10,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"base64-js": "^1.5.1",
|
||||
"zod": "^3.25.67"
|
||||
"zod": "^4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user