mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
22 lines
577 B
TypeScript
22 lines
577 B
TypeScript
import { z } from "zod";
|
|
|
|
/**
|
|
* Relay-only pairing offer.
|
|
*
|
|
* `serverId` is a stable daemon identifier scoped to `PASEO_HOME`, and is also
|
|
* used as the relay session identifier.
|
|
*/
|
|
export const ConnectionOfferV2Schema = z.object({
|
|
v: z.literal(2),
|
|
serverId: z.string().min(1),
|
|
daemonPublicKeyB64: z.string().min(1),
|
|
relay: z.object({
|
|
endpoint: z.string().min(1),
|
|
}),
|
|
});
|
|
|
|
export type ConnectionOfferV2 = z.infer<typeof ConnectionOfferV2Schema>;
|
|
|
|
export const ConnectionOfferSchema = ConnectionOfferV2Schema;
|
|
export type ConnectionOffer = ConnectionOfferV2;
|