From 46ab6005d1c8165afdedc294918997c9185a5ee8 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Mon, 17 Mar 2025 22:47:38 -0300 Subject: [PATCH] fix: https://jsr.io/go/slow-type-missing-explicit-type --- packages/cashu/schemas.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/cashu/schemas.ts b/packages/cashu/schemas.ts index 83ee0b87..e2c6e8cd 100644 --- a/packages/cashu/schemas.ts +++ b/packages/cashu/schemas.ts @@ -13,7 +13,8 @@ export const proofSchema: z.ZodType<{ amount: z.number(), secret: z.string(), C: z.string(), - dleq: z.object({ s: z.string(), e: z.string(), r: z.string().optional() }).optional(), + dleq: z.object({ s: z.string(), e: z.string(), r: z.string().optional() }) + .optional(), dleqValid: z.boolean().optional(), }); @@ -29,7 +30,12 @@ export const tokenEventSchema: z.ZodType<{ }); /** Ditto Cashu wallet */ -export const walletSchema = z.object({ +export const walletSchema: z.ZodType<{ + pubkey_p2pk: string; + mints: string[]; + relays: string[]; + balance: number; +}> = z.object({ pubkey_p2pk: n.id(), mints: z.array(z.string().url()).nonempty().transform((val) => { return [...new Set(val)];