mirror of
https://github.com/Blah-IM/typescript-core.git
synced 2025-04-30 16:21:10 +00:00
fix(crypto): parse & verify type annotation
This commit is contained in:
parent
3ad7e826e2
commit
a88b004e9f
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ export class BlahPublicKey {
|
|||
static async parseAndVerifyPayload<P extends z.ZodTypeAny>(
|
||||
schema: P,
|
||||
signedPayload: unknown,
|
||||
): Promise<{ payload: P; key: BlahPublicKey }> {
|
||||
): Promise<{ payload: z.infer<P>; key: BlahPublicKey }> {
|
||||
const signedPayloadSchema = blahSignedPayloadSchemaOf(schema);
|
||||
const parsed = signedPayloadSchema.parse(signedPayload) as z.infer<P>;
|
||||
return await BlahPublicKey.verifyPayload(parsed);
|
||||
|
|
Loading…
Add table
Reference in a new issue