mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
24 lines
605 B
TypeScript
24 lines
605 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const proofSchema: z.ZodType<{
|
|
id: string;
|
|
amount: number;
|
|
secret: string;
|
|
C: string;
|
|
dleq?: { s: string; e: string; r?: string };
|
|
dleqValid?: boolean;
|
|
}> = z.object({
|
|
id: z.string(),
|
|
amount: z.number(),
|
|
secret: z.string(),
|
|
C: z.string(),
|
|
dleq: z.object({ s: z.string(), e: z.string(), r: z.string().optional() }).optional(),
|
|
dleqValid: z.boolean().optional(),
|
|
});
|
|
|
|
/** Decrypted content of a kind 7375 */
|
|
export const tokenEventSchema = z.object({
|
|
mint: z.string().url(),
|
|
proofs: proofSchema.array(),
|
|
del: z.string().array().optional(),
|
|
});
|