P. Reis 2025-03-17 22:47:38 -03:00
parent 5ff8bf4479
commit 46ab6005d1

View file

@ -13,7 +13,8 @@ export const proofSchema: z.ZodType<{
amount: z.number(), amount: z.number(),
secret: z.string(), secret: z.string(),
C: 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(), dleqValid: z.boolean().optional(),
}); });
@ -29,7 +30,12 @@ export const tokenEventSchema: z.ZodType<{
}); });
/** Ditto Cashu wallet */ /** 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(), pubkey_p2pk: n.id(),
mints: z.array(z.string().url()).nonempty().transform((val) => { mints: z.array(z.string().url()).nonempty().transform((val) => {
return [...new Set(val)]; return [...new Set(val)];