refactor: centralize relay vs direct E2EE

This commit is contained in:
Mohamed Boudra
2026-02-03 14:13:03 +07:00
parent 4fb93d92ed
commit d68596bcbe
12 changed files with 83 additions and 68 deletions
@@ -0,0 +1,17 @@
import { z } from "zod";
export const ConnectionOfferV1Schema = z.object({
v: z.literal(1),
sessionId: z.string().min(1),
endpoints: z.array(z.string().min(1)).min(1),
daemonPublicKeyB64: z.string().min(1),
relay: z
.object({
endpoint: z.string().min(1),
})
.nullable()
.optional(),
});
export type ConnectionOfferV1 = z.infer<typeof ConnectionOfferV1Schema>;