···11import { OWNER_DID, SERVER_PORT, SERVICE_DID } from "@/lib/env";
22import { performHandshakes } from "@/lib/setup";
33-import { setRegistrationState } from "@/lib/state";
33+import { handshakeTokens, setRegistrationState } from "@/lib/state";
44import type { AtUri } from "@/lib/types/atproto";
55import { getRecordFromAtUri } from "@/lib/utils/atproto";
66import { newErrorResponse } from "@/lib/utils/http/responses";
···9292 attachLatticeRegistrationListener(prismWebsocket);
93939494 await performHandshakes(latticeAtUri);
9595+9696+ // TODO: change this to the actual WS sessions
9797+ const handshakeTokenEntries = handshakeTokens.entries().toArray();
9898+9999+ if (handshakeTokenEntries.length === 0) {
100100+ console.warn("Warning: there are zero handshake tokens on this Lattice.");
101101+ console.warn("If you're hacking locally, you might want to make sure that there's a running Shard as well.")
102102+ // NOTE: might change in the future
103103+ console.warn("Channel records connecting a Lattice to a Shard are not supported now. Dev lattices must point to a dev Shard if both are running locally")
104104+ }
95105};
9610697107main()